-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: Clearify codebase_search path parameter optional and clarify tool descriptions #6877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…iptions - 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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewing my own code because apparently I trust no one, not even myself.
|
@roomote-agent revert all changes to src/core/prompts/tools/search-files.ts and src/core/prompts/tools/search-files.ts, that is outside the scope that this PR is intended to fix. Make sure any tests that need to be reverted are also reverted. |
|
Hi @hannesrudolph, I see your request to revert the changes to |
…ements - 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
|
Hi @hannesrudolph, I've successfully reverted all changes to ✅ Reverted files:
✅ Kept improvements:
✅ Status:
The PR now only contains the |
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
|
@ellipsis-dev review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Important
Looks good to me! 👍
Reviewed everything up to 04ae395 in 32 seconds. Click for details.
- Reviewed
32lines of code in1files - Skipped
0files when reviewing. - Skipped posting
2draft comments. View those below. - Modify your settings and rules to customize what types of comments Ellipsis leaves. And don't forget to react with 👍 or 👎 to teach Ellipsis.
1. src/core/prompts/tools/codebase-search.ts:3
- Draft comment:
The updated description is now clearer and more concise. It effectively communicates that the tool performs semantic search over the entire workspace by default. Consider adding a note that any provided 'path' should be a subdirectory relative to the project root, just to ensure users don’t mistakenly provide absolute paths. - Reason this comment was not posted:
Confidence changes required:0%<= threshold70%None
2. src/core/prompts/tools/codebase-search.ts:16
- Draft comment:
The usage examples have been reordered to show the common case first, which is an improvement. The example now clearly demonstrates how to specify a subdirectory (e.g., 'src/auth') when needed. - Reason this comment was not posted:
Confidence changes required:0%<= threshold70%None
Workflow ID: wflow_VNTx8oT47OYbrdT9
You can customize by changing your verbosity settings, reacting with 👍 or 👎, replying to comments, or adding code review rules.
- 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
|
https://github.com/ellipsis review |
Summary
Updates the
codebase_searchtool description to prevent LLMs from unnecessarily specifying path parameters when searching from project root.Changes
Impact
Reduces unnecessary path specifications when LLMs use the codebase_search tool, improving semantic search effectiveness.
Important
Clarified
codebase_searchtool description to emphasize default workspace search and optional path parameter.getCodebaseSearchDescription()incodebase-search.tsto clarify that the tool searches the entire workspace by default.pathparameter is optional and should only be used to limit the search scope.toolDescriptionMapinindex.tsto passargstogetCodebaseSearchDescription().This description was created by
for 414e615. You can customize this summary. It will automatically update as commits are pushed.