Skip to content

Conversation

@JayadityaGit
Copy link
Contributor

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 customWittyPhrases block under ui. For example:

JSON
"ui": {
  "customWittyPhrases": [
    "Getting this Before GTA6",
    "Connecting to AGI"
  ]
}
  1. Restart the CLI.

  2. 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:

  1. Settings Schema Update – Added customWittyPhrases to settingsSchema.ts.

  2. Loading Indicator Hook – Updated useLoadingIndicator.ts to accept and use custom phrases.

  3. Phrase Cycler Hook – Enhanced usePhraseCycler.ts with:

    • Custom phrase array support

    • Fallback to defaults when empty

    • Same 15s cycling interval

    • Proper cleanup on switch between custom and default

  4. Component Integration – Updated App.tsx to pass custom witty phrases from settings to the loading indicator.

  5. Test Coverage – Added tests in usePhraseCycler.test.ts to 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 Matrix
🍏 🪟 🐧
npm run
npx
Docker
Podman - -
Seatbelt - -

Linked issues / bugs

Resolves #7639


Note for Reviewers

This is a backward-compatible change — existing setups without customWittyPhrases will continue to use the default witty phrases.

Hi team, waiting for a human reviewer to proceed with this 🙂

@JayadityaGit JayadityaGit requested a review from a team as a code owner September 3, 2025 11:05
@google-cla
Copy link

google-cla bot commented Sep 3, 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.

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.

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 customWittyPhrases array property has been added to the ui section of the settings schema to allow configuration of custom messages.
  • Loading Indicator Logic Enhancement: The useLoadingIndicator and usePhraseCycler hooks 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

  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 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.

@JayadityaGit
Copy link
Contributor Author

Today, while configuring my email settings in GitHub, I seem to have unintentionally triggered the CLA.

@JayadityaGit
Copy link
Contributor Author

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

@JayadityaGit JayadityaGit changed the title custom witty message feat(cli): custom witty message Sep 3, 2025
@cornmander
Copy link
Collaborator

Thanks!

@cornmander cornmander requested a review from jacob314 September 3, 2025 14:09
@cornmander cornmander enabled auto-merge September 3, 2025 16:22
@cornmander cornmander added this pull request to the merge queue Sep 3, 2025
Merged via the queue into google-gemini:main with commit de53b30 Sep 3, 2025
18 checks passed
thacio added a commit to thacio/auditaria that referenced this pull request Sep 3, 2025
acoliver referenced this pull request in vybestack/llxprt-code Sep 19, 2025
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.

Custom Witty Loading Phrases

2 participants