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:
thzxx
2026-04-24 13:55:53 +08:00
parent 74f5e384b5
commit e4dc7f945f
+1 -1
View File
@@ -328,7 +328,7 @@ function formatToolResultForModel(toolName: string, result: ToolResult): string
query: result.query,
total_matches: result.total_matches,
total_files: result.total_files,
matches: result.matches
results: result.results
});
}