chore: generate

This commit is contained in:
opencode-agent[bot]
2026-03-02 07:41:53 +00:00
parent be20f865ac
commit 4b9e19f72f
3 changed files with 8 additions and 4 deletions

View File

@@ -120,9 +120,8 @@ export namespace SessionCompaction {
break break
} }
} }
const hasContent = replay && messages.some( const hasContent =
(m) => m.info.role === "user" && !m.parts.some((p) => p.type === "compaction"), replay && messages.some((m) => m.info.role === "user" && !m.parts.some((p) => p.type === "compaction"))
)
if (!hasContent) { if (!hasContent) {
replay = undefined replay = undefined
messages = input.messages messages = input.messages
@@ -273,7 +272,8 @@ When constructing the summary, try to stick to this template:
const text = const text =
(input.overflow (input.overflow
? "The previous request exceeded the provider's size limit due to large media attachments. The conversation was compacted and media files were removed from context. If the user was asking about attached images or files, explain that the attachments were too large to process and suggest they try again with smaller or fewer files.\n\n" ? "The previous request exceeded the provider's size limit due to large media attachments. The conversation was compacted and media files were removed from context. If the user was asking about attached images or files, explain that the attachments were too large to process and suggest they try again with smaller or fewer files.\n\n"
: "") + "Continue if you have next steps, or stop and ask for clarification if you are unsure how to proceed." : "") +
"Continue if you have next steps, or stop and ask for clarification if you are unsure how to proceed."
await Session.updatePart({ await Session.updatePart({
id: Identifier.ascending("part"), id: Identifier.ascending("part"),
messageID: continueMsg.id, messageID: continueMsg.id,

View File

@@ -505,6 +505,7 @@ export type CompactionPart = {
messageID: string messageID: string
type: "compaction" type: "compaction"
auto: boolean auto: boolean
overflow?: boolean
} }
export type Part = export type Part =

View File

@@ -8290,6 +8290,9 @@
}, },
"auto": { "auto": {
"type": "boolean" "type": "boolean"
},
"overflow": {
"type": "boolean"
} }
}, },
"required": ["id", "sessionID", "messageID", "type", "auto"] "required": ["id", "sessionID", "messageID", "type", "auto"]