fix(cli): refresh slash command list after /skills reload#24454
fix(cli): refresh slash command list after /skills reload#24454abhipatel12 merged 1 commit intomainfrom
Conversation
- Call context.ui.reloadCommands() in skills reloadAction - Update mockCommandContext to include reloadCommands - Add test expectation to verify reloadCommands is called
Summary of ChangesHello, 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 addresses a synchronization issue where the slash command completion list would become stale after a user performed a skills reload. By explicitly triggering a UI command refresh upon completion of the reload action, the application ensures that the user interface correctly reflects the updated state of available skills. Highlights
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. Footnotes
|
|
Size Change: +29 B (0%) Total Size: 34.6 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Code Review
This pull request introduces a reloadCommands method to the UI context, ensuring that commands are reloaded after a skill reload action. It includes updates to the mock command context and the skillsCommand test to verify this behavior. I have no feedback to provide.
Summary
Refresh the slash command completion list after running
/skills reload.Details
The
/skills reloadcommand reloaded the skills in the underlying configuration but failed to notify the UI to refresh its list of available slash commands. This resulted in the completion list being stale until some other event triggered a reload. This PR adds a call tocontext.ui.reloadCommands()in thereloadActionofskillsCommand.tsand updates the necessary mocks and tests.Related Issues
N/A (Reported by user in session)
How to Validate
skillsCommand:npm test -w @google/gemini-cli -- src/ui/commands/skillsCommand.test.tscontext.ui.reloadCommandsis called when/skills reloadis executed.Pre-Merge Checklist