fix(cli): disable auto-completion on Shift+Tab to preserve mode cycling#19451
fix(cli): disable auto-completion on Shift+Tab to preserve mode cycling#19451NTaylorMullen merged 2 commits intomainfrom
Conversation
Summary of ChangesHello @NTaylorMullen, 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 addresses an issue where pressing Highlights
Changelog
Ignored Files
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: +52 B (0%) Total Size: 24.5 MB ℹ️ View Unchanged
|
e260d1e to
1591647
Compare
There was a problem hiding this comment.
Code Review
This pull request correctly addresses the issue of Shift+Tab unintentionally triggering auto-completion. The changes are well-implemented across the board:
- The keybindings for
ACCEPT_SUGGESTIONandACCEPT_SUGGESTION_REVERSE_SEARCHare correctly updated to excludeShift+Tab. - The separate logic for ghost text acceptance is also correctly modified to ignore
Shift+Tab. - Comprehensive unit tests have been added to verify the fix in all relevant completion modes (standard, reverse search, and ghost text), ensuring the change is robust.
- The documentation has been updated to reflect the new behavior.
The fix is thorough and well-executed. I have not found any issues of high or critical severity.
scidomino
left a comment
There was a problem hiding this comment.
Approved, but fix your testing by regenerating the keybinding docs
- Updated key bindings to explicitly require shift: false for suggestion acceptance - Ensured ghost text acceptance ignores Shift+Tab - Added unit tests for Shift+Tab completion suppression
1dc1b82 to
69ecc9d
Compare
Summary
Disables auto-completion when Shift+Tab is pressed. Shift+Tab is used to cycle approval modes (Default, Auto-Edit, Plan), and triggering auto-completion simultaneously was disruptive and unintended.
Details
defaultKeyBindingsforACCEPT_SUGGESTIONandACCEPT_SUGGESTION_REVERSE_SEARCHto explicitly requireshift: false.InputPrompt.tsxghost text acceptance logic to check!key.shiftbefore accepting.InputPrompt.test.tsxfor all completion modes (standard, reverse search, and ghost text) to ensure Shift+Tab is ignored.Related Issues
Related to the reported bug where Shift+Tab triggers unwanted auto-completion.
How to Validate
/h).Shift+Tab./help.npm test -w @google/gemini-cli -- src/ui/components/InputPrompt.test.tsxPre-Merge Checklist