This repository was archived by the owner on May 15, 2026. It is now read-only.
Commit 3ee6072
fix: Clearify codebase_search path parameter optional and clarify tool descriptions (#6877)
* fix: make search_files path parameter optional and clarify tool descriptions
- Made path parameter optional in search_files tool (defaults to workspace root)
- Updated search_files description with clearer examples
- Improved codebase_search description to clarify when to use path parameter
- Updated test snapshots to reflect the changes
This addresses confusion where LLMs were unnecessarily specifying paths when searching from project root
* revert: remove search_files changes, keep only codebase_search improvements
- Reverted all changes to src/core/prompts/tools/search-files.ts
- Reverted all changes to src/core/tools/searchFilesTool.ts
- Updated test snapshots to reflect the reverted search_files tool
- Kept the codebase_search tool description improvements as intended
* Update codebase-search.ts
Simplify codebase_search tool documentation
- Condensed description to eliminate repetitive explanations about user wording
- Reduced from 2 examples to 1 comprehensive example showing optional path usage
- Streamlined parameter descriptions to remove redundancy
- Maintained all critical requirements (English queries, semantic search, path optionality)
- Reduced documentation size by ~40% while preserving clarity
* fix: add workspace directory context to codebase_search path parameter
- Added ToolArgs import and parameter to getCodebaseSearchDescription function
- Updated path parameter description to include '(relative to the current workspace directory ${args.cwd})'
- Updated index.ts to pass args to getCodebaseSearchDescription
- Maintains consistency with other tool descriptions like list_files and search_files
---------
Co-authored-by: Roo Code <roomote@roocode.com>
Co-authored-by: Hannes Rudolph <hrudolph@gmail.com>1 parent cda67a8 commit 3ee6072
2 files changed
Lines changed: 12 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
2 | 4 | | |
3 | | - | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | | - | |
6 | | - | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
7 | 11 | | |
8 | 12 | | |
9 | 13 | | |
10 | | - | |
| 14 | + | |
11 | 15 | | |
12 | 16 | | |
13 | | - | |
| 17 | + | |
14 | 18 | | |
15 | 19 | | |
16 | | - | |
| 20 | + | |
17 | 21 | | |
18 | 22 | | |
19 | 23 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
| 42 | + | |
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| |||
0 commit comments