mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-03 09:50:40 -07:00
fix(cli): refresh slash command list after /skills reload (#24454)
This commit is contained in:
@@ -61,6 +61,7 @@ export const createMockCommandContext = (
|
||||
toggleCorgiMode: vi.fn(),
|
||||
toggleShortcutsHelp: vi.fn(),
|
||||
toggleVimEnabled: vi.fn(),
|
||||
reloadCommands: vi.fn(),
|
||||
openAgentConfigDialog: vi.fn(),
|
||||
closeAgentConfigDialog: vi.fn(),
|
||||
extensionsUpdateState: new Map(),
|
||||
|
||||
@@ -528,6 +528,7 @@ describe('skillsCommand', () => {
|
||||
await actionPromise;
|
||||
|
||||
expect(reloadSkillsMock).toHaveBeenCalled();
|
||||
expect(context.ui.reloadCommands).toHaveBeenCalled();
|
||||
expect(context.ui.setPendingItem).toHaveBeenCalledWith(null);
|
||||
expect(context.ui.addItem).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
||||
@@ -285,6 +285,8 @@ async function reloadAction(
|
||||
context.ui.setPendingItem(null);
|
||||
}
|
||||
|
||||
context.ui.reloadCommands();
|
||||
|
||||
const afterSkills = skillManager.getSkills();
|
||||
const afterNames = new Set(afterSkills.map((s) => s.name));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user