feat(ui): add source indicators to slash commands#18839
feat(ui): add source indicators to slash commands#18839ehedlund merged 6 commits intogoogle-gemini:mainfrom
Conversation
Summary of ChangesHello @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 significantly enhances the user experience and security of slash commands by visually indicating their origin (user, project, or extension) directly within the suggestion list. This change provides critical context to users, helping them understand where commands come from and mitigating potential confusion or security concerns. Additionally, the PR includes improvements to how IDE connection files are discovered and prioritized, making the system more resilient and intelligent in complex development environments. Highlights
Changelog
Activity
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.
Code Review
This pull request successfully introduces source indicators for slash commands, enhancing user awareness of command origins. The changes are well-implemented across the file loader, UI types, and display components. I've identified one high-severity issue in SuggestionsDisplay.tsx where an inconsistency in using suggestion.label for layout calculation versus suggestion.value for rendering can lead to UI layout problems, which violates our guidelines on layout consistency. A code suggestion is provided to resolve this. The rest of the changes, including comprehensive tests, look good.
… to reduce code duplication.
d08b1ef
|
This is a breaking change. It breaks my non interactive (headless) mode usage of slash commands. i.e. slash command prompt="""What is the capital city of {{args}}
Return just the name of city and nothing else.
"""I previously could do the following: gemini -p "/capital Canada"Any automation or scripts with headless mode will break with new naming schema. |

Summary
This PR adds namespaces indicating a slash command's source (user, workspace, or extension). This removes ambiguity due to silent command fallthrough by clearly identifying the origin of each command.
Related Issues
Fixes https://github.com/google-gemini/maintainers-gemini-cli/issues/1218
How to Validate
/to view slash command suggestions.user:...).Pre-Merge Checklist