fix(replay): mark local compaction calls
This commit is contained in:
@@ -416,6 +416,7 @@ function commitCompactionBody(
|
||||
shadowedTokenCount,
|
||||
summary,
|
||||
rawOutput,
|
||||
llmStreamCall,
|
||||
provider,
|
||||
model,
|
||||
maxTokens,
|
||||
@@ -425,6 +426,7 @@ function commitCompactionBody(
|
||||
const summaryEvent = session.append('compact/summary', {
|
||||
summary,
|
||||
...rawOutput === undefined ? {} : { rawOutput },
|
||||
...llmStreamCall === undefined ? {} : { llmStreamCall },
|
||||
shadowedRange: { start, end },
|
||||
shadowedSeqs: [...shadowedSeqs],
|
||||
shadowedTokenCount,
|
||||
|
||||
@@ -87,8 +87,16 @@ export interface SummarizationInput {
|
||||
/** Safe summary content plus the exact auxiliary call envelope recorded in provenance. */
|
||||
export interface SummaryResult {
|
||||
summary: ContentBlock[]
|
||||
/** Complete provider output before the text-only summary projection. */
|
||||
/**
|
||||
* Complete provider output before the text-only summary projection; this
|
||||
* alone does not identify the call path.
|
||||
*/
|
||||
rawOutput?: ContentBlock[]
|
||||
/**
|
||||
* Present only when producing the summary consumed exactly one call through
|
||||
* this context's `ctx.llm.stream()`.
|
||||
*/
|
||||
llmStreamCall?: true
|
||||
provider: string
|
||||
model: string
|
||||
maxTokens?: number
|
||||
@@ -162,6 +170,7 @@ export async function summarizeWithLlm(
|
||||
return {
|
||||
summary,
|
||||
rawOutput,
|
||||
llmStreamCall: true,
|
||||
provider: options.provider,
|
||||
model: options.model,
|
||||
maxTokens: config.maxTokens,
|
||||
|
||||
Reference in New Issue
Block a user