mirror of
https://github.com/QwenLM/qwen-code.git
synced 2025-12-19 09:33:53 +00:00
Introduce a small easter egg. Woof. (#412)
Also changes auto-completion and /help to skip over slash commands that don't contain a description to avoid spoiling the surprise.
This commit is contained in:
@@ -15,7 +15,7 @@ import { addMemoryEntry } from '../../config/memoryUtils.js';
|
||||
export interface SlashCommand {
|
||||
name: string;
|
||||
altName?: string;
|
||||
description: string;
|
||||
description?: string;
|
||||
action: (mainCommand: string, subCommand?: string, args?: string) => void;
|
||||
}
|
||||
|
||||
@@ -31,6 +31,7 @@ export const useSlashCommandProcessor = (
|
||||
onDebugMessage: (message: string) => void,
|
||||
openThemeDialog: () => void,
|
||||
performMemoryRefresh: () => Promise<void>, // Add performMemoryRefresh prop
|
||||
toggleCorgiMode: () => void,
|
||||
) => {
|
||||
const addMessage = useCallback(
|
||||
(message: Message) => {
|
||||
@@ -131,6 +132,12 @@ export const useSlashCommandProcessor = (
|
||||
}
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'corgi',
|
||||
action: (_mainCommand, _subCommand, _args) => {
|
||||
toggleCorgiMode();
|
||||
},
|
||||
},
|
||||
{
|
||||
name: 'quit',
|
||||
altName: 'exit',
|
||||
@@ -151,6 +158,7 @@ export const useSlashCommandProcessor = (
|
||||
showMemoryAction,
|
||||
addMemoryAction,
|
||||
addMessage,
|
||||
toggleCorgiMode,
|
||||
],
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user