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 @@ -73,9 +73,6 @@ export function createPruneTool(
7373 const pruneToolIds : string [ ] = getPruneToolIds ( numericToolIds , toolIdList )
7474 state . prune . toolIds . push ( ...pruneToolIds )
7575
76- saveSessionState ( state , logger )
77- . catch ( err => logger . error ( "Failed to persist state" , { error : err . message } ) )
78-
7976 const toolMetadata = new Map < string , ToolParameterEntry > ( )
8077 for ( const id of pruneToolIds ) {
8178 const toolParameters = state . toolParameters . get ( id )
@@ -104,6 +101,9 @@ export function createPruneTool(
104101 state . stats . pruneTokenCounter = 0
105102 state . nudgeCounter = 0
106103
104+ saveSessionState ( state , logger )
105+ . catch ( err => logger . error ( "Failed to persist state" , { error : err . message } ) )
106+
107107 return formatPruningResultForTool (
108108 pruneToolIds ,
109109 toolMetadata ,
You can’t perform that action at this time.
0 commit comments