feat(core): rename grep_search include parameter to include_pattern#20328
feat(core): rename grep_search include parameter to include_pattern#20328SandyTao520 merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @SandyTao520, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request focuses on enhancing the clarity and consistency of the Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request refactors the grep_search tool by renaming the include parameter to include_pattern for improved clarity and consistency. The change has been applied thoroughly across all relevant files, including tool definitions, implementations in both grep.ts and ripGrep.ts, utility functions, and corresponding tests. The snapshots and prompt snippets have also been updated to reflect this change. The refactoring is well-executed and improves the codebase.
|
Hi @SandyTao520, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this. We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines. Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed. Thank you for your understanding and for being a part of our community! |
|
Size Change: +262 B (0%) Total Size: 25.7 MB ℹ️ View Unchanged
|
|
|
||
| <examples> | ||
| - **Searching:** utilize search tools like ${GREP_TOOL_NAME} and ${GLOB_TOOL_NAME} with a conservative result count (\`total_max_matches\`) and a narrow scope (\`include\` and \`exclude\` parameters). | ||
| - **Searching:** utilize search tools like ${GREP_TOOL_NAME} and ${GLOB_TOOL_NAME} with a conservative result count (\`total_max_matches\`) and a narrow scope (\`include_pattern\` and \`exclude_pattern\` parameters). |
There was a problem hiding this comment.
I know we had this issue before but it' probably be smart for us to move the parameters include/exclude patterns to variables so that if we change them in one location they change everywhere
There was a problem hiding this comment.
Will do in a follow-up!
Summary
Renamed the
includeparameter toinclude_patternin thegrep_searchtool across all implementations and definitions to improve naming clarity and consistency.Details
GrepToolParamsandRipGrepToolParamsinterfaces.GrepToolandRipGrepToolimplementations to useinclude_pattern.formatGrepResultsingrep-utils.tsto support the new parameter name.Related Issues
Related to #17552
How to Validate
npm test -w @google/gemini-cli-core -- grep.test.ts ripGrep.test.tsnpm test -- integration-tests/ripgrep-real.test.tsgrep_searchstill functions correctly in the CLI with the new parameter name.Pre-Merge Checklist