feat(plan): implement plan slash command#17698
Conversation
Summary of ChangesHello @Adib234, 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 a new 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
The pull request introduces a new /plan slash command, allowing users to switch to Plan Mode and view their latest generated plan. The implementation includes a new command file (planCommand.ts) and its corresponding test file (planCommand.test.ts), along with updates to BuiltinCommandLoader.ts to register the new command. A new policy file (plan.toml) has been added to define tool execution rules for Plan Mode, ensuring a secure deny-by-default approach with specific allowances for read-only operations and controlled writing to plan files. The test coverage for the new command is comprehensive, covering various scenarios including disabled mode, no plans, and error handling. The overall feature implementation is well-structured and robust. One high-severity issue was identified regarding the use of a synchronous file system operation, which should be replaced with an asynchronous alternative.
|
Size Change: +1.89 kB (+0.01%) Total Size: 23.7 MB
ℹ️ View Unchanged
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces the new /plan slash command, enabling users to switch to Plan Mode and view their latest generated plan. The implementation correctly handles various scenarios, such as when the feature is disabled or no plans are found. Comprehensive unit tests have been added, covering the core functionality and edge cases. My primary feedback concerns a discrepancy between the documentation's description of Plan Mode as 'read-only' and the policy configuration that permits specific write operations.
d48ad42 to
0375044
Compare
0375044 to
b713344
Compare
…ode experiment is true
Summary
Implement a slash command that switches a user's approval mode to plan and displays the current plan if they generated a plan before.
Details
Related Issues
Fixes 17686
How to Validate
Switch to plan mode by running the slash command
/planIf you have no plan active (a plan that was approved in the current session), then the feedback you should get is
No active plan found. Please create and approve a plan first.If you do, then you should see your current plan with the name of the markdown file as well. Should have the same name as what's in the temp plan directory.
Pre-Merge Checklist