fix: handle Windows backslash path separator in grep_search tool - #13043
Open
rekha0suthar wants to merge 1 commit into
Open
fix: handle Windows backslash path separator in grep_search tool#13043rekha0suthar wants to merge 1 commit into
rekha0suthar wants to merge 1 commit into
Conversation
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
1 similar comment
Author
|
I have read the CLA Document and I hereby sign the CLA |
Author
|
recheck |
rekha0suthar
force-pushed
the
fix/windows-grep-search-backslash
branch
from
July 28, 2026 07:12
9a2a921 to
842d760
Compare
Author
|
recheck |
On Windows, ripgrep outputs file paths with a backslash prefix (e.g.
`.\path\to\file`) instead of the forward-slash prefix (`./path/to/file`)
used on Unix systems. The existing check only matched `./`, causing the
grep_search tool to return no results on Windows.
Added `line.startsWith(".\\")` to the path-detection condition so that
Windows-style paths are correctly identified as file headers.
Fixes continuedev#13027
rekha0suthar
force-pushed
the
fix/windows-grep-search-backslash
branch
from
July 28, 2026 07:26
842d760 to
30974a5
Compare
Author
|
I have read the CLA Document and I hereby sign the CLA |
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.
Problem
On Windows, ripgrep outputs file paths prefixed with a backslash separator (e.g.
.\path\to\file.ts) instead of the Unix-style forward slash (e.g../path/to/file.ts).The
formatGrepSearchResultsfunction incore/util/grepSearch.tsonly checked forline.startsWith("./")when identifying file header lines, so on Windows none of the lines were detected as file paths, and thegrep_searchtool silently returned zero results for every query.Root Cause
Fix
Added a second check for the Windows backslash prefix:
This is a one-line surgical fix with no risk of affecting Unix behaviour.
Testing
./prefix still matched correctly.\prefix now detected, file headers correctly identified, results returnedFixes #13027
🤖 Generated with Claude Code