fix(cli): allow perfect match @-path completions to submit on Enter - #19562
Conversation
Summary of ChangesHello @spencer426, 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 enhances the command-line interface (CLI) user experience by streamlining the autocompletion process for directory and file paths. Previously, users had to press Enter twice even when an autocompleted @-path was a perfect match. This change modifies the input prompt logic to allow immediate submission on a single Enter press for such perfect matches, making the CLI more intuitive and efficient. 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
The pull request successfully addresses the UX issue where perfect match @-path completions required an extra Enter key press to submit. By removing the explicit exclusion of CompletionMode.AT from the perfect match submission logic in InputPrompt.tsx, the CLI now allows immediate submission when the input exactly matches a file or directory suggestion. The accompanying test updates verify this new behavior, and a build-blocking type mismatch in the test utilities was also resolved. The changes are well-contained and follow the project's established patterns.
|
Size Change: -17 B (0%) Total Size: 25.2 MB ℹ️ View Unchanged
|
dc6eb2a to
85cb1de
Compare
85cb1de to
086d560
Compare
Summary
Fixes a UX bug where directory and file autocompletion was "sticky," requiring users to press Enter twice to submit a prompt even when the input exactly matched a suggestion.
Details
CompletionMode.ATfrom the "perfect match" submission logic inInputPrompt.tsx.InputPrompt.test.tsxto verify that @-paths now submit on Enter when they are a perfect match.Related Issues
Fixes #19245
How to Validate
npm run buildnode packages/cli/dist/index.js@package.jsonand press Enter.@packand press Enter.@package.jsonbut does NOT submit.Pre-Merge Checklist