Skip to content

Commit

Permalink
chore: cmd + shift+ backspace
Browse files Browse the repository at this point in the history
  • Loading branch information
DDMeaqua committed Dec 31, 2024
1 parent c5d9b11 commit d184eb6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions app/components/chat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -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) => {
Expand Down

0 comments on commit d184eb6

Please sign in to comment.