feat(plan): add experimental 'plan' approval mode#16753
Conversation
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 lays the foundational groundwork for a future read-only agent state by introducing an experimental 'plan' approval mode. This mode, accessible via a new CLI flag and controlled by an experimental setting, will allow the system to operate in a restricted planning state, distinguishing it from normal interactive modes. The changes include updates to configuration, documentation, and robust validation to ensure controlled access to this new feature. 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.
Code Review
This pull request introduces a new experimental 'plan' approval mode, which is intended to support a future read-only agent state. The changes correctly add the new mode and gate it behind an experimental flag. My review focuses on ensuring the new mode is integrated correctly. I've found a couple of issues in packages/cli/src/config/config.ts: an inconsistent error message and a missing case in a switch statement that leads to incorrect behavior for the new 'plan' mode in non-interactive sessions. Addressing these will improve correctness and user experience.
|
Size Change: +463 B (0%) Total Size: 23.1 MB ℹ️ View Unchanged
|
42cb18c to
fa0c987
Compare
Introduces a new 'plan' approval mode, designed to support a future read-only agent state where write operations are automatically blocked or restricted. This foundation allows the system to distinguish between normal interactive modes and this restricted planning state. The new mode is currently gated behind the `experimental.plan` setting to prevent premature usage while the underlying policy rules are being developed. When enabled, it allows users to start the CLI in this specific mode via the `--approval-mode=plan` flag.
fa0c987 to
58a75c1
Compare
jacob314
left a comment
There was a problem hiding this comment.
I'll fast follow with the fix
Introduces a new 'plan' approval mode, designed to support a future read-only agent state where write operations are automatically blocked or restricted. This foundation allows the system to distinguish between normal interactive modes and this restricted planning state.
The new mode is currently gated behind the
experimental.plansetting to prevent premature usage while the underlying policy rules are being developed. When enabled, it allows users to start the CLI in this specific mode via the--approval-mode=planflag.Closes #16618
Closes #16619