fix: prevent .gitignore from filtering file mentions (fixes #5944) #5945
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.
This PR fixes issue #5944 where files in .gitignore were incorrectly being filtered from @mention suggestions in Roo Code.
Problem
When users tried to mention files using the @ syntax, files that were listed in .gitignore were not appearing in the suggestion dropdown, even though they were not in .rooignore. This was inconsistent with the expected behavior where only .rooignore should control file access in Roo Code.
Solution
Added the
--no-ignore-vcs
flag to the ripgrep command inexecuteRipgrepForFiles
function. This flag tells ripgrep to not respect version control ignore files like .gitignore, ensuring that all files (except those in .rooignore) are available for mentions.Changes
src/services/search/file-search.ts
to add--no-ignore-vcs
flag to ripgrep argumentssrc/services/search/__tests__/file-search.spec.ts
to verify the fixTesting
--no-ignore-vcs
flag is included in ripgrep argumentsFixes #5944
Important
Fixes issue #5944 by adding
--no-ignore-vcs
flag to bypass.gitignore
in file mention suggestions..gitignore
are not excluded from mention suggestions in Roo Code.--no-ignore-vcs
flag toexecuteRipgrepForFiles
infile-search.ts
to bypass.gitignore
.file-search.spec.ts
to verify--no-ignore-vcs
flag is used..gitignore
are included in search results.This description was created by
for c7d966b. You can customize this summary. It will automatically update as commits are pushed.