feat(plan): support replace tool in plan mode to edit plans#18379
feat(plan): support replace tool in plan mode to edit plans#18379
replace tool in plan mode to edit plans#18379Conversation
Enable the 'replace' tool in Plan Mode to allow iterative updates to implementation plans. This change enables the agent to efficiently edit existing plan files within the plans directory without needing to rewrite the entire file using 'write_file'. - Updated plan policy to allow 'replace' on .md files in the plans directory. - Updated Plan Mode system prompt to include 'replace' tool instructions. - Added table-driven integration tests for 'write_file' and 'replace' in Plan Mode. - Updated prompt snapshots.
Summary of ChangesHello @jerop, 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 introduces support for 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 successfully enables the replace tool in Plan Mode, which will allow for more efficient, iterative updates to implementation plans. The changes are well-implemented across the policy configuration, system prompts, and integration tests. The refactoring of the tests to use a table-driven approach for both write_file and replace is a good improvement for maintainability. I have one suggestion regarding the policy definition in plan.toml to further improve maintainability by reducing code duplication.
|
Size Change: -2.33 kB (-0.01%) Total Size: 23.7 MB
ℹ️ View Unchanged
|
good idea, filed #18384 to keep track of it |

Enable the
replacetool in Plan Mode to allow iterative updates to implementation plans. This change enables the agent to efficiently edit existing plan files within the plans directory without needing to rewrite the entire file usingwrite_file.replaceon .md files in the plans directoryreplacetool instructionswrite_fileandreplacein Plan ModeCloses #18306