From 2884fed30d76bbfe38ecb78095be8675637ee4c5 Mon Sep 17 00:00:00 2001 From: Marco Beretta <81851188+berry-13@users.noreply.github.com> Date: Mon, 11 May 2026 23:05:36 +0200 Subject: [PATCH] feat(shortcuts): add panel/submit/bookmark/continue/read-aloud shortcuts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Wire stop, regenerate, continue, and read-aloud handlers to existing buttons via data-testid, fixing handlers that previously queried selectors with no matching DOM nodes. - Add data-testid='nav-panel-${id}' to expanded sidebar nav buttons so the panel-opener shortcuts can target them. - Add new shortcut definitions and handlers: submitMessage, bookmarkConversation, continueResponse, readAloudLastResponse, and the open* panel openers (assistants, agents, prompts, memories, parameters, files, bookmarks, MCP). - Drop the toggleRightSidebar shortcut — there is no right sidebar to toggle in this codebase. - Refresh the KeyboardShortcutsDialog layout and ShortcutRecorder for the new groups, tighten ShortcutKeyCombo styling, and surface the shortcuts hint chips in the account menu. --- .../components/Chat/Input/HeaderOptions.tsx | 9 +- .../src/components/Chat/Input/StopButton.tsx | 1 + .../components/Chat/Messages/HoverButtons.tsx | 7 + client/src/components/Nav/AccountSettings.tsx | 26 +- .../Nav/KeyboardShortcutsDialog.tsx | 303 ++++++++++-------- client/src/components/Nav/NavToggle.tsx | 2 +- .../src/components/Nav/ShortcutKeyCombo.tsx | 2 +- .../src/components/Nav/ShortcutRecorder.tsx | 67 ++-- .../UnifiedSidebar/ExpandedPanel.tsx | 1 + client/src/hooks/useKeyboardShortcuts.ts | 191 ++++++++++- client/src/locales/en/translation.json | 17 +- 11 files changed, 417 insertions(+), 209 deletions(-) diff --git a/client/src/components/Chat/Input/HeaderOptions.tsx b/client/src/components/Chat/Input/HeaderOptions.tsx index 2cdfcc2212..7b0e01a17e 100644 --- a/client/src/components/Chat/Input/HeaderOptions.tsx +++ b/client/src/components/Chat/Input/HeaderOptions.tsx @@ -7,7 +7,6 @@ import type { TPreset, TInterfaceConfig } from 'librechat-data-provider'; import { EndpointSettings, SaveAsPresetDialog, AlternativeSettings } from '~/components/Endpoints'; import { useSetIndexOptions, useLocalize } from '~/hooks'; import { useGetEndpointsQuery } from '~/data-provider'; -import { useShortcutAriaKey, useShortcutHint } from '~/hooks/useKeyboardShortcuts'; import OptionsPopover from './OptionsPopover'; import PopoverButtons from './PopoverButtons'; import { useChatContext } from '~/Providers'; @@ -25,11 +24,6 @@ export default function HeaderOptions({ const { showPopover, conversation, setShowPopover } = useChatContext(); const { setOption } = useSetIndexOptions(); const { endpoint } = conversation ?? {}; - const toggleRightSidebarHint = useShortcutHint( - 'toggleRightSidebar', - localize('com_ui_model_parameters'), - ); - const toggleRightSidebarAriaKey = useShortcutAriaKey('toggleRightSidebar'); const saveAsPreset = () => { setSaveAsDialogShow(true); @@ -57,12 +51,11 @@ export default function HeaderOptions({