-
Notifications
You must be signed in to change notification settings - Fork 88
Open
Labels
Description
Summary
When ripgrep (rg) is available on the system, automatically enable it by default instead of requiring users to explicitly set useRipgrep: true.
Background
We have two grep implementations:
- GrepTool (default): Uses git grep → system grep → JS glob fallback chain
- RipGrepTool: Uses ripgrep (
rg) - faster and has better glob support (including brace expansion like*.{ts,tsx})
Currently useRipgrep defaults to false, meaning users who have ripgrep installed don't benefit from it unless they know to enable it.
Proposed Behavior
- On startup, check if ripgrep is available (using existing
getRipgrepPath()utility) - If available AND user hasn't explicitly set
useRipgrep: false, auto-enable it - If user has explicitly disabled it (
useRipgrep: falsein config), respect that setting - Log at debug level when auto-enabling:
"Ripgrep detected, auto-enabling for faster searches"
Implementation Notes
- The check should be done once at config initialization, not on every search
getRipgrepPath()inpackages/core/src/utils/ripgrepPathResolver.tsalready handles cross-platform detection- Need to distinguish between "not set" (auto-detect) vs "explicitly false" (user disabled)
Acceptance Criteria
- Ripgrep auto-enabled when available and not explicitly disabled
- User can still disable with explicit
useRipgrep: false - No startup delay from ripgrep detection (async or cached)
- Debug log message when auto-enabling
Related
- Issue search_file_content: include glob can false-negative and trigger slow fallback #945 (brace expansion not working with git grep) - ripgrep handles this correctly