mirror of
https://github.com/sst/opencode.git
synced 2025-12-23 10:11:41 +00:00
feat(plugin): add experimental.session.compacting hook for pre-compaction context injection (#5698)
Co-authored-by: Aiden Cline <aidenpcline@gmail.com>
This commit is contained in:
parent
1f52731255
commit
24430287c5
3 changed files with 44 additions and 1 deletions
|
|
@ -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 },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue