Fix search_code to search only indexed files#103
Open
heraque wants to merge 2 commits intoDeusData:mainfrom
Open
Fix search_code to search only indexed files#103heraque wants to merge 2 commits intoDeusData:mainfrom
heraque wants to merge 2 commits intoDeusData:mainfrom
Conversation
Owner
|
Hey, I was already aware that search_code is currently the weakest tool. I have already a better version of it in the pipeline. Will keep you posted, and will try to incorporate your contribution too :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #102
Summary
This PR fixes
search_codeso that it searches only files that are part of the indexed project, instead of recursively scanning the whole repository root.The previous behavior could return matches from generated artifacts, non-indexed files, and binary outputs, which made the tool inconsistent with the indexed graph model.
What changed
search_codenow:Filenodes from the storefile_patternagainst indexed pathsgrepfor this MCP tool pathWhy this is correct
The rest of the MCP server is project-model-driven, so
search_codeshould also reflect the indexed project state.Searching only indexed files makes results:
Validation
Repository checks:
scripts/test.shscripts/lint.shRegression coverage added:
build/is ignored while the indexed source file is still returnedScope
This PR intentionally keeps the change focused to
search_codebehavior only, without changing unrelated MCP tools.