-
Notifications
You must be signed in to change notification settings - Fork 9.9k
feat: auto-execute on slash command completion functions #14584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Summary of ChangesHello @jackwotherspoon, 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 for slash commands in the CLI by enabling auto-execution for commands that require a single argument selected via a completion function. This change streamlines interaction by eliminating an extra step, making the command input process more efficient and intuitive. It builds upon previous work to enhance command auto-execution, focusing specifically on argument completions. Highlights
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request introduces a great enhancement by allowing slash commands with single-argument completion functions to auto-execute, improving user experience. The implementation is well-structured, with clear logic changes in InputPrompt.tsx and good test coverage for the new behavior. However, I've found a critical issue where two of the updated commands, /extensions update and /extensions restart, are incorrectly marked for auto-execution. These commands support multiple arguments, and auto-executing them after the first argument would break the ability to specify more than one extension.
|
Size Change: +709 B (0%) Total Size: 21.5 MB ℹ️ View Unchanged
|
abhipatel12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks!
Summary
This is the third PR in the auto-execute saga. This PR allows slash commands with completion functions that take a single argument to auto-execute.
Think
/mcp authwhere you then are suggested which server to auth too:This PR let's the command auto-execute once you hit Enter on the completion function suggestion.
Previous work:
Details
Allow built-in slash commands with completion functions to auto-execute when a completion suggestion is selected with Enter.
Before:
/mcp auth→ select server → autocompletes to/mcp auth my-server→ requires Enter again to executeAfter:
/mcp auth→ select server → executes immediatelyChanges
isArgumentCompletionandleafCommandfrom the slash completion hooksautoExecute: trueautoExecute: trueon 6 single-arg completion commands:/mcp auth,/chat resume,/chat delete,/hooks enable,/hooks disable,/restore/extensions enable,/extensions disable) keepautoExecute: falseTest Plan
Related Issues
How to Validate
Hit enter on completion suggestion for arg for command like
/chat resumeor/mcp auth--> should auto-execute.Pre-Merge Checklist