fix: correct search_files result field name in formatToolResultForModel
The search_files tool handler returns results in a 'results' field (containing per-file match arrays), but formatToolResultForModel was referencing 'result.matches' which is undefined. This caused the model to never see actual search file results, breaking the search → read tool chain workflow.
This commit is contained in:
@@ -328,7 +328,7 @@ function formatToolResultForModel(toolName: string, result: ToolResult): string
|
|||||||
query: result.query,
|
query: result.query,
|
||||||
total_matches: result.total_matches,
|
total_matches: result.total_matches,
|
||||||
total_files: result.total_files,
|
total_files: result.total_files,
|
||||||
matches: result.matches
|
results: result.results
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user