summaryrefslogtreecommitdiffhomepage
path: root/packages/plugin/src
diff options
context:
space:
mode:
authorAiden Cline <[email protected]>2026-04-13 20:14:53 -0500
committerGitHub <[email protected]>2026-04-13 20:14:53 -0500
commit34e2429c492495d059cbc63b86d02a58a1b3ca65 (patch)
treed1e7580b47f25e7f6f10e285aad37aa8b83e87fb /packages/plugin/src
parent10ba68c772b21947d7b0602b98f54fa2ea769310 (diff)
downloadopencode-34e2429c492495d059cbc63b86d02a58a1b3ca65.tar.gz
opencode-34e2429c492495d059cbc63b86d02a58a1b3ca65.zip
feat: add experimental.compaction.autocontinue hook to disable auto continuing after compaction (#22361)
Diffstat (limited to 'packages/plugin/src')
-rw-r--r--packages/plugin/src/index.ts18
1 files changed, 18 insertions, 0 deletions
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<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 },