mirror of
https://github.com/google-gemini/gemini-cli
synced 2026-04-21 13:37:17 +00:00
fix(cli): refresh slash command list after /skills reload (#24454)
This commit is contained in:
parent
d9d51ba15b
commit
4e21e5b8a3
3 changed files with 4 additions and 0 deletions
|
|
@ -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));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue