mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-23 06:04:46 +08:00
feat(frontend): add Cmd+K command palette and keyboard shortcuts (#1230)
* feat(frontend): add Cmd+K command palette and keyboard shortcuts Wire up the existing shadcn/ui Command component as a global command palette. Adds a useGlobalShortcuts hook for Cmd+K (palette), Cmd+Shift+N (new chat), Cmd+, (settings), and Cmd+/ (shortcuts help overlay). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> * fix(frontend): address Copilot review feedback on command palette - Normalize event.key with toLowerCase() for reliable Shift+key matching - Replace dead deerflow:open-settings event with router.push navigation - Use platform-appropriate Shift label (Shift+ on Windows/Linux, glyph on Mac) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> --------- Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com> Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
This commit is contained in:
@@ -274,6 +274,17 @@ export const enUS: Translations = {
|
||||
failed: "Subtask failed",
|
||||
},
|
||||
|
||||
// Shortcuts
|
||||
shortcuts: {
|
||||
searchActions: "Search actions...",
|
||||
noResults: "No results found.",
|
||||
actions: "Actions",
|
||||
keyboardShortcuts: "Keyboard Shortcuts",
|
||||
keyboardShortcutsDescription: "Navigate DeerFlow faster with keyboard shortcuts.",
|
||||
openCommandPalette: "Open Command Palette",
|
||||
toggleSidebar: "Toggle Sidebar",
|
||||
},
|
||||
|
||||
// Settings
|
||||
settings: {
|
||||
title: "Settings",
|
||||
|
||||
@@ -211,6 +211,17 @@ export interface Translations {
|
||||
failed: string;
|
||||
};
|
||||
|
||||
// Shortcuts
|
||||
shortcuts: {
|
||||
searchActions: string;
|
||||
noResults: string;
|
||||
actions: string;
|
||||
keyboardShortcuts: string;
|
||||
keyboardShortcutsDescription: string;
|
||||
openCommandPalette: string;
|
||||
toggleSidebar: string;
|
||||
};
|
||||
|
||||
// Settings
|
||||
settings: {
|
||||
title: string;
|
||||
|
||||
@@ -261,6 +261,17 @@ export const zhCN: Translations = {
|
||||
failed: "子任务失败",
|
||||
},
|
||||
|
||||
// Shortcuts
|
||||
shortcuts: {
|
||||
searchActions: "搜索操作...",
|
||||
noResults: "未找到结果。",
|
||||
actions: "操作",
|
||||
keyboardShortcuts: "键盘快捷键",
|
||||
keyboardShortcutsDescription: "使用键盘快捷键更快地操作 DeerFlow。",
|
||||
openCommandPalette: "打开命令面板",
|
||||
toggleSidebar: "切换侧边栏",
|
||||
},
|
||||
|
||||
// Settings
|
||||
settings: {
|
||||
title: "设置",
|
||||
|
||||
Reference in New Issue
Block a user