-
Notifications
You must be signed in to change notification settings - Fork 9.5k
feat(cli): custom witty message #7641
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
feat(cli): custom witty message #7641
Conversation
|
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. |
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.
Summary of Changes
Hello @JayadityaGit, 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 new feature that allows users to personalize their command-line interface experience by defining custom witty loading messages. This enhancement provides greater flexibility and user engagement during loading states, ensuring a more tailored and enjoyable interaction with the CLI without impacting existing functionality for users who prefer the default settings.
Highlights
- Custom Witty Loading Phrases: Users can now define their own array of witty loading messages in the settings configuration. During CLI processing, the system will cycle through these user-defined phrases instead of only using the default set, making the experience more personal and engaging.
- Backward Compatibility: The feature is fully backward compatible; existing setups without custom phrases will continue to use the default witty phrases without any breakage.
- Settings Schema Update: A new
customWittyPhrasesarray property has been added to theuisection of the settings schema to allow configuration of custom messages. - Loading Indicator Logic Enhancement: The
useLoadingIndicatorandusePhraseCyclerhooks have been updated to accept and utilize the custom phrases, with proper fallback to default phrases if the custom array is empty, and ensuring correct cycling and cleanup. - Comprehensive Test Coverage: New tests have been added and existing ones updated to ensure custom phrases are used correctly, defaults are used when custom phrases are absent or empty, cycling works at the expected interval, and proper cleanup occurs.
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 in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| 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 issue 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
-
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. ↩
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 nice personalization feature, allowing users to define their own witty loading phrases. The implementation is well-structured, touching the settings schema, UI components, and the underlying hooks. The changes are accompanied by thorough tests, which is great to see. I've found one potential issue in the usePhraseCycler hook related to state initialization from props, which could lead to a brief UI flicker. My feedback includes a suggested refactoring to address this, making the hook more robust.
|
Today, while configuring my email settings in GitHub, I seem to have unintentionally triggered the CLA. |
|
Thanks for the suggestion, @cornmander! I’ve updated the implementation so that users can now define their custom witty messages by adding an array in settings.json |
|
Thanks! |
(cherry picked from commit de53b30)
TLDR
This PR adds support for Custom Witty Loading Phrases (#7639).
Users can now define their own array of witty loading messages in the settings configuration. During CLI processing, the system will cycle through these user-defined phrases instead of only using the default set. This makes the experience more personal and engaging while maintaining backward compatibility.
Dive Deeper
User-Facing Feature: Custom Witty Loading Phrases
How to use this feature: 1. Open your
settings.json.2. Add a
customWittyPhrasesblock underui. For example:Restart the CLI.
Trigger a loading state (e.g., run a prompt). The CLI will now cycle through your custom phrases instead of the defaults.
This allows users to personalize their experience with custom humor, motivational notes, or team-specific messages.
Implementation details:
Settings Schema Update – Added
customWittyPhrasestosettingsSchema.ts.Loading Indicator Hook – Updated
useLoadingIndicator.tsto accept and use custom phrases.Phrase Cycler Hook – Enhanced
usePhraseCycler.tswith:Custom phrase array support
Fallback to defaults when empty
Same 15s cycling interval
Proper cleanup on switch between custom and default
Component Integration – Updated
App.tsxto pass custom witty phrases from settings to the loading indicator.Test Coverage – Added tests in
usePhraseCycler.test.tsto ensure:Custom phrases are used when provided
Defaults are used when custom array is empty
Cycling works at the expected interval
Cleanup happens correctly
Backward compatibility is preserved with the existing witty phrases, ensuring no breakage for users who don't customize.
Reviewer Test Plan
Pull this branch and run the CLI.
Add custom witty phrases in
settings.json(example above).Restart the CLI.
Trigger a loading state (e.g., run a prompt).
Confirm that the custom phrases appear and cycle every 15s.
Remove the custom phrases to confirm fallback to defaults works as expected.
Check console/logs to ensure no interval leaks or errors occur when switching between custom and default phrases.
Testing Matrix
## Testing MatrixLinked issues / bugs
Resolves #7639
Note for Reviewers
This is a backward-compatible change — existing setups without
customWittyPhraseswill continue to use the default witty phrases.Hi team, waiting for a human reviewer to proceed with this 🙂