diff --git a/app/components/chat.tsx b/app/components/chat.tsx index 0d6051a31a3..9990a359e14 100644 --- a/app/components/chat.tsx +++ b/app/components/chat.tsx @@ -902,7 +902,9 @@ export function ShortcutKeyModal(props: { onClose: () => void }) { }, { title: Locale.Chat.ShortcutKey.clearContext, - keys: isMac ? ["⌘", "Shift", "k"] : ["Ctrl", "Shift", "k"], + keys: isMac + ? ["⌘", "Shift", "backspace"] + : ["Ctrl", "Shift", "backspace"], }, ]; return ( @@ -1607,11 +1609,11 @@ function _Chat() { event.preventDefault(); setShowShortcutKeyModal(true); } - // 清除上下文 command + shift + k + // 清除上下文 command + shift + backspace else if ( (event.metaKey || event.ctrlKey) && event.shiftKey && - event.key.toLowerCase() === "k" + event.key.toLowerCase() === "backspace" ) { event.preventDefault(); chatStore.updateTargetSession(session, (session) => {