mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 20:20:57 +00:00
update /editor to new slash command arch (#4153)
Co-authored-by: Abhi <abhipatel@google.com>
This commit is contained in:
parent
ab9eb9377f
commit
fbe09cd35e
7 changed files with 63 additions and 24 deletions
|
|
@ -199,11 +199,6 @@ export const useSlashCommandProcessor = (
|
|||
const legacyCommands: LegacySlashCommand[] = useMemo(() => {
|
||||
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) => {
|
||||
|
|
@ -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,
|
||||
],
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue