Skip to content

Comments

Revert "feat(ui): add source indicators to slash commands"#19695

Merged
jacob314 merged 1 commit intomainfrom
revert-18839-security
Feb 20, 2026
Merged

Revert "feat(ui): add source indicators to slash commands"#19695
jacob314 merged 1 commit intomainfrom
revert-18839-security

Conversation

@ehedlund
Copy link
Contributor

Reverts #18839

@ehedlund ehedlund requested a review from a team as a code owner February 20, 2026 19:59
@gemini-cli
Copy link
Contributor

gemini-cli bot commented Feb 20, 2026

Hi @ehedlund, thank you so much for your contribution to Gemini CLI! We really appreciate the time and effort you've put into this.

We're making some updates to our contribution process to improve how we track and review changes. Please take a moment to review our recent discussion post: Improving Our Contribution Process & Introducing New Guidelines.

Key Update: Starting January 26, 2026, the Gemini CLI project will require all pull requests to be associated with an existing issue. Any pull requests not linked to an issue by that date will be automatically closed.

Thank you for your understanding and for being a part of our community!

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @ehedlund, 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 reverts a previous feature that introduced source indicators (namespaces) for slash commands. The revert streamlines the command loading and conflict resolution process by eliminating the namespace concept. Instead, conflicting extension commands are now automatically renamed using a dot notation (e.g., extensionName.commandName) and their descriptions are prefixed with the extension's name for clarity. This change simplifies the command structure and how conflicts are handled.

Highlights

  • Namespace Removal: The namespace property has been removed from the SlashCommand interface and all related command loading and processing logic.
  • Simplified Conflict Resolution: The command conflict resolution mechanism has been refactored, inlining the logic and removing dedicated helper methods for resolving full names and conflicts.
  • Updated Naming Convention: Conflicting extension commands are now renamed using a dot notation (e.g., extensionName.commandName) instead of the previous colon-separated namespace format.
  • Enhanced Command Descriptions: Extension command descriptions are now automatically prefixed with [extensionName] to clearly indicate their source.
  • Test Suite Updates: Associated test cases have been updated to reflect the removal of namespaces and the new conflict resolution and description formatting.
Changelog
  • packages/cli/src/services/CommandService.test.ts
    • Updated mock command creation to remove namespace parameter.
    • Modified test descriptions and assertions to reflect new command naming and description conventions for conflict resolution.
  • packages/cli/src/services/CommandService.ts
    • Removed resolveFullName, resolveConflict, and emitConflicts static methods.
    • Refactored command conflict resolution logic directly into the loadCommands method.
    • Adjusted conflict renaming to use dot notation (extensionName.commandName) instead of colon-separated namespaces.
    • Made the emitSlashCommandConflicts call conditional.
  • packages/cli/src/services/FileCommandLoader.test.ts
    • Removed osUtils.js mock.
    • Updated assertions to expect [extensionName] prefix in extension command descriptions.
    • Deleted tests related to command namespaces.
  • packages/cli/src/services/FileCommandLoader.ts
    • Removed namespace property from CommandDirectory interface and parseAndAdaptFile parameters.
    • Eliminated namespace assignment during command directory processing and SlashCommand creation.
    • Implemented logic to prepend [extensionName] to extension command descriptions.
  • packages/cli/src/ui/commands/types.ts
    • Removed the namespace property from the SlashCommand interface.
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 reverts the previous implementation of slash command source indicators that used a namespace property and colon-separated names. It introduces a new approach where extension command conflicts are resolved by prepending extensionName. to the command name, and the command's description is prefixed with [extensionName] to indicate its source. The changes are consistent across the command service, file loader, and type definitions, and the accompanying test updates correctly reflect the new logic. The new implementation for conflict resolution appears robust. Overall, the changes are well-executed and I don't see any issues.

@jacob314 jacob314 enabled auto-merge February 20, 2026 20:01
Copy link
Contributor

@jacob314 jacob314 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions
Copy link

Size Change: -811 B (0%)

Total Size: 25.2 MB

ℹ️ View Unchanged
Filename Size Change
./bundle/gemini.js 25.2 MB -811 B (0%)
./bundle/sandbox-macos-permissive-open.sb 890 B 0 B
./bundle/sandbox-macos-permissive-proxied.sb 1.31 kB 0 B
./bundle/sandbox-macos-restrictive-open.sb 3.36 kB 0 B
./bundle/sandbox-macos-restrictive-proxied.sb 3.56 kB 0 B
./bundle/sandbox-macos-strict-open.sb 4.82 kB 0 B
./bundle/sandbox-macos-strict-proxied.sb 5.02 kB 0 B

compressed-size-action

@jacob314 jacob314 added this pull request to the merge queue Feb 20, 2026
@gemini-cli gemini-cli bot added the status/need-issue Pull requests that need to have an associated issue. label Feb 20, 2026
Merged via the queue into main with commit 49b2e76 Feb 20, 2026
29 checks passed
@jacob314 jacob314 deleted the revert-18839-security branch February 20, 2026 20:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

status/need-issue Pull requests that need to have an associated issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants