1- import type { AgentMessage } from "@mariozechner/pi-agent-core" ;
1+ import type { AgentMessage , ThinkingLevel } from "@mariozechner/pi-agent-core" ;
22import type { SimpleStreamOptions } from "@mariozechner/pi-ai" ;
33import type { ExtensionContext } from "@mariozechner/pi-coding-agent" ;
44import {
55 estimateTokens ,
66 generateSummary as piGenerateSummary ,
77} from "@mariozechner/pi-coding-agent" ;
8- import type { ThinkLevel } from "../auto-reply/thinking.js" ;
98import type { AgentCompactionIdentifierPolicy } from "../config/types.agent-defaults.js" ;
109import { formatErrorMessage } from "../infra/errors.js" ;
1110import { retryAsync } from "../infra/retry.js" ;
@@ -58,7 +57,7 @@ type GenerateSummaryCompat = {
5857 signal ?: AbortSignal ,
5958 customInstructions ?: string ,
6059 previousSummary ?: string ,
61- thinkingLevel ?: ThinkLevel ,
60+ thinkingLevel ?: ThinkingLevel ,
6261 completionOptions ?: CompactionSummaryCompletionOptions ,
6362 ) : Promise < string > ;
6463 (
@@ -70,7 +69,7 @@ type GenerateSummaryCompat = {
7069 signal ?: AbortSignal ,
7170 customInstructions ?: string ,
7271 previousSummary ?: string ,
73- thinkingLevel ?: ThinkLevel ,
72+ thinkingLevel ?: ThinkingLevel ,
7473 completionOptions ?: CompactionSummaryCompletionOptions ,
7574 ) : Promise < string > ;
7675} ;
@@ -309,7 +308,7 @@ async function summarizeChunks(params: {
309308 customInstructions ?: string ;
310309 summarizationInstructions ?: CompactionSummarizationInstructions ;
311310 previousSummary ?: string ;
312- thinkingLevel ?: ThinkLevel ;
311+ thinkingLevel ?: ThinkingLevel ;
313312 completionOptions ?: CompactionSummaryCompletionOptions ;
314313} ) : Promise < string > {
315314 if ( params . messages . length === 0 ) {
@@ -362,7 +361,7 @@ function generateSummary(
362361 signal : AbortSignal ,
363362 customInstructions ?: string ,
364363 previousSummary ?: string ,
365- thinkingLevel ?: ThinkLevel ,
364+ thinkingLevel ?: ThinkingLevel ,
366365 completionOptions ?: CompactionSummaryCompletionOptions ,
367366) : Promise < string > {
368367 if ( piGenerateSummary . length >= 8 || thinkingLevel || completionOptions ) {
@@ -406,7 +405,7 @@ export async function summarizeWithFallback(params: {
406405 customInstructions ?: string ;
407406 summarizationInstructions ?: CompactionSummarizationInstructions ;
408407 previousSummary ?: string ;
409- thinkingLevel ?: ThinkLevel ;
408+ thinkingLevel ?: ThinkingLevel ;
410409 completionOptions ?: CompactionSummaryCompletionOptions ;
411410} ) : Promise < string > {
412411 const { messages, contextWindow } = params ;
@@ -472,7 +471,7 @@ export async function summarizeInStages(params: {
472471 customInstructions ?: string ;
473472 summarizationInstructions ?: CompactionSummarizationInstructions ;
474473 previousSummary ?: string ;
475- thinkingLevel ?: ThinkLevel ;
474+ thinkingLevel ?: ThinkingLevel ;
476475 parts ?: number ;
477476 minMessagesForSplit ?: number ;
478477 completionOptions ?: CompactionSummaryCompletionOptions ;
0 commit comments