Skip to content

Conversation

@abhipatel12
Copy link
Collaborator

TLDR

This PR moves the hardcoded 'web_fetch' string used for the Web Fetch tool name into the centralized packages/core/src/tools/tool-names.ts file as WEB_FETCH_TOOL_NAME. It updates the tool implementation, policy configuration, and tests to use this exported constant.

This should be a no-op

Reviewer Test Plan

This is a refactor with no functional changes. Verification relies on the build and test suite.

  1. Checkout this branch.
  2. Run npm run build to verify there are no TypeScript errors related to imports or variable usage.
  3. Run npm run test to ensure all tests pass, specifically packages/cli/src/config/policy.test.ts which was modified.
  4. (Optional) Run npm run preflight for a comprehensive check.

Testing Matrix

🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

@abhipatel12 abhipatel12 requested a review from a team as a code owner October 15, 2025 01:39
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @abhipatel12, 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 improving code maintainability and consistency by centralizing the definition of the 'web_fetch' tool name. By replacing a hardcoded string with an exported constant, it ensures that all references to this tool name are consistent and easily manageable from a single source, reducing the risk of typos and simplifying future updates.

Highlights

  • Centralized Tool Name Definition: The hardcoded string 'web_fetch' has been moved into a new constant, WEB_FETCH_TOOL_NAME, defined in packages/core/src/tools/tool-names.ts.
  • Consistent Usage Across Files: The newly defined WEB_FETCH_TOOL_NAME constant is now used consistently across the Web Fetch tool implementation, policy configuration, and related test files.
  • No Functional Change: This pull request is a pure refactor and is expected to be a no-op, meaning it introduces no functional changes to the application's behavior.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request successfully refactors the hardcoded 'web_fetch' tool name into a centralized constant, WEB_FETCH_TOOL_NAME. The changes are applied consistently across the tool implementation, policy configuration, and related tests. This is a good practice that improves maintainability by eliminating magic strings. The implementation is correct and I have no issues to report.

@github-actions
Copy link

github-actions bot commented Oct 15, 2025

Size Change: +141 B (0%)

Total Size: 17.8 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 17.8 MB +141 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 830 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-closed.sb 3.29 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B

compressed-size-action

@abhipatel12 abhipatel12 enabled auto-merge October 16, 2025 02:33
@abhipatel12 abhipatel12 added this pull request to the merge queue Oct 16, 2025
Merged via the queue into main with commit c9c633b Oct 16, 2025
20 checks passed
@abhipatel12 abhipatel12 deleted the abhipatel12/move-web-fetch-tool-name branch October 16, 2025 03:02
thacio added a commit to thacio/auditaria that referenced this pull request Oct 17, 2025
Millsondylan pushed a commit to Millsondylan/gemini-cli-1 that referenced this pull request Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants