diff options
| author | Joel Hooks <[email protected]> | 2025-12-17 11:57:09 -0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2025-12-17 13:57:09 -0600 |
| commit | 24430287c5a304ee35ad0089bad1907d7917dee2 (patch) | |
| tree | 57aaab0c13cb8cc56786ab2a8b4fe7c8a36d5054 /packages/plugin/src | |
| parent | 1f527312554c3015286811fc33bb5348d0a27dae (diff) | |
| download | opencode-24430287c5a304ee35ad0089bad1907d7917dee2.tar.gz opencode-24430287c5a304ee35ad0089bad1907d7917dee2.zip | |
feat(plugin): add experimental.session.compacting hook for pre-compaction context injection (#5698)
Co-authored-by: Aiden Cline <[email protected]>
Diffstat (limited to 'packages/plugin/src')
| -rw-r--r-- | packages/plugin/src/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/plugin/src/index.ts b/packages/plugin/src/index.ts index ef06a4d8b..487e6ed3e 100644 --- a/packages/plugin/src/index.ts +++ b/packages/plugin/src/index.ts @@ -191,6 +191,11 @@ export interface Hooks { system: string[] }, ) => Promise<void> + /** + * Called before session compaction starts. Allows plugins to append + * additional context to the compaction prompt. + */ + "experimental.session.compacting"?: (input: { sessionID: string }, output: { context: string[] }) => Promise<void> "experimental.text.complete"?: ( input: { sessionID: string; messageID: string; partID: string }, output: { text: string }, |
