feat(plan): support annotating plans with feedback for iteration#20876
feat(plan): support annotating plans with feedback for iteration#20876
Conversation
Summary of ChangesHello, 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 significantly enhances the CLI's plan mode by introducing an 'annotation cycle,' allowing users to provide inline feedback and annotations directly within a plan file. Instead of simply approving or rejecting a plan, users can now instruct the agent to review these edits, fostering a more interactive and collaborative approach to plan refinement. This new capability streamlines the process of guiding the agent through complex tasks by enabling direct feedback loops and iterative plan development. 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 adds a new 'Review' option to the plan approval dialog, allowing users to have the agent iterate on an annotated plan. The implementation is well-tested and the documentation is updated. However, there is an architectural issue where a prompt string is hardcoded in the UI package (packages/cli) instead of the packages/core package, which violates the project's defined separation of concerns. The existing comment addresses this issue and is kept as is, as it does not contradict any of the provided rules.
|
Size Change: +181 B (0%) Total Size: 25.8 MB ℹ️ View Unchanged
|
jerop
left a comment
There was a problem hiding this comment.
to keep the UI simple by not adding a third option, is it possible for us to tell agent to review plan again before presenting it for approval after manual edits using Ctrl + X
Summary
This PR expands the
exit_plan_modefunctionality to allow users to easily tell the agent to review an annotated plan. This implements the "annotation cycle" where users can edit a plan file with inline feedback and seamlessly instruct the agent to review those edits instead of approving the plan.Details
Reviewoption to theApprovalOptionenum inExitPlanModeDialog.tsx.AskUserDialoginExitPlanModeDialog.tsxto include the "No, review plan edits as feedback" option.Reviewoption is selected, the CLI sends a hardcoded feedback message to the agent: "I have annotated the plan with feedback. Please review the edited plan file and update the plan accordingly."docs/cli/plan-mode.mdto document this new capability in the "Planning Workflow" section.ExitPlanModeDialog.test.tsxto verify the new flow and updated existing tests to account for the UI changes.Related Issues
Fixes #20461
How to Validate
npm run startAsk for a plan to add a new commandCtrl+Xto open the plan file in your preferred editor.No, review plan edits as feedback.Alternatively, run the unit tests:
npm test -w @google/gemini-cli -- src/ui/components/ExitPlanModeDialog.test.tsxPre-Merge Checklist