File tree Expand file tree Collapse file tree 2 files changed +4
-3
lines changed
Expand file tree Collapse file tree 2 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ import type { SessionState, WithParts } from "../state"
22import type { Logger } from "../logger"
33import type { PluginConfig } from "../config"
44import { isMessageCompacted , getLastUserMessage } from "../shared-utils"
5- import { createSyntheticUserMessage , COMPRESS_SUMMARY_PREFIX } from "./utils"
5+ import { createSyntheticUserMessage } from "./utils"
66import type { UserMessage } from "@opencode-ai/sdk/v2"
77
88const PRUNED_TOOL_OUTPUT_REPLACEMENT =
@@ -186,7 +186,7 @@ const filterCompressedRanges = (
186186
187187 if ( userMessage ) {
188188 const userInfo = userMessage . info as UserMessage
189- const summaryContent = COMPRESS_SUMMARY_PREFIX + summary . summary
189+ const summaryContent = summary . summary
190190 result . push (
191191 createSyntheticUserMessage ( userMessage , summaryContent , userInfo . variant ) ,
192192 )
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import { sendCompressNotification } from "../ui/notification"
1010import { prune as applyPruneTransforms } from "../messages/prune"
1111
1212const COMPRESS_TOOL_DESCRIPTION = loadPrompt ( "compress-tool-spec" )
13+ const COMPRESS_SUMMARY_PREFIX = "[Compressed conversation block]\n\n"
1314
1415export function createCompressTool ( ctx : PruneToolContext ) : ReturnType < typeof tool > {
1516 return tool ( {
@@ -148,7 +149,7 @@ export function createCompressTool(ctx: PruneToolContext): ReturnType<typeof too
148149
149150 const compressSummary : CompressSummary = {
150151 anchorMessageId : startResult . messageId ,
151- summary : summary ,
152+ summary : COMPRESS_SUMMARY_PREFIX + summary ,
152153 }
153154 state . compressSummaries . push ( compressSummary )
154155
You can’t perform that action at this time.
0 commit comments