feat(core): support selecting Jetbrains IDEs as preferred editor#21397
feat(core): support selecting Jetbrains IDEs as preferred editor#21397SoLoHiC wants to merge 3 commits intogoogle-gemini:mainfrom
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 Gemini CLI's editor integration by introducing support for a wide array of JetBrains IDEs. Users can now select their preferred JetBrains development environment to open files and view diffs, streamlining their workflow and providing a more familiar editing experience directly from the CLI. 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 support for various JetBrains IDEs as preferred editors. The changes correctly add the new IDEs to the list of GUI editors, provide their display names, and define their command-line launchers. My review identified a critical issue in the implementation of the getDiffCommand function for these new editors, which would prevent the diff functionality from working correctly. My review includes a specific code suggestion to fix this.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for several JetBrains IDEs as preferred editors. However, a high-severity command injection vulnerability was identified where the construction of diff commands for these IDEs, combined with the use of shell: true in openDiff on Windows, could allow an attacker to execute arbitrary commands. It is recommended to avoid shell: true for these editors on Windows or to implement robust argument escaping. Additionally, the test file packages/core/src/utils/editor.test.ts introduces significant code duplication and inefficiencies, particularly with duplicated editor lists and functions redefined inside loops, which should be refactored for better maintainability.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request adds support for various JetBrains IDEs as preferred editors. No security vulnerabilities were found. The implementation correctly adds the necessary configurations for editor commands and display names; however, the changes introduce significant code duplication in the test file packages/core/src/utils/editor.test.ts, which should be addressed to improve maintainability and reduce brittleness, as highlighted by the specific comments.
|
Hi there! Thank you for your interest in contributing to Gemini CLI. To ensure we maintain high code quality and focus on our prioritized roadmap, we have updated our contribution policy (see Discussion #17383). We only guarantee review and consideration of pull requests for issues that are explicitly labeled as 'help wanted'. All other community pull requests are subject to closure after 14 days if they do not align with our current focus areas. For this reason, we strongly recommend that contributors only submit pull requests against issues explicitly labeled as 'help-wanted'. This pull request is being closed as it has been open for 14 days without a 'help wanted' designation. We encourage you to find and contribute to existing 'help wanted' issues in our backlog! Thank you for your understanding and for being part of our community! |
|
@SoLoHiC, apologies for the bot closing this PR! We have reopened it. Please sync your branch to the latest |
ede0535 to
519e26a
Compare
hi @cocosheng-g , I rebased the latest main branch. |
Summary
make a series of JetBrains IDE(IntelliiJ, WebStorm, PyCharm, GoLand, Android Studio, CLion, DataGrip, PhpStorm, RubyMine) as preferred editor option. How it looks like in Terminal:
Details
This helps all Gemini CLI x JetBrains IDE users keep all code displaying on tools they're familiar with. How it looks like in integrated terminal window of an IDE:

However, It seems JetBrains IDE's cmd is not created by default. A way to enable it via Settings in ToolBox App:

Related Issues
#21389
How to Validate
geminiin terminal./editorin gemini, editor options should be shown like pic above at Summary sec.Pre-Merge Checklist