summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/hooks
diff options
context:
space:
mode:
Diffstat (limited to 'packages/cli/src/ui/hooks')
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.test.ts12
-rw-r--r--packages/cli/src/ui/hooks/slashCommandProcessor.ts10
2 files changed, 4 insertions, 18 deletions
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
index 399a923b..ab16d813 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.test.ts
@@ -206,18 +206,6 @@ describe('useSlashCommandProcessor', () => {
const getProcessor = () => getProcessorHook().result.current;
- describe('Other commands', () => {
- it('/editor should open editor dialog and return handled', async () => {
- const { handleSlashCommand } = getProcessor();
- let commandResult: SlashCommandProcessorResult | false = false;
- await act(async () => {
- commandResult = await handleSlashCommand('/editor');
- });
- expect(mockOpenEditorDialog).toHaveBeenCalled();
- expect(commandResult).toEqual({ type: 'handled' });
- });
- });
-
describe('New command registry', () => {
let ActualCommandService: typeof CommandService;
diff --git a/packages/cli/src/ui/hooks/slashCommandProcessor.ts b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
index c1c65080..237356fa 100644
--- a/packages/cli/src/ui/hooks/slashCommandProcessor.ts
+++ b/packages/cli/src/ui/hooks/slashCommandProcessor.ts
@@ -200,11 +200,6 @@ export const useSlashCommandProcessor = (
const commands: LegacySlashCommand[] = [
// `/help` and `/clear` have been migrated and REMOVED from this list.
{
- name: 'editor',
- description: 'set external editor preference',
- action: (_mainCommand, _subCommand, _args) => openEditorDialog(),
- },
- {
name: 'corgi',
action: (_mainCommand, _subCommand, _args) => {
toggleCorgiMode();
@@ -425,7 +420,6 @@ export const useSlashCommandProcessor = (
return commands;
}, [
addMessage,
- openEditorDialog,
toggleCorgiMode,
config,
session,
@@ -519,6 +513,9 @@ export const useSlashCommandProcessor = (
case 'theme':
openThemeDialog();
return { type: 'handled' };
+ case 'editor':
+ openEditorDialog();
+ return { type: 'handled' };
case 'privacy':
openPrivacyNotice();
return { type: 'handled' };
@@ -617,6 +614,7 @@ export const useSlashCommandProcessor = (
addMessage,
openThemeDialog,
openPrivacyNotice,
+ openEditorDialog,
],
);