Migrate /privacy to new architecture (#4202)

This commit is contained in:
Abhi
2025-07-15 01:45:06 -04:00
committed by GitHub
parent 886faa2990
commit e584241141
6 changed files with 71 additions and 11 deletions

View File

@@ -247,11 +247,6 @@ export const useSlashCommandProcessor = (
description: 'set external editor preference',
action: (_mainCommand, _subCommand, _args) => openEditorDialog(),
},
{
name: 'privacy',
description: 'display the privacy notice',
action: (_mainCommand, _subCommand, _args) => openPrivacyNotice(),
},
{
name: 'stats',
altName: 'usage',
@@ -1023,7 +1018,6 @@ export const useSlashCommandProcessor = (
}, [
addMessage,
openEditorDialog,
openPrivacyNotice,
toggleCorgiMode,
savedChatTags,
config,
@@ -1125,6 +1119,9 @@ export const useSlashCommandProcessor = (
case 'theme':
openThemeDialog();
return { type: 'handled' };
case 'privacy':
openPrivacyNotice();
return { type: 'handled' };
default: {
const unhandled: never = result.dialog;
throw new Error(
@@ -1208,6 +1205,7 @@ export const useSlashCommandProcessor = (
commandContext,
addMessage,
openThemeDialog,
openPrivacyNotice,
],
);