Agent Skills: Implement /skills reload#15865
Conversation
Summary of ChangesHello @NTaylorMullen, 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 of the Gemini CLI by introducing a 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. 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 introduces a /skills reload command, which is a great enhancement for developer experience. The implementation correctly handles backend logic in the core package and ensures UI reactivity in the CLI package through a nonce-based state update. The changes to user messages are also a good UX improvement.
I've identified two potential logic errors in the reloadSkills method in packages/core/src/config/config.ts that could lead to stale state for disabled skills and the ActivateSkillTool schema. My review includes suggestions to address these issues to make the feature more robust.
d118840 to
2f39e76
Compare
6d15fa6 to
f12cadc
Compare
2f39e76 to
55eff08
Compare
abhipatel12
left a comment
There was a problem hiding this comment.
Few comments! Lmk what you think!
f12cadc to
bab1859
Compare
0fb1f64 to
c500c34
Compare
c500c34 to
9f99a73
Compare
|
Size Change: +3.22 kB (+0.01%) Total Size: 22.2 MB
ℹ️ View Unchanged
|
4258fa7 to
cb9cc00
Compare
- Add 'reloadSkills' method to 'Config' core service to re-discover skills - Implement '/skills reload' subcommand in CLI UI - Update '/skills enable/disable' messages to suggest '/skills reload' instead of restart - Add comprehensive unit tests for reload subcommand Fixes #15726
- Add 'unregisterTool' method to ToolRegistry - Update Config.reloadSkills to register/unregister ActivateSkillTool based on skill availability - Fix logic to correctly clear disabledSkills when settings are refreshed - Enhance /skills reload feedback to show added/removed skill counts - Implement flicker prevention for reload message (100ms delay) - Add comprehensive unit tests for new reload logic in Config and skillsCommand
…d skills - Compare skill name sets before and after reload to identify specific changes - Report both additions and removals in the success message (e.g., "1 new skill discovered and 1 skill removed") - Add unit test for the mixed added/removed scenario
cb9cc00 to
3c281cb
Compare
Summary
This PR implements the
/skills reloadsubcommand, allowing users to refresh discovered agent skills without restarting the CLI session.Details
reloadSkills()to theConfigclass in Core. This method re-runs skill discovery (Extensions + Local) and re-registers theActivateSkillToolwith the updated skill list.onReloadcallback toConfigto allow it to fetch fresh settings (likedisabledSkills) from the CLI'sLoadedSettingsduring a reload.SettingsChangedevent incoreEventsand asettingsNonceinAppContainerto force a React re-render when settings are updated via slash commands. This ensures/skills listand other UI elements reflect the latest state immediately after a reload./skills reloadinpackages/cli/src/ui/commands/skillsCommand.ts. It provides visual feedback via a pending item while reloading./skills enableand/skills disableto explicitly suggest using/skills reloadfor changes to take effect, replacing the previous "Restart required" notice.skillsCommand.test.tsto verify success and error paths for the reload action.Related Issues
Fixes #15726
How to Validate
/skills disable <name>./skills reload./skills reload./skills listor agent interaction)..gemini/skillsdir) and run/skills reload.Pre-Merge Checklist