mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-07 20:00:37 -07:00
Add hidden property to slash commands (#7797)
This commit is contained in:
@@ -220,6 +220,18 @@ describe('useSlashCommandProcessor', () => {
|
||||
expect(fileAction).toHaveBeenCalledTimes(1);
|
||||
expect(builtinAction).not.toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it('should not include hidden commands in the command list', async () => {
|
||||
const visibleCommand = createTestCommand({ name: 'visible' });
|
||||
const hiddenCommand = createTestCommand({ name: 'hidden', hidden: true });
|
||||
const result = setupProcessorHook([visibleCommand, hiddenCommand]);
|
||||
|
||||
await waitFor(() => {
|
||||
expect(result.current.slashCommands).toHaveLength(1);
|
||||
});
|
||||
|
||||
expect(result.current.slashCommands[0].name).toBe('visible');
|
||||
});
|
||||
});
|
||||
|
||||
describe('Command Execution Logic', () => {
|
||||
|
||||
Reference in New Issue
Block a user