feat: add experimental.compaction.autocontinue hook to disable auto continuing after compaction (#22361)

This commit is contained in:
Aiden Cline
2026-04-13 20:14:53 -05:00
committed by GitHub
parent 10ba68c772
commit 34e2429c49
3 changed files with 120 additions and 25 deletions
+18
View File
@@ -304,6 +304,24 @@ export interface Hooks {
input: { sessionID: string },
output: { context: string[]; prompt?: string },
) => Promise<void>
/**
* Called after compaction succeeds and before a synthetic user
* auto-continue message is added.
*
* - `enabled`: Defaults to `true`. Set to `false` to skip the synthetic
* user "continue" turn.
*/
"experimental.compaction.autocontinue"?: (
input: {
sessionID: string
agent: string
model: Model
provider: ProviderContext
message: UserMessage
overflow: boolean
},
output: { enabled: boolean },
) => Promise<void>
"experimental.text.complete"?: (
input: { sessionID: string; messageID: string; partID: string },
output: { text: string },