Skip to content

Conversation

@pm-bhatt
Copy link

This PR updates the slash command processor to allow 'exit' and 'quit' commands to be used without a leading slash, improving user experience for those accustomed to other CLI tools. It also updates the documentation and adds a test case.

(Re-submission of #13680 to resolve CLA signature issues)

@pm-bhatt pm-bhatt requested a review from a team as a code owner November 23, 2025 12:22
@google-cla
Copy link

google-cla bot commented Nov 23, 2025

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.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @pm-bhatt, 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 improves the user experience of the CLI by making the exit and quit commands more intuitive. It modifies the command processing logic to recognize these commands even when a leading slash is not provided, aligning with common conventions in other command-line interfaces. This change streamlines interaction for users familiar with such tools.

Highlights

  • Enhanced Command Recognition: The exit and quit commands can now be used without a leading slash, improving usability and aligning with common CLI patterns.
  • Command Processor Update: The slashCommandProcessor logic has been modified to correctly identify and handle exit and quit commands even when the leading slash is omitted, by internally prepending the slash for processing.
  • Documentation Update: The CLI command documentation has been updated to reflect the new behavior for exit and quit, informing users of the simplified input method.
  • New Test Case: A new test has been added to ensure the exit command without a leading slash is correctly processed by the system.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a 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 enhances the user experience by allowing exit and quit commands to be used without a leading slash. The implementation in slashCommandProcessor.ts is correct and handles case-insensitivity. The documentation and tests have also been updated. I've added one suggestion to improve the test coverage for this new feature to make it more robust against future changes.

@pm-bhatt pm-bhatt force-pushed the feat/exit-command-v2 branch from c575114 to f526ec4 Compare November 23, 2025 12:45
@pm-bhatt pm-bhatt requested a review from a team as a code owner November 23, 2025 12:45
@pm-bhatt pm-bhatt force-pushed the feat/exit-command-v2 branch from 1958f6d to 6ab29b5 Compare November 23, 2025 18:06
@pm-bhatt
Copy link
Author

@dtedesco1-at-google emini-code-assist : Can you please approve ? ?

@jackwotherspoon
Copy link
Collaborator

Just quickly tested this and exit and quit do not seem to make the application quit for me...

@pm-bhatt it seems like you removed our standard PR template which had areas for how reviewers should test, which OS types you had tested etc. Those could be helpful to see what worked for you and what was tested.

Do you have a screencast or something showing it working for you?

@pm-bhatt
Copy link
Author

@jackwotherspoon Thanks for the review 🙇🏽

I investigated the issue and found that the exit command was hanging because the CLI was waiting for the IDE to close open diffs during the disconnect process.
The default timeout for this operation was set to 10 mins updated the PR with the following changes:

  1. Fix for IDE Disconnect Hang: Added a 2-second timeout to the closeDiff calls in IdeClient.disconnect() to prevent the CLI from hanging if the IDE is unresponsive.
  2. to verify that exit and quit (case-insensitive) are correctly treated as slash commands.

I've verified these changes locally and all tests are passing. Attaching video for the same.

Regarding the PR template: I apologize if I missed filling out some sections. I have tested this on macOS.

Just quickly tested this and exit and quit do not seem to make the application quit for me...

@pm-bhatt it seems like you removed our standard PR template which had areas for how reviewers should test, which OS types you had tested etc. Those could be helpful to see what worked for you and what was tested.

Do you have a screencast or something showing it working for you?

commands.mov

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants