From d184eb64585562de7f75e1ff7d291eb242b2f076 Mon Sep 17 00:00:00 2001 From: DDMeaqua Date: Tue, 31 Dec 2024 14:50:54 +0800 Subject: [PATCH] chore: cmd + shift+ backspace --- app/components/chat.tsx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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) => {