From 34e2429c492495d059cbc63b86d02a58a1b3ca65 Mon Sep 17 00:00:00 2001 From: Aiden Cline <63023139+rekram1-node@users.noreply.github.com> Date: Mon, 13 Apr 2026 20:14:53 -0500 Subject: feat: add experimental.compaction.autocontinue hook to disable auto continuing after compaction (#22361) --- packages/plugin/src/index.ts | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'packages/plugin/src') diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index 49d995c6f..d53c23a89 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -304,6 +304,24 @@ export interface Hooks { input: { sessionID: string }, output: { context: string[]; prompt?: string }, ) => Promise + /** + * 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 "experimental.text.complete"?: ( input: { sessionID: string; messageID: string; partID: string }, output: { text: string }, -- cgit v1.2.3