File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 11import type { Plugin } from "@opencode-ai/plugin"
22import { getConfig } from "./lib/config"
33import { Logger } from "./lib/logger"
4+ import { loadPrompt } from "./lib/prompt"
45import { createSessionState } from "./lib/state"
56import { createPruneTool } from "./lib/strategies"
67import { createChatMessageTransformHandler , createEventHandler } from "./lib/hooks"
@@ -27,6 +28,10 @@ const plugin: Plugin = (async (ctx) => {
2728 } )
2829
2930 return {
31+ "experimental.chat.system.transform" : async ( _input : unknown , output : { system : string [ ] } ) => {
32+ const syntheticPrompt = loadPrompt ( "synthetic" )
33+ output . system . push ( syntheticPrompt )
34+ } ,
3035 "experimental.chat.messages.transform" : createChatMessageTransformHandler (
3136 ctx . client ,
3237 state ,
Original file line number Diff line number Diff line change @@ -92,6 +92,7 @@ export const prune = (
9292 messages : WithParts [ ]
9393) : void => {
9494 pruneToolOutputs ( state , logger , messages )
95+ // more prune methods coming here
9596}
9697
9798const pruneToolOutputs = (
You can’t perform that action at this time.
0 commit comments