-
Notifications
You must be signed in to change notification settings - Fork 9.2k
refactor: remove read-many-files tool from agent #12796
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @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 Highlights
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.
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.
|
Size Change: +15 B (0%) Total Size: 20.5 MB ℹ️ View Unchanged
|
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.
7856aef to
9634c3c
Compare
Summary
Removes the
read-many-filestool from the agent's allowed tools list to encourage the model to use parallelread-filecalls 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: RemovedReadManyFilesToolregistration.packages/core/src/core/prompts.ts: Updated system prompt to remove references toread-many-filesand explicitly instruct the model to use parallelread-filecalls for multiple files.packages/cli/src/ui/hooks/atCommandProcessor.ts: Updated to instantiateReadManyFilesTooldirectly for@fileprocessing, as it's no longer available in the tool registry.Related Issues
N/A
How to Validate
read-many-filesis not listed in the available tools.read-filecalls.@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