🔍 Refactor and Enhance Ripgrep Tool#930
Merged
Merged
Conversation
Contributor
📋 Review SummaryThis PR refactors and enhances the ripgrep search tool with improved configuration flexibility, simplified parameters, and better resource management. The changes introduce hard limits on search results, respect for ignore files, and provide users with more control over ripgrep usage. Overall, this is a well-executed enhancement that improves the search functionality while maintaining backward compatibility where possible. 🔍 General Feedback
🎯 Specific Feedback🟡 High
🟢 Medium
🔵 Low
✅ Highlights
|
Contributor
Code Coverage Summary
CLI Package - Full Text ReportCore Package - Full Text ReportFor detailed HTML reports, please see the 'coverage-reports-22.x-ubuntu-latest' artifact from the main CI run. |
andywinnock
pushed a commit
to andywinnock/qwen-code
that referenced
this pull request
Nov 3, 2025
This was referenced May 6, 2026
xaelistic
pushed a commit
to xaelistic/qwen-code
that referenced
this pull request
Jun 7, 2026
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.
Summary
This PR refactors the ripgrep search tool with improved configuration flexibility, simplified parameters, and better resource management. The changes introduce hard limits on search results, respect for ignore files, and provide users with more control over ripgrep usage.
🎯 Key Changes
1. Smart Output Truncation with Hard Limits
MAX_LLM_CONTENT_LENGTH = 20_000characterslimitparameter for maximum matching linesWhy this matters: Prevents overwhelming the LLM context with massive search results, improving response quality and reducing token costs.
Example output:
2. Respect for Ignore Files (.gitignore & .qwenignore)
context.fileFilteringsettings.gitignoresupport (configurable viacontext.fileFiltering.respectGitIgnore).qwenignoresupport (configurable viacontext.fileFiltering.respectQwenIgnore).qwenignorewhen presentWhy this matters:
node_modules, build artifacts, and other irrelevant files from searches3. Tool Rename for Clarity
search_file_contenttogrep_searchfor better semantic clarity4. Flexible Ripgrep Configuration
tools.useBuiltinRipgrep(default:true)true: Uses bundled ripgrep binary (cross-platform)false: Falls back to systemrgcommandtools.useRipgrepistrue🔄 Breaking Changes
search_file_contenttogrep_searchImpact:
search_file_contentshould be updated togrep_searchMigration:
If you have
tools.allowedortools.excludearrays in your settings referencing the old name, update them:📝 Documentation
docs/cli/configuration.mdwith new configuration optionsuseRipgrepanduseBuiltinRipgrepsettingsLinked issues / bugs