Allow for slash commands to opt-out of autocompletion and /help discovery. (#7847)

This commit is contained in:
DeWitt Clinton
2025-09-06 14:16:58 -07:00
committed by GitHub
parent c031f538df
commit 6b4c12eb04
8 changed files with 103 additions and 59 deletions

View File

@@ -223,18 +223,6 @@ 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', () => {