mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
Migrate /privacy to new architecture (#4202)
This commit is contained in:
parent
886faa2990
commit
e584241141
6 changed files with 71 additions and 11 deletions
|
|
@ -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,
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue