feat(tools): implement tactful extraction rework for token efficiency

- Restore precision to read_file with 1-based start_line and end_line for Gemini 3.
- Update tool descriptions to establish extraction hierarchy (rg > shell/sed > read_file).
- Codify 'Be Token-Frugal' mandate in system prompt snippets.
- Refine research workflow to allow context-based validation via search tools.
- Update unit tests and verified build integrity.
This commit is contained in:
Adam Weidman
2026-02-10 14:43:24 -05:00
parent c3b9703d7b
commit f77dc348a0
10 changed files with 201 additions and 38 deletions
+1 -1
View File
@@ -268,7 +268,7 @@ export class GlobTool extends BaseDeclarativeTool<GlobToolParams, ToolResult> {
super(
GlobTool.Name,
'FindFiles',
'Efficiently finds files matching specific glob patterns (e.g., `src/**/*.ts`, `**/*.md`), returning absolute paths sorted by modification time (newest first). Ideal for quickly locating files based on their name or path structure, especially in large codebases.',
'Finds files matching glob patterns (e.g., `src/**/*.ts`). Results are sorted by modification time (newest first). Ideal for structural discovery and identifying recent changes. **Avoid using this tool just to list files before reading them;** if you know the symbols you need, use `grep_search` directly.',
Kind.Search,
{
properties: {