diff options
Diffstat (limited to 'packages/cli/src/ui/hooks')
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.test.ts | 1 | ||||
| -rw-r--r-- | packages/cli/src/ui/hooks/slashCommandProcessor.ts | 4 |
2 files changed, 4 insertions, 1 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts index 2dc206d7..d9fe8530 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts @@ -101,6 +101,7 @@ describe('useSlashCommandProcessor', () => { setHistory: vi.fn().mockResolvedValue(undefined), })), getExtensions: vi.fn(() => []), + getIdeMode: vi.fn(() => false), } as unknown as Config; const mockSettings = {} as LoadedSettings; diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts index e315ba97..a2a1837d 100644 --- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts +++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts @@ -185,6 +185,8 @@ export const useSlashCommandProcessor = ( ], ); + const ideMode = config?.getIdeMode(); + useEffect(() => { const controller = new AbortController(); const load = async () => { @@ -205,7 +207,7 @@ export const useSlashCommandProcessor = ( return () => { controller.abort(); }; - }, [config]); + }, [config, ideMode]); const handleSlashCommand = useCallback( async ( |
