[WIP] feat(plan): support opening and modifying current plan in editor #20050
[WIP] feat(plan): support opening and modifying current plan in editor #20050Adib234 wants to merge 1 commit into
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 by allowing direct interaction with the plan file using external editors. It integrates a new command and keybinding to facilitate this, ensuring that any modifications made externally are reloaded and acknowledged within the CLI. This change provides greater control and flexibility for users to refine their plans before final approval, streamlining the development workflow. Highlights
Changelog
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 useful feature for editing plans in an external editor. The implementation correctly handles both IDE-integrated diffs and external terminal/GUI editors. However, there are a few issues regarding UI state management and correctness of the modification detection that should be addressed to ensure a robust user experience and accurate feedback to the LLM.
|
Thanks for working on this! I've reviewed the PR and have a few pieces of feedback, primarily regarding React state management and child process execution. Blocking the Event LoopIn const result = spawnSync(command, args, {
stdio: 'inherit',
shell: process.platform === 'win32',
});Even though this is inside a Bypassing
|
|
Size Change: +6.68 kB (+0.03%) Total Size: 25.8 MB
ℹ️ View Unchanged
|
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a new feature allowing users to open the current plan in an external editor using the Ctrl + X keyboard shortcut. The changes involve updating keyboard shortcut documentation, defining a new OPEN_PLAN_IN_EDITOR command and its default key binding, and integrating this functionality into the ExitPlanModeDialog. The ExitPlanModeDialog now supports opening the plan file in an external editor (or IDE if configured), reloads the plan content if modified, and passes a planModified flag to the approval/feedback handlers. The UI's dialog footer has been enhanced to display this new shortcut. Additionally, the core editor utilities have been updated to support openFileInEditor with logic to detect file modifications and handle both GUI and terminal editors, and the exit-plan-mode tool now includes a note in the LLM content if the plan was modified by the user in an external editor.
5c9c385 to
0a48828
Compare
| | Show warning when trying to move focus away from shell input. | `Tab (no Shift)` | | ||
| | Move focus from Gemini to the active shell. | `Tab (no Shift)` | | ||
| | Move focus from the shell back to Gemini. | `Shift + Tab` | | ||
| | Open the current plan in an external editor. | `Ctrl + X` | |
There was a problem hiding this comment.
is there a way for us to reuse packages/core/src/scheduler/tool-modifier.ts instead of duplicating?
Summary
Details
Related Issues
How to Validate
Pre-Merge Checklist