feat(plan): support opening and modifying plan in external editor#20348
feat(plan): support opening and modifying plan in external editor#20348
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 significantly improves the user experience in Plan Mode by allowing direct interaction with plan files using external editors. It centralizes editor management, ensures user preferences are respected, and provides immediate feedback on changes, making the plan approval workflow more efficient and adaptable to individual user habits. 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
|
|
Size Change: +3.75 kB (+0.01%) Total Size: 25.7 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request adds support for opening and modifying a plan in an external editor, which is a great feature. The implementation involves refactoring editor-spawning logic into a new editorUtils.ts utility, which is a good separation of concerns. I've found one area for improvement in the error handling and resource cleanup logic within the new utility file to make it more robust and align with established best practices and rules.
|
This is a great feature, and the separation of the editor logic into However, there are two areas that need improvement before this can be merged: 1. Resource Cleanup and Error Handling in
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request successfully adds the feature to open and modify a plan in an external editor, which is a great enhancement for usability. The refactoring of editor-spawning logic into a dedicated editorUtils.ts file improves code organization. The implementation of the refresh mechanism and the support for custom hints in the dialog footer are well done. However, I've identified a critical issue in how the editor command is executed on non-Windows platforms, which could cause the feature to fail for users with common environment variable configurations. The provided suggestion should resolve this issue.
|
@jerop regarding the comment left here, tool-modifier.ts manages the lifecycle of intercepting tool calls and generating diffs, which doesn't apply to opening a generic file #20050 (comment) |
|
One thing to note in The naive command splitting ( Comment was from review-frontend manually reviewed by jacob. |

Summary
Support opening and modifying the current plan in an external editor during Plan Mode approval.
Details
Ctrl+Xshortcut toExitPlanModeDialogto open the plan file in an external editor.editorUtils.tsutility, which is also now used bytext-buffer.ts.getPreferredEditorthroughUIActionsto ensure the user's preferred editor is respected.AskUserDialogandDialogFooterto support custom keyboard shortcut hints.Related Issues
Closes #17721
How to Validate
gemini --plan "some task"Ctrl+X.To test opening with a terminal editor like vim make sure that you have a terminal editor selected in
/editor, same applies with testing with an IDEPre-Merge Checklist