File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -6,8 +6,6 @@ const MAX_TOOL_CACHE_SIZE = 500
66
77/**
88 * Sync tool parameters from OpenCode's session.messages() API.
9- * This is the single source of truth for tool parameters, replacing
10- * format-specific parsing from LLM API requests.
119 */
1210export async function syncToolCache (
1311 state : SessionState ,
@@ -24,6 +22,8 @@ export async function syncToolCache(
2422 continue
2523 }
2624
25+ const alreadyPruned = state . prune . toolIds . includes ( part . callID )
26+
2727 state . toolParameters . set (
2828 part . callID ,
2929 {
@@ -35,7 +35,7 @@ export async function syncToolCache(
3535 }
3636 )
3737
38- if ( ! config . strategies . pruneTool . protectedTools . includes ( part . tool ) ) {
38+ if ( ! alreadyPruned && ! config . strategies . pruneTool . protectedTools . includes ( part . tool ) ) {
3939 state . nudgeCounter ++
4040 }
4141
You can’t perform that action at this time.
0 commit comments