feat: prompt users to run /terminal-setup in supported terminals#19523
feat: prompt users to run /terminal-setup in supported terminals#19523JagjeevanAK wants to merge 2 commits intogoogle-gemini:mainfrom
Conversation
Signed-off-by: Jagjeevan Kashid <jagjeevandev97@gmail.com>
|
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Summary of ChangesHello @JagjeevanAK, 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 user-friendly feature that proactively guides users in supported terminals to configure essential multiline input keybindings. By detecting the terminal environment and checking for existing configurations, the system now intelligently prompts users to run 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 introduces a one-time prompt for users in supported terminals to configure multiline input, which is a great usability improvement. The implementation is well-structured, moving the logic into a dedicated useTerminalSetupPrompt hook and refactoring the terminal configuration to be more data-driven. The addition of comprehensive tests for the new logic is also a strong point.
Summary
One-time prompt asking users if they'd like to run
/terminal-setupwhen running inside a supported terminal (VS Code, Cursor, Windsurf, Antigravity) that doesn't have multiline keybindings configured. This is a fresh implementation addressing all feedback from the closed PR #16235.Closes #16005
Details
useTerminalSetupPrompthook interminalSetup.ts— encapsulates all prompt logic, keepingAppContainer.tsxminimal (2 lines: import + call)shouldPromptForTerminalSetup()— checks kitty protocol, terminal detection, and existing keybindings to determine if prompting is usefulTERMINAL_DATAmap +getSupportedTerminalData()— replaces switch statements, shared betweenshouldPromptForTerminalSetup()andterminalSetup()hasOurBinding()helper — DRY shared function for checking shift+enter/ctrl+enter keybinding presenceuseReffor cancelled flag — fixes the critical bug from feat: prompt users to run /terminal-setup with yes/no #16235 whereuseEffectcleanup ran on re-render, cancelling the async flow before the user could respond "yes"persistentState('terminalSetupPromptShown')— ensures the prompt is only shown once per userdebugLogger.debug()in all catch blocks instead of silently swallowing errorsshouldPromptForTerminalSetupRelated Issues
Closes #16005
Supersedes #16235
How to Validate
npx vitest run packages/cli/src/ui/utils/terminalSetup.test.ts(18 tests pass)npm run build --workspace=packages/cligemini— should see a Y/N prompt asking to configure terminalgeminiagain — prompt should NOT appear (persistent state)Pre-Merge Checklist