Skip to content

Conversation

@abhipatel12
Copy link
Collaborator

Summary

Removes the read-many-files tool from the agent's allowed tools list to encourage the model to use parallel read-file calls instead. This change aims to test and improve the model's ability to handle multiple file reads efficiently using standard tools.

Details

  • packages/core/src/config/config.ts: Removed ReadManyFilesTool registration.
  • packages/core/src/core/prompts.ts: Updated system prompt to remove references to read-many-files and explicitly instruct the model to use parallel read-file calls for multiple files.
  • packages/cli/src/ui/hooks/atCommandProcessor.ts: Updated to instantiate ReadManyFilesTool directly for @file processing, as it's no longer available in the tool registry.

Related Issues

N/A

How to Validate

  1. Verify Tool Removal: Start the CLI and check that read-many-files is not listed in the available tools.
  2. Verify Parallel Reads: Ask the agent to read multiple files (e.g., "read file1.ts and file2.ts") and observe if it issues parallel read-file calls.
  3. Verify @file Processing: Run a command with @file (e.g., npm start -- "what is in @packages/core/src/config/config.ts?") and ensure it processes the file content correctly before sending to the model.

Pre-Merge Checklist

  • Updated relevant documentation and README (if needed)
  • Added/updated tests (if needed)
  • Noted breaking changes (if any)
  • Validated on required platforms/methods:
    • MacOS
      • npm run

@abhipatel12 abhipatel12 requested a review from a team as a code owner November 9, 2025 21:04
@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 refactors the agent's file reading mechanism by deprecating the dedicated read-many-files tool. The primary goal is to encourage the agent to leverage parallel read-file operations, which could lead to improved performance and more granular control over file access. The changes involve updating the tool registry, modifying the system prompt to guide the model's behavior, and adjusting the CLI's internal handling of @file commands.

Highlights

  • Tool Removal: The read-many-files tool has been completely removed from the agent's allowed tools list, streamlining the available options for file reading.
  • Model Instruction Update: The system prompt has been updated to explicitly instruct the model to use parallel read-file calls when multiple files need to be accessed, encouraging more efficient file handling.
  • CLI @file Processing: The @file processing in the CLI now directly instantiates ReadManyFilesTool for its internal use, as it is no longer available via the general tool registry.
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 refactors the agent to remove the read-many-files tool, encouraging the use of parallel read-file calls instead. The changes correctly remove the tool registration and update the system prompts. However, I've found a critical copy-paste error in the system prompt update, where a line is duplicated. This error is present in packages/core/src/core/prompts.ts and is reflected in multiple snapshots within packages/core/src/core/__snapshots__/prompts.test.ts.snap. This duplication could confuse the model and needs to be fixed. I've provided comments with suggestions for each occurrence.

@github-actions
Copy link

github-actions bot commented Nov 9, 2025

Size Change: +15 B (0%)

Total Size: 20.5 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 20.4 MB +15 B (0%)
./bundle/sandbox-macos-permissive-closed.sb 1.03 kB 0 B
./bundle/sandbox-macos-permissive-open.sb 890 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

Removes read-many-files from the agent's allowed tools list to encourage parallel read-file calls.
Updates system prompt to instruct parallel read-file usage.
Updates atCommandProcessor to instantiate ReadManyFilesTool directly for @file processing.
@abhipatel12 abhipatel12 force-pushed the abhipatel12/remove-read-many branch from 7856aef to 9634c3c Compare November 9, 2025 21:16
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