Local UI to run and train LLMs and diffusion models. Supports GGUF, MLX, Qwen3.8, DeepSeek-V4.1, MiniMax-H3, Gemma 4, FLUX and more.
Python agentaichatgptdeepseekfine-tuninggemmaimage-generationllamallmllmsopenaipythonqwenreinforcement-learningself-hostedstable-diffusiontext-to-speechttsuiunsloth
Studio: rework the keyboard shortcuts page (#14896)
Michael Hanb9bb997a1118
diff --git a/studio/frontend/src/components/assistant-ui/thread.tsx b/studio/frontend/src/components/assistant-ui/thread.tsxindex d3f30b795db..2651ad021f1 100644--- a/studio/frontend/src/components/assistant-ui/thread.tsx+++ b/studio/frontend/src/components/assistant-ui/thread.tsx@@ -7109,6 +7109,22 @@ const ComposerToolsMenu: FC<{}}, []);+ const [plusOpen, setPlusOpen] = useState(false);+ const setPlusMenuOpen = (open: boolean) => {+ setPlusOpen(open);+ if (open) void refreshRecentPrompts();+ };+ useShortcut(+ "openComposerMenu",+ () => {+ // The open menu inerts the composer, so closing skips the gate.+ if (plusOpen) return setPlusMenuOpen(false);+ if (!isSurfaceInForeground(COMPOSER_INPUT_SELECTOR)) return;+ setPlusMenuOpen(true);+ },+ { enabled: chatActive },+ );+const runPromptList = useCallback((items: string[], fromDialog = false) => {// A queue started while recording would swallow the held transcript send.@@ -7372,11 +7388,7 @@ const ComposerToolsMenu: FC<{}}onRunList={(items) => runPromptList(items, true)}/>- <DropdownMenu- onOpenChange={(open) => {- if (open) void refreshRecentPrompts();- }}- >+ <DropdownMenu open={plusOpen} onOpenChange={setPlusMenuOpen}><DropdownMenuTrigger asChild={true}><buttontype="button"diff --git a/studio/frontend/src/components/ui/switch.tsx b/studio/frontend/src/components/ui/switch.tsxindex 2dfa1939837..a6c7166e9fc 100644--- a/studio/frontend/src/components/ui/switch.tsx+++ b/studio/frontend/src/components/ui/switch.tsx@@ -21,7 +21,7 @@ function Switch({// Thumb travel below is width - thumb - 2 * inset; keep the inset a whole pixel, or the thumb rounds off-centre."peer group/switch relative inline-flex shrink-0 items-center rounded-full data-[size=default]:p-[calc(2px*var(--ui-space-scale,1))] data-[size=sm]:p-[calc(2px*var(--ui-space-scale,1))] outline-none transition-[background-color,box-shadow] duration-200 ease-out after:absolute after:-inset-x-3 after:-inset-y-2","data-[size=default]:h-[calc(20px*var(--ui-space-scale,1))] data-[size=default]:w-[calc(34px*var(--ui-space-scale,1))] data-[size=sm]:h-[calc(16px*var(--ui-space-scale,1))] data-[size=sm]:w-[calc(26px*var(--ui-space-scale,1))]",- "data-checked:bg-control-accent data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_13%,transparent)] dark:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_22%,transparent)] hover:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_18%,transparent)] dark:hover:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_28%,transparent)] hover:data-checked:bg-[color-mix(in_oklab,var(--control-accent),black_6%)]",+ "data-checked:bg-control-accent data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_9%,transparent)] dark:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_11%,transparent)] hover:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_13%,transparent)] dark:hover:data-unchecked:bg-[color-mix(in_oklab,var(--foreground)_14%,transparent)] hover:data-checked:bg-[color-mix(in_oklab,var(--control-accent),black_6%)]","focus-visible:ring-[3px] focus-visible:ring-ring/40 aria-invalid:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 data-disabled:cursor-not-allowed data-disabled:opacity-50",className,)}diff --git a/studio/frontend/src/features/chat/chat-page.tsx b/studio/frontend/src/features/chat/chat-page.tsxindex 820964f20be..efbe775ca6e 100644--- a/studio/frontend/src/features/chat/chat-page.tsx+++ b/studio/frontend/src/features/chat/chat-page.tsx@@ -232,7 +232,6 @@ import {providerSupportsBuiltinImageGeneration,providerSupportsBuiltinWebFetch,providerSupportsBuiltinWebSearch,- providerSupportsFastMode,reasoningFieldsAfterCatalogRefresh,resolveExternalReasoningEffort,subscribeModelCatalog,@@ -4293,20 +4292,6 @@ export function ChatPage({{ enabled: active, claims: chatUncovered },);- const fastModeSupported = providerSupportsFastMode(- activeExternalProviderType,- parseExternalModelId(inferenceCheckpoint)?.modelId ?? null,- );- useShortcut(- "toggleFastMode",- () => {- const state = useChatRuntimeStore.getState();- const next = !state.params.fastMode;- state.setParams({ ...state.params, fastMode: next });- toast.success(next ? "Fast mode on" : "Fast mode off");- },- { enabled: active && fastModeSupported, claims: chatUncovered },- );const { isMobile, pinned } = useSidebar();// The tour's orientation step spotlights the nav, so hold it open for that step. The hold is// never persisted, so a tour cannot rewrite the user's pin or the width default.diff --git a/studio/frontend/src/features/chat/shared-composer.tsx b/studio/frontend/src/features/chat/shared-composer.tsxindex a39cccbe0be..226f8331892 100644--- a/studio/frontend/src/features/chat/shared-composer.tsx+++ b/studio/frontend/src/features/chat/shared-composer.tsx@@ -2557,6 +2557,21 @@ export function SharedComposer({},{ enabled: chatActive },);+ const [plusOpen, setPlusOpen] = useState(false);+ const setPlusMenuOpen = (open: boolean) => {+ setPlusOpen(open);+ if (open) void refreshRecentPrompts();+ };+ useShortcut(+ "openComposerMenu",+ () => {+ // The open menu inerts the composer, so closing skips the gate.+ if (plusOpen) return setPlusMenuOpen(false);+ if (!isSurfaceInForeground(COMPOSER_INPUT_SELECTOR)) return;+ setPlusMenuOpen(true);+ },+ { enabled: chatActive },+ );useShortcut("stopGeneration", stop, {enabled: chatActive && busy,claims: () => isSurfaceInForeground(COMPOSER_INPUT_SELECTOR),@@ -2936,11 +2951,7 @@ export function SharedComposer({/>{/* Same + menu as single-chat (ComposerToolsMenu), wired to the compare composer's own file/audioinputs and tools. */}- <DropdownMenu- onOpenChange={(open) => {- if (open) void refreshRecentPrompts();- }}- >+ <DropdownMenu open={plusOpen} onOpenChange={setPlusMenuOpen}><DropdownMenuTrigger asChild={true}><buttontype="button"diff --git a/studio/frontend/src/features/settings/lib/keyboard-shortcuts.ts b/studio/frontend/src/features/settings/lib/keyboard-shortcuts.tsindex 49aeb5d7df1..38a94b10c60 100644--- a/studio/frontend/src/features/settings/lib/keyboard-shortcuts.ts+++ b/studio/frontend/src/features/settings/lib/keyboard-shortcuts.ts@@ -51,6 +51,7 @@ export type ShortcutId =| "approveToolRequest"| "declineToolRequest"| "attachFiles"+ | "openComposerMenu"| "cycleReasoningEffort"| "decreaseReasoningEffort"| "increaseReasoningEffort"@@ -61,7 +62,6 @@ export type ShortcutId =| "queueMessage"| "steerMessage"| "stopGeneration"- | "toggleFastMode"| "copyChatAsMarkdown"| "copySessionId"| "forkChat"@@ -220,6 +220,8 @@ export const SHORTCUT_DEFS: ShortcutDef[] = [def("declineToolRequest", "Escape", { allowBareKey: true }),def("attachFiles", null),+ // No browser or OS claims ⇧⌘. / Ctrl+Shift+., and ⌘. beside it already stops generation.+ def("openComposerMenu", "Mod+Shift+Period"),def("cycleReasoningEffort", null),def("decreaseReasoningEffort", null),def("increaseReasoningEffort", null),@@ -239,7 +241,6 @@ export const SHORTCUT_DEFS: ShortcutDef[] = [def("steerMessage", null),// ⌘. is the macOS cancel chord. Safari's Stop loading shares it, but only while a page loads.def("stopGeneration", "Mod+Period"),- def("toggleFastMode", null),def("copyChatAsMarkdown", null),// ⌥⌘C is Firefox's element picker and Safari's console, so C moves the same way U did above.@@ -257,6 +258,80 @@ export const SHORTCUT_DEFS: ShortcutDef[] = [def("openKeyboardShortcuts", "Mod+Slash"),];+export type ShortcutGroupId = "composer" | "chat" | "navigation" | "app";++export interface ShortcutGroup {+ id: ShortcutGroupId;+ labelKey: TranslationKey;+ ids: ShortcutId[];+}++function group(id: ShortcutGroupId, ids: ShortcutId[]): ShortcutGroup {+ return {+ id,+ labelKey: `settings.keyboardShortcuts.groups.${id}` as TranslationKey,+ ids,+ };+}++/** Sections of the shortcuts tab. Display only: SHORTCUT_DEFS order still owns contested chords. */+export const SHORTCUT_GROUPS: ShortcutGroup[] = [+ group("composer", [+ "sendMessage",+ "queueMessage",+ "steerMessage",+ "stopGeneration",+ "cycleReasoningEffort",+ "decreaseReasoningEffort",+ "increaseReasoningEffort",+ "startDictation",+ "attachFiles",+ "openComposerMenu",+ "openModelPicker",+ "openProjectPicker",+ "approveToolRequest",+ "declineToolRequest",+ ]),+ group("chat", [+ "archiveChat",+ "deleteSelectedChats",+ "renameChat",+ "togglePinChat",+ "markChatUnread",+ "clearAllUnreads",+ "forkChat",+ "copyChatAsMarkdown",+ "copySessionId",+ "findInPage",+ "selectAllChats",+ "clearChatSelection",+ ]),+ group("navigation", [+ "nextChat",+ "previousChat",+ "nextRecentlyViewedChat",+ "previousRecentlyViewedChat",+ "nextChatNeedingAttention",+ ...RECENT_SLOT_DEFS.map((d) => d.id),+ ...WORKSPACE_IDS,+ ]),+ group("app", [+ "newChat",+ "newTemporaryChat",+ "newStandaloneChat",+ "searchChats",+ "openCommandPalette",+ "toggleSidebar",+ "openKeyboardShortcuts",+ "openSettings",+ "newBrowserTab",+ "toggleBrowserFullView",+ "toggleApiMonitor",+ "openMcpServers",+ "logOut",+ ]),+];+export const SHORTCUT_DEF_BY_ID: Record<ShortcutId, ShortcutDef> =Object.fromEntries(SHORTCUT_DEFS.map((d) => [d.id, d])) as Record<ShortcutId,@@ -722,7 +797,7 @@ export function formatCode(code: string, mac = isMacPlatform()): string {Equal: "=",Backquote: "`",Space: "Space",- Enter: "Enter",+ Enter: mac ? "↩" : "Enter",Escape: "Esc",Backspace: mac ? "⌫" : "Backspace",Delete: "Del",diff --git a/studio/frontend/src/features/settings/settings-dialog.tsx b/studio/frontend/src/features/settings/settings-dialog.tsxindex 8d3587551bf..5c45c503316 100644--- a/studio/frontend/src/features/settings/settings-dialog.tsx+++ b/studio/frontend/src/features/settings/settings-dialog.tsx@@ -539,11 +539,18 @@ export function SettingsDialog() {!stacked && "md:max-lg:w-[min(calc(208px*var(--ui-space-scale,1)),50%)]",)}>- <div className="relative mx-1 mt-3 mb-2 shrink-0 group-data-stacked/settings:hidden">+ {/* Visual only: the dialog's sr-only DialogTitle already names it. */}+ <p+ aria-hidden={true}+ className="shrink-0 px-3 pt-3 pb-3 text-lg font-semibold text-sidebar-foreground group-data-stacked/settings:hidden"+ >+ {t("settings.dialog.title")}+ </p>+ <div className="relative mx-1 mb-3 shrink-0 group-data-stacked/settings:hidden"><HugeiconsIconicon={Search01Icon}strokeWidth={2}- className="pointer-events-none absolute top-1/2 left-2.5 size-4 -translate-y-1/2 text-muted-foreground"+ className="pointer-events-none absolute top-1/2 left-3.5 size-4 -translate-y-1/2 text-muted-foreground"/><inputvalue={query}@@ -555,9 +562,9 @@ export function SettingsDialog() {}}}data-type-to-activate="settings-search"- placeholder={t("settings.dialog.searchPlaceholder")}+ placeholder={t("common.search")}aria-label={t("settings.dialog.searchPlaceholder")}- className="h-8 w-full rounded-full border border-border bg-background pr-8 pl-8 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground focus-visible:border-ring dark:focus-visible:border-transparent dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.12*var(--contrast-wash-gain,1)))] dark:border-transparent dark:bg-[rgb(255_255_255_/_calc(0.06*var(--contrast-wash-gain,1)))]"+ className="h-[calc(36px*var(--ui-space-scale,1))] w-full rounded-full border-0 bg-accent pr-8 pl-10 text-ui-14p5 text-foreground outline-none transition-colors placeholder:text-muted-foreground dark:bg-[rgb(255_255_255_/_calc(0.1*var(--contrast-wash-gain,1)))] dark:focus-visible:bg-[rgb(255_255_255_/_calc(0.14*var(--contrast-wash-gain,1)))]"/>{query && (<button@@ -610,14 +617,6 @@ export function SettingsDialog() {)}</div>) : null}- <p- className={cn(- "shrink-0 pl-4 pt-3 pb-2.5 text-ui-13 font-medium text-muted-foreground group-data-stacked/settings:hidden",- results !== null && "hidden",- )}- >- {t("settings.dialog.title")}- </p><navref={attachRail}onScroll={onRailScroll}diff --git a/studio/frontend/src/features/settings/settings-search.ts b/studio/frontend/src/features/settings/settings-search.tsindex e0c4028f45c..6241f7aa748 100644--- a/studio/frontend/src/features/settings/settings-search.ts+++ b/studio/frontend/src/features/settings/settings-search.ts@@ -316,6 +316,7 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {"settings.keyboardShortcuts.actions.approveToolRequest.label","settings.keyboardShortcuts.actions.declineToolRequest.label","settings.keyboardShortcuts.actions.attachFiles.label",+ "settings.keyboardShortcuts.actions.openComposerMenu.label","settings.keyboardShortcuts.actions.cycleReasoningEffort.label","settings.keyboardShortcuts.actions.decreaseReasoningEffort.label","settings.keyboardShortcuts.actions.increaseReasoningEffort.label",@@ -326,7 +327,6 @@ export const SETTINGS_SEARCH_INDEX: Record<SettingsTab, TranslationKey[]> = {"settings.keyboardShortcuts.actions.queueMessage.label","settings.keyboardShortcuts.actions.steerMessage.label","settings.keyboardShortcuts.actions.stopGeneration.label",- "settings.keyboardShortcuts.actions.toggleFastMode.label","settings.keyboardShortcuts.actions.copyChatAsMarkdown.label","settings.keyboardShortcuts.actions.copySessionId.label","settings.keyboardShortcuts.actions.forkChat.label",diff --git a/studio/frontend/src/features/settings/stores/keyboard-shortcuts-store.ts b/studio/frontend/src/features/settings/stores/keyboard-shortcuts-store.tsindex f9a884966bb..52f3ab57ded 100644--- a/studio/frontend/src/features/settings/stores/keyboard-shortcuts-store.ts+++ b/studio/frontend/src/features/settings/stores/keyboard-shortcuts-store.ts@@ -24,10 +24,10 @@ import {export const KEYBOARD_SHORTCUTS_STORAGE_KEY = "unsloth_keyboard_shortcuts";const STORAGE_KEY = KEYBOARD_SHORTCUTS_STORAGE_KEY;-/** Per-slot delta. An absent slot means "use the shipped default". */+/** Per-slot delta. An absent slot means "use the shipped default"; `disabled` keeps the chords but fires none. */export type ShortcutOverrideEntry = Partial<Record<ShortcutSlot, string | null>->;+> & { disabled?: true };/*** Deltas only, so a changed default still reaches rows the user never touched.@@ -56,6 +56,9 @@ function normalizeEntry(value: unknown): ShortcutOverrideEntry | null {entry[slot] = slotValue;}}+ if ((value as Record<string, unknown>).disabled === true) {+ entry.disabled = true;+ }return Object.keys(entry).length > 0 ? entry : null;}@@ -106,14 +109,21 @@ function withSlot(const entry: ShortcutOverrideEntry = { ...overrides[id] };if (value === undefined) delete entry[slot];else entry[slot] = value;+ return withEntry(overrides, id, entry);+}++function withEntry(+ overrides: ShortcutOverrides,+ id: ShortcutId,+ entry: ShortcutOverrideEntry,+): ShortcutOverrides {const next = { ...overrides };if (Object.keys(entry).length === 0) delete next[id];else next[id] = entry;return next;}-/** The binding actually in force for one slot of `id`. */-export function resolveBinding(+export function assignedBinding(overrides: ShortcutOverrides,id: ShortcutId,slot: ShortcutSlot = "primary",@@ -123,6 +133,23 @@ export function resolveBinding(return defaultBindingFor(SHORTCUT_DEF_BY_ID[id], slot);}+export function isShortcutEnabled(+ overrides: ShortcutOverrides,+ id: ShortcutId,+): boolean {+ return overrides[id]?.disabled !== true;+}++/** The binding actually in force for one slot of `id`: none while the action is switched off. */+export function resolveBinding(+ overrides: ShortcutOverrides,+ id: ShortcutId,+ slot: ShortcutSlot = "primary",+): string | null {+ if (!isShortcutEnabled(overrides, id)) return null;+ return assignedBinding(overrides, id, slot);+}+/** Both chords in force for `id`, in slot order. */export function resolveBindings(overrides: ShortcutOverrides,@@ -220,8 +247,9 @@ export function shortcutMatchingEvent<Id extends ShortcutId>(interface KeyboardShortcutsState {overrides: ShortcutOverrides;- /** Assign a serialized binding, e.g. "Mod+Shift+KeyO". */+ /** Assign a serialized binding, e.g. "Mod+Shift+KeyO"; also switches the action back on. */setBinding: (id: ShortcutId, slot: ShortcutSlot, value: string) => void;+ setEnabled: (id: ShortcutId, enabled: boolean) => void;/** Leave the slot with no binding at all. */clearBinding: (id: ShortcutId, slot: ShortcutSlot) => void;/** Drop the override so the shipped default applies again. */@@ -236,7 +264,23 @@ export const useKeyboardShortcutsStore = create<KeyboardShortcutsState>(overrides: loadOverrides(),setBinding: (id, slot, value) =>set((state) => {- const overrides = withSlot(state.overrides, id, slot, value);+ const { disabled: _, ...entry } = state.overrides[id] ?? {};+ const overrides = withEntry(state.overrides, id, {+ ...entry,+ [slot]: value,+ });+ persist(overrides);+ return { overrides };+ }),+ setEnabled: (id, enabled) =>+ set((state) => {+ if (isShortcutEnabled(state.overrides, id) === enabled) return state;+ const { disabled: _, ...entry } = state.overrides[id] ?? {};+ const overrides = withEntry(+ state.overrides,+ id,+ enabled ? entry : { ...entry, disabled: true },+ );persist(overrides);return { overrides };}),diff --git a/studio/frontend/src/features/settings/tabs/keyboard-shortcuts-tab.tsx b/studio/frontend/src/features/settings/tabs/keyboard-shortcuts-tab.tsxindex b85e69e956e..aed1e895b76 100644--- a/studio/frontend/src/features/settings/tabs/keyboard-shortcuts-tab.tsx+++ b/studio/frontend/src/features/settings/tabs/keyboard-shortcuts-tab.tsx@@ -3,6 +3,7 @@import { Button } from "@/components/ui/button";import { Input } from "@/components/ui/input";+import { Switch } from "@/components/ui/switch";import {Tooltip,TooltipContent,@@ -14,12 +15,9 @@ import { useT } from "@/i18n";import { isTauri } from "@/lib/api-base";import { cn } from "@/lib/utils";import {- Alert01Icon,- ArrowTurnBackwardIcon,- Delete02Icon,EnergyRectangleIcon,- PencilEdit02Icon,Search01Icon,+ UndoIcon,} from "@hugeicons/core-free-icons";import { HugeiconsIcon } from "@hugeicons/react";import {@@ -31,6 +29,8 @@ import {} from "react";import {SHORTCUT_DEFS,+ SHORTCUT_DEF_BY_ID,+ SHORTCUT_GROUPS,SHORTCUT_SLOTS,type ShortcutBinding,type ShortcutDef,@@ -50,82 +50,14 @@ import {unrecordableModifier,} from "../lib/keyboard-shortcuts";import {+ assignedBinding,findConflicts,- isSlotOverridden,+ isShortcutEnabled,resolveBinding,shortcutOwningBinding,useKeyboardShortcutsStore,} from "../stores/keyboard-shortcuts-store";-/** The ⇧⌘O key cap. Plain text when the slot carries no chord. */-function Chord({- label,- tone,- note,-}: {- label: string;- tone: "assigned" | "unassigned" | "recording";- /** Why the browser may swallow this chord. Hover only, so the caps stay a- * clean column. */- note?: string;-}) {- const cap = (- <span- className={cn(- // Width hugs the chord, so ⌘, and ⇧⌘O share a left edge.- "inline-flex h-7 items-center rounded-md px-2.5 text-xs font-medium tabular-nums",- tone === "assigned" && "bg-muted text-foreground",- tone === "unassigned" && "text-muted-foreground",- tone === "recording" &&- "bg-primary/10 text-primary ring-1 ring-primary/40",- )}- >- {label}- </span>- );- if (!note) return cap;- return (- <Tooltip>- <TooltipTrigger asChild={true}>{cap}</TooltipTrigger>- <TooltipContent className="max-w-[calc(260px*var(--ui-space-scale,1))] leading-snug">- {note}- </TooltipContent>- </Tooltip>- );-}--/** Borderless pencil / trash / undo. */-function RowIconButton({- icon,- label,- onClick,- className,-}: {- icon: typeof PencilEdit02Icon;- label: string;- onClick: () => void;- className?: string;-}) {- return (- <Tooltip>- <TooltipTrigger asChild={true}>- <button- type="button"- aria-label={label}- onClick={onClick}- className={cn(- "inline-flex size-7 shrink-0 items-center justify-center rounded-md text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",- className,- )}- >- <HugeiconsIcon icon={icon} strokeWidth={1.75} className="size-4" />- </button>- </TooltipTrigger>- <TooltipContent>{label}</TooltipContent>- </Tooltip>- );-}-/** Which row and which of its two chords the recorder is listening for. */interface RecordingTarget {id: ShortcutId;@@ -136,11 +68,11 @@ export function KeyboardShortcutsTab() {const t = useT();const overrides = useKeyboardShortcutsStore((s) => s.overrides);const setBinding = useKeyboardShortcutsStore((s) => s.setBinding);+ const setEnabled = useKeyboardShortcutsStore((s) => s.setEnabled);const clearBinding = useKeyboardShortcutsStore((s) => s.clearBinding);- const resetBinding = useKeyboardShortcutsStore((s) => s.resetBinding);+ const resetAction = useKeyboardShortcutsStore((s) => s.resetAction);const resetAll = useKeyboardShortcutsStore((s) => s.resetAll);- const [query, setQuery] = useState("");const [recording, setRecording] = useState<RecordingTarget | null>(null);// Shown under the row being recorded when the pressed chord is rejected.const [recordingError, setRecordingError] = useState<string | null>(null);@@ -148,6 +80,7 @@ export function KeyboardShortcutsTab() {null,);const sendShortcut = useChatPreferencesStore((s) => s.sendShortcut);+ const [query, setQuery] = useState("");// Search the list by pressing a chord instead of typing its name.const [byKeystroke, setByKeystroke] = useState(false);const [keystroke, setKeystroke] = useState<ShortcutBinding | null>(null);@@ -156,16 +89,18 @@ export function KeyboardShortcutsTab() {const mac = isMacPlatform();const conflicts = useMemo(() => findConflicts(overrides), [overrides]);+ const stopRecording = () => {+ setRecording(null);+ setRecordingError(null);+ };+// Capture phase, so the chord being recorded reaches this listener before the// shortcut it is replacing fires and before Radix's Escape-to-close.useEffect(() => {if (!recording) return;const def = SHORTCUT_DEFS.find((entry) => entry.id === recording.id);const onKeyDown = (event: KeyboardEvent) => {- // Tab held bare is never an acceptable binding, so it is still what it was: the way out. Left- // swallowed with the rest, a row that records bare keys had no keyboard exit at all, since- // Escape is a chord there and Enter or Space on the focused pencil records instead of- // pressing it. Not prevented, so focus moves on as it would have.+ // Bare Tab is the way out where Escape records; not prevented, so the box's blur ends recording.if (event.code === "Tab" &&!event.metaKey &&@@ -178,9 +113,7 @@ export function KeyboardShortcutsTab() {}event.preventDefault();event.stopPropagation();- // Every keydown is swallowed above, so bare Escape is the only way out of recording. The- // exception is a row that takes bare keys: Escape is the chord it ships, so recording it has- // to be possible, and the pencil cancels there instead.+ // A row that takes bare keys ships Escape as its chord, so there Escape records instead.if (event.code === "Escape" &&!event.metaKey &&@@ -208,6 +141,15 @@ export function KeyboardShortcutsTab() {}return;}+ const bare =+ !binding.mod && !binding.ctrl && !binding.alt && !binding.shift;+ if (bare && (binding.code === "Backspace" || binding.code === "Delete")) {+ clearBinding(recording.id, recording.slot);+ setJustRecorded(null);+ setRecording(null);+ setRecordingError(null);+ return;+ }if (!isAcceptableBinding(binding, def?.allowBareKey)) {setRecordingError(t("settings.keyboardShortcuts.needsModifier"));return;@@ -220,7 +162,7 @@ export function KeyboardShortcutsTab() {window.addEventListener("keydown", onKeyDown, { capture: true });return () =>window.removeEventListener("keydown", onKeyDown, { capture: true });- }, [recording, setBinding, t]);+ }, [recording, setBinding, clearBinding, t]);// Capture phase, as the recorder is: the chord has to arrive before the shortcut// it names fires, and before Radix's Escape closes the dialog. The recorder owns@@ -240,12 +182,7 @@ export function KeyboardShortcutsTab() {if (binding.code === "Tab" && bare) return;event.preventDefault();event.stopPropagation();- // Escape backs out a step at a time: the chord first, then the mode. It is the one- // shipped default the box cannot take as a query (declineToolRequest): the recorder- // can free Escape because it swallows keys for a single chord, while this mode- // persists, so freeing it here would leave a focused box eating the dialog's own- // dismiss for as long as the mode is on. That row is found by name instead, where- // the query also matches the "Esc" cap. Shift+Escape is unaffected and searchable.+ // Escape clears the chord, then the mode, never the dialog; decline's bare Escape is found by name.if (binding.code === "Escape" && bare && !binding.shift) {if (keystroke) setKeystroke(null);else setByKeystroke(false);@@ -266,6 +203,7 @@ export function KeyboardShortcutsTab() {searchRef.current?.focus();};+ // Matched on assigned chords, so a switched-off row is still found by its keys.const matches = useMemo(() => {if (byKeystroke) {// Nothing pressed yet: the whole list, not an empty one.@@ -273,7 +211,7 @@ export function KeyboardShortcutsTab() {return new Set(SHORTCUT_DEFS.filter((def) =>SHORTCUT_SLOTS.some((slot) => {- const parsed = parseBinding(resolveBinding(overrides, def.id, slot));+ const parsed = parseBinding(assignedBinding(overrides, def.id, slot));return parsed ? keystrokeMatchesBinding(keystroke, parsed) : false;}),).map((def) => def.id),@@ -286,37 +224,29 @@ export function KeyboardShortcutsTab() {const haystack = `${t(def.labelKey)} ${t(def.descriptionKey)}`;if (haystack.toLowerCase().includes(q)) return true;return SHORTCUT_SLOTS.some((slot) => {- const parsed = parseBinding(resolveBinding(overrides, def.id, slot));+ const parsed = parseBinding(assignedBinding(overrides, def.id, slot));return parsed ? bindingMatchesQuery(parsed, q, mac) : false;});}).map((def) => def.id),);}, [query, t, overrides, mac, byKeystroke, keystroke]);- // One list, in registry order, so the daily rows sit above the fold.- const visible = SHORTCUT_DEFS.filter(- // A web-only row on the desktop build would bind a chord whose handler- // returns, so it is left out rather than shown as a key that does nothing.- (def) => (!matches || matches.has(def.id)) && !(isTauri && def.webOnly),- );-const startRecording = (def: ShortcutDef, slot: ShortcutSlot) => {setRecordingError(null);setJustRecorded(null);- setRecording(- recording?.id === def.id && recording.slot === slot- ? null- : { id: def.id, slot },- );+ setRecording({ id: def.id, slot });};const builtInKey = (id: ShortcutId): string | null => {if (id === "clearChatSelection") return "Esc";if (id !== "sendMessage") return null;- const send = composerShortcutLabels(sendShortcut, mac, "").send;+ const label = (draft: string) => {+ const send = composerShortcutLabels(sendShortcut, mac, draft).send;+ return mac ? send.replace("Enter", "↩") : send;+ };return sendShortcut === "mod-enter-multiline"- ? `${send} / ${composerShortcutLabels(sendShortcut, mac, "\n").send}`- : send;+ ? `${label("")} / ${label("\n")}`+ : label("");};const conflictingLabels = (id: ShortcutId): string => {@@ -337,77 +267,61 @@ export function KeyboardShortcutsTab() {.join(", ");};- /** One chord line: cap and pencil left, trash right. A row with an- * alternate stacks two. */- const renderSlot = (def: ShortcutDef, slot: ShortcutSlot): ReactNode => {- const value = resolveBinding(overrides, def.id, slot);+ const renderSlot = (+ def: ShortcutDef,+ slot: ShortcutSlot,+ enabled: boolean,+ ): ReactNode => {+ const label = t(def.labelKey);+ if (recording?.id === def.id && recording.slot === slot) {+ return (+ <input+ key={slot}+ readOnly={true}+ // biome-ignore lint/a11y/noAutofocus: the box exists only once the user picked this chord.+ autoFocus={true}+ onBlur={stopRecording}+ placeholder={t("settings.keyboardShortcuts.recording")}+ aria-label={`${t("settings.keyboardShortcuts.edit")}: ${label}`}+ className="h-8 w-[calc(12.5rem*var(--ui-space-scale,1))] rounded-xl border border-control-accent bg-background px-3 text-ui-13p5 text-foreground caret-transparent outline-none ring-1 ring-control-accent placeholder:text-muted-foreground"+ />+ );+ }+ const value = assignedBinding(overrides, def.id, slot);const parsed = parseBinding(value);- const isRecording = recording?.id === def.id && recording.slot === slot;- const slotName = t(- slot === "primary"- ? "settings.keyboardShortcuts.primarySlot"- : "settings.keyboardShortcuts.alternateSlot",- );- const reserved =- !isTauri && !isRecording && isBrowserReservedBinding(value);- const desktopOnly =- !isTauri && !isRecording && isBrowserUnreachableBinding(value, mac);const builtIn = slot === "primary" ? builtInKey(def.id) : null;-+ const text = parsed+ ? formatBindingLabel(parsed, mac)+ : (builtIn ?? t("settings.keyboardShortcuts.unassigned"));+ const chord = (+ <button+ key={slot}+ type="button"+ onClick={() => startRecording(def, slot)}+ aria-label={`${t("settings.keyboardShortcuts.edit")}: ${label}, ${text}`}+ className={cn(+ "inline-flex h-[calc(30px*var(--ui-space-scale,1))] min-w-[calc(30px*var(--ui-space-scale,1))] items-center justify-center rounded-full px-[calc(11px*var(--ui-space-scale,1))] text-ui-13p5 tabular-nums text-muted-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ // A built-in key keeps working with the switch off; only assigned chords dim.+ parsed && !enabled && "opacity-50",+ )}+ >+ {text}+ </button>+ );+ if (isTauri || !isBrowserReservedBinding(value, mac)) return chord;return (- <div key={slot} className="flex items-center justify-between gap-3">- <div className="flex items-center gap-1">- <Chord- label={- isRecording- ? t("settings.keyboardShortcuts.recording")- : parsed- ? formatBindingLabel(parsed, mac)- : builtIn- ? t("settings.keyboardShortcuts.builtInKey", {- key: builtIn,- })- : t("settings.keyboardShortcuts.unassigned")- }- tone={- isRecording ? "recording" : parsed ? "assigned" : "unassigned"- }- note={- reserved- ? t("settings.keyboardShortcuts.browserReserved")- : undefined- }- />- {desktopOnly ? (- <span className="text-xs text-muted-foreground">- {t("settings.keyboardShortcuts.desktopOnly")}- </span>- ) : null}- <RowIconButton- icon={PencilEdit02Icon}- label={`${t("settings.keyboardShortcuts.edit")} (${slotName})`}- onClick={() => startRecording(def, slot)}- />- {isSlotOverridden(overrides, def.id, slot) ? (- <RowIconButton- icon={ArrowTurnBackwardIcon}- label={`${t("settings.keyboardShortcuts.reset")} (${slotName})`}- onClick={() => resetBinding(def.id, slot)}- />- ) : null}- </div>- {parsed && !isRecording ? (- <RowIconButton- icon={Delete02Icon}- label={`${t("settings.keyboardShortcuts.clear")} (${slotName})`}- onClick={() => clearBinding(def.id, slot)}- />- ) : null}- </div>+ <Tooltip key={slot}>+ <TooltipTrigger asChild={true}>{chord}</TooltipTrigger>+ <TooltipContent className="max-w-[calc(260px*var(--ui-space-scale,1))] leading-snug">+ {t("settings.keyboardShortcuts.browserReserved")}+ </TooltipContent>+ </Tooltip>);};const renderRow = (def: ShortcutDef) => {+ const label = t(def.labelKey);+ const enabled = isShortcutEnabled(overrides, def.id);const isRecording = recording?.id === def.id;const conflicted = conflicts.has(def.id) && !isRecording;// Say which side of a clash this row is on, since only the owner runs.@@ -418,6 +332,18 @@ export function KeyboardShortcutsTab() {return !value || shortcutOwningBinding(overrides, value) !== def.id;});const clashesWith = conflicted ? conflictingLabels(def.id) : "";+ const inForce = SHORTCUT_SLOTS.map((slot) =>+ resolveBinding(overrides, def.id, slot),+ );+ const desktopOnly = isTauri+ ? ""+ : inForce+ .filter((value) => isBrowserUnreachableBinding(value, mac))+ .map((value) => {+ const parsed = parseBinding(value);+ return parsed ? formatBindingLabel(parsed, mac) : "";+ })+ .join(", ");const recordedValue =justRecorded?.id === def.id && !isRecording? resolveBinding(overrides, def.id, justRecorded.slot)@@ -426,79 +352,121 @@ export function KeyboardShortcutsTab() {!isTauri &&isBrowserReservedBinding(recordedValue, mac) &&!isBrowserUnreachableBinding(recordedValue, mac);- // Anything this action ships an alternate for keeps its line, cleared or not: hiding a cleared- // slot would take its restore control with it, and Reset all is not a way back from one edit.+ // Anything this action ships an alternate for keeps its chord, cleared or not: hiding a cleared+ // slot would take its restore control with it.const hasAlternate =defaultBindingFor(def, "alternate", mac) !== null ||- resolveBinding(overrides, def.id, "alternate") !== null ||+ assignedBinding(overrides, def.id, "alternate") !== null ||(recording?.id === def.id && recording.slot === "alternate");+ const note: ReactNode = isRecording ? (+ recordingError ? (+ <span className="text-destructive">{recordingError}</span>+ ) : null+ ) : conflicted ? (+ <span className="text-amber-600 dark:text-amber-500">+ {shadowed+ ? t("settings.keyboardShortcuts.conflictShadowed")+ : t("settings.keyboardShortcuts.conflict")}+ {clashesWith ? `: ${clashesWith}` : null}+ </span>+ ) : recordedReserved ? (+ t("settings.keyboardShortcuts.browserReserved")+ ) : desktopOnly ? (+ `${desktopOnly}: ${t("settings.keyboardShortcuts.desktopOnly")}`+ ) : null;+return (<divkey={def.id}- data-settings-label={t(def.labelKey)}- className="group/row flex items-center gap-6 py-3.5"+ data-settings-label={label}+ className="group/row flex flex-col gap-1 py-2.5">- <div className="flex min-w-0 flex-1 basis-0 flex-col gap-0.5">- <span className="text-sm font-medium text-foreground">- {t(def.labelKey)}- </span>- <span className="text-xs leading-snug text-muted-foreground">- {isRecording ? (- <span className="text-primary">- {recordingError ??- t("settings.keyboardShortcuts.recordingHint")}- </span>- ) : conflicted ? (- <span className="flex items-center gap-1 text-amber-500">- <HugeiconsIcon- icon={Alert01Icon}- strokeWidth={1.75}- className="size-3.5 shrink-0"- />- {shadowed- ? t("settings.keyboardShortcuts.conflictShadowed")- : t("settings.keyboardShortcuts.conflict")}- {clashesWith ? `: ${clashesWith}` : null}+ <div className="flex min-h-8 items-center gap-2.5">+ <Switch+ className="origin-left scale-[0.88]"+ checked={enabled}+ onCheckedChange={(on) => setEnabled(def.id, on)}+ aria-label={label}+ />+ <Tooltip>+ <TooltipTrigger asChild={true}>+ <span className="min-w-0 flex-1 truncate text-ui-13p5 text-foreground">+ {label}</span>- ) : (- t(def.descriptionKey)- )}- </span>- {recordedReserved ? (- <span className="text-xs leading-snug text-amber-500">- {t("settings.keyboardShortcuts.browserReserved")}- </span>+ </TooltipTrigger>+ <TooltipContent side="top" align="start">+ {t(def.descriptionKey)}+ </TooltipContent>+ </Tooltip>+ {Object.hasOwn(overrides, def.id) && !isRecording ? (+ <Tooltip>+ <TooltipTrigger asChild={true}>+ <button+ type="button"+ aria-label={`${t("settings.keyboardShortcuts.reset")}: ${label}`}+ onClick={() => {+ setJustRecorded(null);+ resetAction(def.id);+ }}+ className="inline-flex size-[calc(30px*var(--ui-space-scale,1))] shrink-0 items-center justify-center rounded-full text-muted-foreground opacity-0 transition-[color,background-color,opacity] hover:bg-accent hover:text-foreground focus-visible:opacity-100 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring group-hover/row:opacity-100"+ >+ <HugeiconsIcon+ icon={UndoIcon}+ strokeWidth={1.75}+ className="size-3.5"+ />+ </button>+ </TooltipTrigger>+ <TooltipContent>+ {t("settings.keyboardShortcuts.reset")}+ </TooltipContent>+ </Tooltip>) : null}+ <div className="flex shrink-0 items-center gap-2">+ {renderSlot(def, "primary", enabled)}+ {hasAlternate ? renderSlot(def, "alternate", enabled) : null}+ </div></div>- {/* pl-10 nudges the caps off the descriptions: the labels run long- enough that a bare half-and-half split left them crowding. */}- <div className="flex flex-1 basis-0 flex-col gap-1.5 pl-10">- {renderSlot(def, "primary")}- {/* Only the actions that ship an alternate have a second line: there- is no affordance for adding one. */}- {hasAlternate ? renderSlot(def, "alternate") : null}- </div>+ {note ? (+ <p className="text-xs leading-snug text-muted-foreground">{note}</p>+ ) : null}</div>);};+ const visibleGroups = SHORTCUT_GROUPS.map((group) => ({+ group,+ defs: group.ids+ .map((id) => SHORTCUT_DEF_BY_ID[id])+ .filter(+ // A web-only row on the desktop build would bind a chord whose handler+ // returns, so it is left out rather than shown as a key that does nothing.+ (def) =>+ (!matches || matches.has(def.id)) && !(isTauri && def.webOnly),+ ),+ })).filter(({ defs }) => defs.length > 0);+return (- <div className="settings-page">- <header className="flex flex-col gap-1">+ <div className="settings-page px-4">+ {/* -mx-4 undoes px-4 so the heading lines up with every other tab's. */}+ <header className="-mx-4 flex flex-col gap-1"><h1data-settings-label={t("settings.keyboardShortcuts.title")}className="text-xl font-semibold font-heading">{t("settings.keyboardShortcuts.title")}</h1>+ <p className="text-xs text-muted-foreground">+ {t("settings.keyboardShortcuts.intro")}+ </p></header><div className="relative"><HugeiconsIconicon={Search01Icon}strokeWidth={2}- className="pointer-events-none absolute left-4 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"+ className="pointer-events-none absolute left-4 top-1/2 size-3.5 -translate-y-1/2 text-muted-foreground"/><Inputref={searchRef}@@ -519,7 +487,7 @@ export function KeyboardShortcutsTab() {: "settings.keyboardShortcuts.searchPlaceholder",)}className={cn(- "h-11 rounded-full pl-11 pr-12",+ "h-10 rounded-full pl-10 pr-12 text-ui-13p5",byKeystroke && "font-medium tabular-nums",)}aria-label={t(@@ -540,14 +508,14 @@ export function KeyboardShortcutsTab() {)}onClick={toggleByKeystroke}className={cn(- "absolute right-2 top-1/2 inline-flex size-8 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",+ "absolute right-2 top-1/2 inline-flex size-7 -translate-y-1/2 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",byKeystroke && "bg-muted text-foreground",)}><HugeiconsIconicon={EnergyRectangleIcon}strokeWidth={1.75}- className="size-4"+ className="size-3.5"/></button></TooltipTrigger>@@ -561,25 +529,39 @@ export function KeyboardShortcutsTab() {</Tooltip></div>- {visible.length === 0 ? (+ {visibleGroups.length === 0 ? (<p className="text-sm text-muted-foreground">{t("settings.keyboardShortcuts.noResults")}</p>- ) : (- // No frame: the dividers alone separate the rows, and they line up- // with the heading and the search box above.- <div className="divide-y divide-border/60">{visible.map(renderRow)}</div>- )}+ ) : null}++ {visibleGroups.map(({ group, defs }) => {+ return (+ <section+ key={group.id}+ data-settings-label={t(group.labelKey)}+ className="flex flex-col"+ >+ <h2 className="settings-heading mb-1 text-ui-13 font-medium">+ {t(group.labelKey)}+ </h2>+ <div className="divide-y divide-border/60">+ {defs.map(renderRow)}+ </div>+ </section>+ );+ })}- <div className="flex justify-start pt-1">+ {/* Click-through strip; -bottom-6 undoes the scroller padding sticky would inset by. */}+ <div className="pointer-events-none sticky -bottom-6 z-10 -mb-6 mt-auto flex justify-end py-4"><Buttontype="button"- variant="outline"- size="sm"+ variant="dark"+ // Opaque disabled fill so rows never show through; dark: outranks the variant's own dark fill.+ className="pointer-events-auto h-[calc(42px*var(--ui-space-scale,1))] px-[calc(22px*var(--ui-space-scale,1))] text-ui-13 disabled:bg-[color-mix(in_oklab,var(--foreground)_34%,var(--background))] disabled:text-background disabled:opacity-100 dark:disabled:bg-[color-mix(in_oklab,var(--foreground)_42%,var(--background))] dark:disabled:text-background"disabled={Object.keys(overrides).length === 0}onClick={() => {- setRecording(null);- setRecordingError(null);+ stopRecording();setJustRecorded(null);resetAll();}}diff --git a/studio/frontend/src/i18n/locales/ar.ts b/studio/frontend/src/i18n/locales/ar.tsindex 9f5278244dc..dc6bfe07eb2 100644--- a/studio/frontend/src/i18n/locales/ar.ts+++ b/studio/frontend/src/i18n/locales/ar.ts@@ -1071,6 +1071,7 @@ export const ar = {},keyboardShortcuts: {title: "اختصارات لوحة المفاتيح",+ intro: "لتغيير اختصار، اختر تركيبة المفاتيح ثم اكتب المفاتيح الجديدة",searchPlaceholder: "بحث في الاختصارات…",keystrokePlaceholder: "اضغط اختصارًا للبحث",searchByKeystrokes: "البحث بضغط المفاتيح",@@ -1078,22 +1079,23 @@ export const ar = {noResults: "لا توجد اختصارات مطابقة لهذا البحث.",unassigned: "غير معيّن",recording: "اضغط المفاتيح…",- recordingHint: "اضغط التركيبة الجديدة، أو Esc للإلغاء.",needsModifier: "أضف ⌘ أو Ctrl أو Alt. المفتاح المجرد سيبتلع الكتابة.",conflict: "مستخدم أيضاً في اختصار آخر",conflictShadowed: "اختصار آخر يملك هذه التركيبة ويعمل بدلاً منه",edit: "تغيير الاختصار",- clear: "إزالة الاختصار",reset: "استعادة الافتراضي",resetAll: "إعادة تعيين الكل إلى الافتراضي",- primarySlot: "الاختصار",- alternateSlot: "اختصار بديل",browserReserved:"قد يحتفظ متصفحك بهذه التركيبة لنفسه. تعمل في تطبيق سطح المكتب.",metaUnsupported: "لا يمكن استخدام مفتاح Windows في الاختصارات.",altGraphUnsupported: "لا يمكن استخدام تركيبات AltGr كاختصارات.",desktopOnly: "تطبيق سطح المكتب فقط",- builtInKey: "مدمج: {key}",+ groups: {+ composer: "محرر الرسائل",+ chat: "الدردشة",+ navigation: "التنقل",+ app: "التطبيق",+ },actions: {findInPage: {label: "البحث في الصفحة",@@ -1283,6 +1285,10 @@ export const ar = {label: "إرفاق صور وملفات",description: "إضافة مرفق إلى مربع الكتابة",},+ openComposerMenu: {+ label: "فتح قائمة +",+ description: "فتح قائمة + للأدوات والمرفقات في محرر الرسائل",+ },sendMessage: {label: "إرسال الرسالة",description: "إرسال ما في مربع الكتابة",@@ -1311,10 +1317,6 @@ export const ar = {label: "خفض جهد التفكير",description: "خفض جهد التفكير مستوى واحدًا",},- toggleFastMode: {- label: "تبديل وضع Fast",- description: "تشغيل وضع Fast أو إيقافه",- },renameChat: {label: "إعادة تسمية المحادثة",description: "إعادة تسمية المحادثة الحالية",diff --git a/studio/frontend/src/i18n/locales/de.ts b/studio/frontend/src/i18n/locales/de.tsindex 0d324e8424b..6dbfe165b50 100644--- a/studio/frontend/src/i18n/locales/de.ts+++ b/studio/frontend/src/i18n/locales/de.ts@@ -1076,6 +1076,7 @@ export const de = {},keyboardShortcuts: {title: "Tastenkürzel",+ intro: "Zum Ändern eines Kürzels die Tastenkombination auswählen und dann die neuen Tasten drücken",searchPlaceholder: "Kürzel suchen…",keystrokePlaceholder: "Kürzel drücken, um zu suchen",searchByKeystrokes: "Nach Tastendruck suchen",@@ -1083,22 +1084,23 @@ export const de = {noResults: "Keine Kürzel passen zu dieser Suche.",unassigned: "Nicht zugewiesen",recording: "Tasten drücken…",- recordingHint: "Neue Tastenkombination drücken oder Esc zum Abbrechen.",needsModifier: "⌘, Strg oder Alt hinzufügen. Eine einzelne Taste würde die Eingabe verschlucken.",conflict: "Wird auch von einem anderen Kürzel verwendet",conflictShadowed: "Ein anderes Kürzel belegt diese Kombination und läuft stattdessen",edit: "Kürzel ändern",- clear: "Kürzel entfernen",reset: "Standard wiederherstellen",resetAll: "Alle auf Standard zurücksetzen",- primarySlot: "Kürzel",- alternateSlot: "Alternatives Kürzel",browserReserved:"Dein Browser behält diese Tastenkombination unter Umständen für sich. In der Desktop-App funktioniert sie.",metaUnsupported: "Die Windows-Taste kann nicht in Tastenkürzeln verwendet werden.",altGraphUnsupported: "AltGr-Kombinationen können nicht als Tastenkürzel verwendet werden.",desktopOnly: "Nur in der Desktop-App",- builtInKey: "Integriert: {key}",+ groups: {+ composer: "Eingabefeld",+ chat: "Chat",+ navigation: "Navigation",+ app: "App",+ },actions: {findInPage: {label: "Auf der Seite suchen",@@ -1288,6 +1290,10 @@ export const de = {label: "Fotos und Dateien anhängen",description: "Einen Anhang zum Eingabefeld hinzufügen",},+ openComposerMenu: {+ label: "+-Menü öffnen",+ description: "Das +-Menü des Eingabefelds mit Werkzeugen und Anhängen öffnen",+ },sendMessage: {label: "Nachricht senden",description: "Den Inhalt des Eingabefelds senden",@@ -1316,10 +1322,6 @@ export const de = {label: "Denkaufwand verringern",description: "Den Denkaufwand um eine Stufe senken",},- toggleFastMode: {- label: "Fast-Modus umschalten",- description: "Den Fast-Modus ein- oder ausschalten",- },renameChat: {label: "Chat umbenennen",description: "Den aktuellen Chat umbenennen",diff --git a/studio/frontend/src/i18n/locales/en.ts b/studio/frontend/src/i18n/locales/en.tsindex c102569ec1c..56d4d1d8e20 100644--- a/studio/frontend/src/i18n/locales/en.ts+++ b/studio/frontend/src/i18n/locales/en.ts@@ -1129,29 +1129,31 @@ export const en = {},keyboardShortcuts: {title: "Keyboard shortcuts",+ intro: "To change a shortcut, select the key combination, and then type the new keys",searchPlaceholder: "Search shortcuts…",keystrokePlaceholder: "Press shortcut to search",searchByKeystrokes: "Search by keystrokes",searchByName: "Search by name",noResults: "No shortcuts match that search.",- unassigned: "Unassigned",- recording: "Press keys…",- recordingHint: "Press the new chord, or Esc to cancel.",+ unassigned: "none",+ recording: "Press key sequence",needsModifier: "Add ⌘, Ctrl or Alt. A bare key would swallow typing.",conflict: "Also used by another shortcut",conflictShadowed: "Another shortcut has this chord and runs instead",edit: "Change shortcut",- clear: "Remove shortcut",reset: "Restore default",- resetAll: "Reset all to defaults",- primarySlot: "Shortcut",- alternateSlot: "Alternate shortcut",+ resetAll: "Restore defaults",browserReserved:"Your browser may keep this chord for itself. It works in the desktop app.",metaUnsupported: "The Windows key can't be used in shortcuts.",altGraphUnsupported: "AltGr chords can't be used as shortcuts.",desktopOnly: "Desktop app only",- builtInKey: "Built in: {key}",+ groups: {+ composer: "Composer",+ chat: "Chat",+ navigation: "Navigation",+ app: "App",+ },actions: {findInPage: {label: "Find in page",@@ -1341,6 +1343,10 @@ export const en = {label: "Attach photos and files",description: "Add an attachment to the composer",},+ openComposerMenu: {+ label: "Open + menu",+ description: "Open the composer's + menu of tools and attachments",+ },sendMessage: {label: "Send message",description: "Send what is in the composer",@@ -1369,10 +1375,6 @@ export const en = {label: "Decrease reasoning effort",description: "Lower reasoning effort one level",},- toggleFastMode: {- label: "Toggle Fast mode",- description: "Turn Fast mode on or off",- },renameChat: {label: "Rename chat",description: "Rename the current chat",diff --git a/studio/frontend/src/i18n/locales/es.ts b/studio/frontend/src/i18n/locales/es.tsindex 0ef9f0bdec6..c30047a278b 100644--- a/studio/frontend/src/i18n/locales/es.ts+++ b/studio/frontend/src/i18n/locales/es.ts@@ -1075,6 +1075,7 @@ export const es = {},keyboardShortcuts: {title: "Atajos de teclado",+ intro: "Para cambiar un atajo, selecciona la combinación de teclas y pulsa las nuevas teclas",searchPlaceholder: "Buscar atajos…",keystrokePlaceholder: "Pulsa un atajo para buscar",searchByKeystrokes: "Buscar por pulsación",@@ -1082,22 +1083,23 @@ export const es = {noResults: "Ningún atajo coincide con esa búsqueda.",unassigned: "Sin asignar",recording: "Pulsa las teclas…",- recordingHint: "Pulsa la nueva combinación, o Esc para cancelar.",needsModifier: "Añade ⌘, Ctrl o Alt. Una tecla suelta se tragaría lo que escribes.",conflict: "También lo usa otro atajo",conflictShadowed: "Otro atajo tiene esta combinación y se ejecuta en lugar de este",edit: "Cambiar atajo",- clear: "Quitar atajo",reset: "Restaurar el valor predeterminado",resetAll: "Restablecer todo",- primarySlot: "Atajo",- alternateSlot: "Atajo alternativo",browserReserved:"Puede que tu navegador se reserve esta combinación. En la app de escritorio funciona.",metaUnsupported: "La tecla Windows no se puede usar en atajos.",altGraphUnsupported: "Las combinaciones con AltGr no se pueden usar como atajos.",desktopOnly: "Solo en la app de escritorio",- builtInKey: "Integrado: {key}",+ groups: {+ composer: "Redactor",+ chat: "Chat",+ navigation: "Navegación",+ app: "Aplicación",+ },actions: {findInPage: {label: "Buscar en la página",@@ -1287,6 +1289,10 @@ export const es = {label: "Adjuntar fotos y archivos",description: "Añadir un adjunto al redactor",},+ openComposerMenu: {+ label: "Abrir menú +",+ description: "Abrir el menú + del redactor con herramientas y adjuntos",+ },sendMessage: {label: "Enviar mensaje",description: "Enviar lo que hay en el redactor",@@ -1315,10 +1321,6 @@ export const es = {label: "Reducir esfuerzo de razonamiento",description: "Bajar un nivel el esfuerzo de razonamiento",},- toggleFastMode: {- label: "Alternar modo Fast",- description: "Activar o desactivar el modo Fast",- },renameChat: {label: "Renombrar chat",description: "Renombrar el chat actual",diff --git a/studio/frontend/src/i18n/locales/fr.ts b/studio/frontend/src/i18n/locales/fr.tsindex 6b4a899fedd..dff569d56b9 100644--- a/studio/frontend/src/i18n/locales/fr.ts+++ b/studio/frontend/src/i18n/locales/fr.ts@@ -1076,6 +1076,7 @@ export const fr = {},keyboardShortcuts: {title: "Raccourcis clavier",+ intro: "Pour modifier un raccourci, sélectionnez la combinaison de touches, puis tapez les nouvelles touches",searchPlaceholder: "Rechercher des raccourcis…",keystrokePlaceholder: "Appuyez sur un raccourci pour rechercher",searchByKeystrokes: "Rechercher par frappe",@@ -1083,22 +1084,23 @@ export const fr = {noResults: "Aucun raccourci ne correspond à cette recherche.",unassigned: "Non attribué",recording: "Appuyez sur les touches…",- recordingHint: "Appuyez sur la nouvelle combinaison, ou Échap pour annuler.",needsModifier: "Ajoutez ⌘, Ctrl ou Alt. Une touche seule avalerait la saisie.",conflict: "Également utilisé par un autre raccourci",conflictShadowed: "Un autre raccourci utilise cette combinaison et s'exécute à sa place",edit: "Modifier le raccourci",- clear: "Supprimer le raccourci",reset: "Rétablir la valeur par défaut",resetAll: "Tout réinitialiser",- primarySlot: "Raccourci",- alternateSlot: "Raccourci alternatif",browserReserved:"Votre navigateur peut réserver cette combinaison. Elle fonctionne dans l’application de bureau.",metaUnsupported: "La touche Windows ne peut pas être utilisée dans les raccourcis.",altGraphUnsupported: "Les combinaisons AltGr ne peuvent pas servir de raccourcis.",desktopOnly: "Application de bureau uniquement",- builtInKey: "Intégré : {key}",+ groups: {+ composer: "Zone de saisie",+ chat: "Discussion",+ navigation: "Navigation",+ app: "Application",+ },actions: {findInPage: {label: "Rechercher dans la page",@@ -1288,6 +1290,10 @@ export const fr = {label: "Joindre photos et fichiers",description: "Ajouter une pièce jointe à la zone de saisie",},+ openComposerMenu: {+ label: "Ouvrir le menu +",+ description: "Ouvrir le menu + de la zone de saisie (outils et pièces jointes)",+ },sendMessage: {label: "Envoyer le message",description: "Envoyer le contenu de la zone de saisie",@@ -1316,10 +1322,6 @@ export const fr = {label: "Diminuer l’effort de raisonnement",description: "Descendre d’un niveau l’effort de raisonnement",},- toggleFastMode: {- label: "Activer/désactiver le mode Fast",- description: "Activer ou désactiver le mode Fast",- },renameChat: {label: "Renommer la discussion",description: "Renommer la discussion en cours",diff --git a/studio/frontend/src/i18n/locales/he.ts b/studio/frontend/src/i18n/locales/he.tsindex 27dfdfe27e6..028f41de2c4 100644--- a/studio/frontend/src/i18n/locales/he.ts+++ b/studio/frontend/src/i18n/locales/he.ts@@ -1160,6 +1160,7 @@ export const he = {},keyboardShortcuts: {title: "קיצורי מקשים",+ intro: "כדי לשנות קיצור דרך, בחר את צירוף המקשים ואז הקש את המקשים החדשים",searchPlaceholder: "חיפוש קיצורי דרך…",keystrokePlaceholder: "הקש קיצור כדי לחפש",searchByKeystrokes: "חיפוש לפי הקשות",@@ -1167,22 +1168,23 @@ export const he = {noResults: "לא נמצאו קיצורי דרך תואמים.",unassigned: "לא הוקצה",recording: "הקש על מקשים…",- recordingHint: "הקש על צירוף המקשים החדש, או Esc לביטול.",needsModifier: "הוסף ⌘, Ctrl או Alt. מקש בודד יחסום הקלדה רגילה.",conflict: "בשימוש גם בקיצור דרך אחר",conflictShadowed: "קיצור דרך אחר משתמש בצירוף זה ויופעל במקומו",edit: "שנה קיצור דרך",- clear: "הסר קיצור דרך",reset: "שחזר ברירת מחדל",resetAll: "אפס הכל לברירות מחדל",- primarySlot: "קיצור דרך",- alternateSlot: "קיצור דרך חלופי",browserReserved:"הדפדפן שלך עשוי לשמור צירוף זה לעצמו. הוא יעבוד באפליקציית שולחן העבודה.",metaUnsupported: "לא ניתן להשתמש במקש Windows בקיצורי מקשים.",altGraphUnsupported: "לא ניתן להשתמש בצירופי AltGr כקיצורי מקשים.",desktopOnly: "באפליקציית שולחן העבודה בלבד",- builtInKey: "מובנה: {key}",+ groups: {+ composer: "תיבת הכתיבה",+ chat: "צ'אט",+ navigation: "ניווט",+ app: "אפליקציה",+ },actions: {findInPage: {label: "חיפוש בדף",@@ -1373,6 +1375,10 @@ export const he = {label: "צרף תמונות וקבצים",description: "הוסף קובץ מצורף לתיבת ההודעה",},+ openComposerMenu: {+ label: "פתיחת תפריט +",+ description: "פתיחת תפריט + של תיבת הכתיבה עם כלים וקבצים מצורפים",+ },sendMessage: {label: "שלח הודעה",description: "שלח את תוכן תיבת ההודעה",@@ -1401,10 +1407,6 @@ export const he = {label: "הפחת מאמץ חשיבה",description: "הורד את רמת מאמץ החשיבה בדרגה אחת",},- toggleFastMode: {- label: "הפעל/השבת מצב מהיר",- description: "הפעל או כבה את המצב המהיר",- },renameChat: {label: "שינוי שם צ'אט",description: "שנה את שם הצ'אט הנוכחי",diff --git a/studio/frontend/src/i18n/locales/hi.ts b/studio/frontend/src/i18n/locales/hi.tsindex 82f74c1605b..76c1018de7f 100644--- a/studio/frontend/src/i18n/locales/hi.ts+++ b/studio/frontend/src/i18n/locales/hi.ts@@ -1075,6 +1075,7 @@ export const hi = {},keyboardShortcuts: {title: "कीबोर्ड शॉर्टकट",+ intro: "शॉर्टकट बदलने के लिए, कुंजी संयोजन चुनें और फिर नई कुंजियाँ दबाएँ",searchPlaceholder: "शॉर्टकट खोजें…",keystrokePlaceholder: "खोजने के लिए शॉर्टकट दबाएँ",searchByKeystrokes: "कीस्ट्रोक से खोजें",@@ -1082,22 +1083,23 @@ export const hi = {noResults: "इस खोज से कोई शॉर्टकट मेल नहीं खाता।",unassigned: "असाइन नहीं",recording: "कुंजियाँ दबाएँ…",- recordingHint: "नया संयोजन दबाएँ, या रद्द करने के लिए Esc।",needsModifier: "⌘, Ctrl या Alt जोड़ें। अकेली कुंजी टाइपिंग निगल लेगी।",conflict: "यह किसी और शॉर्टकट में भी इस्तेमाल हो रहा है",conflictShadowed: "यह संयोजन किसी और शॉर्टकट के पास है और उसके बदले वही चलता है",edit: "शॉर्टकट बदलें",- clear: "शॉर्टकट हटाएँ",reset: "डिफ़ॉल्ट पर लौटाएँ",resetAll: "सभी को डिफ़ॉल्ट पर रीसेट करें",- primarySlot: "शॉर्टकट",- alternateSlot: "वैकल्पिक शॉर्टकट",browserReserved:"आपका ब्राउज़र यह कुंजी संयोजन अपने पास रख सकता है। डेस्कटॉप ऐप में यह काम करता है।",metaUnsupported: "Windows कुंजी का उपयोग शॉर्टकट में नहीं किया जा सकता।",altGraphUnsupported: "AltGr संयोजनों को शॉर्टकट के रूप में उपयोग नहीं किया जा सकता।",desktopOnly: "केवल डेस्कटॉप ऐप में",- builtInKey: "अंतर्निहित: {key}",+ groups: {+ composer: "कंपोज़र",+ chat: "चैट",+ navigation: "नेविगेशन",+ app: "ऐप",+ },actions: {findInPage: {label: "पेज में खोजें",@@ -1287,6 +1289,10 @@ export const hi = {label: "फ़ोटो और फ़ाइलें संलग्न करें",description: "लिखने के बॉक्स में अनुलग्नक जोड़ें",},+ openComposerMenu: {+ label: "+ मेनू खोलें",+ description: "कंपोज़र का टूल और अटैचमेंट वाला + मेनू खोलें",+ },sendMessage: {label: "संदेश भेजें",description: "लिखने के बॉक्स की सामग्री भेजें",@@ -1315,10 +1321,6 @@ export const hi = {label: "तर्क प्रयास घटाएँ",description: "तर्क प्रयास एक स्तर घटाएँ",},- toggleFastMode: {- label: "Fast मोड टॉगल करें",- description: "Fast मोड चालू या बंद करें",- },renameChat: {label: "चैट का नाम बदलें",description: "मौजूदा चैट का नाम बदलें",diff --git a/studio/frontend/src/i18n/locales/it.ts b/studio/frontend/src/i18n/locales/it.tsindex 3d9225132d9..bfc8892a80b 100644--- a/studio/frontend/src/i18n/locales/it.ts+++ b/studio/frontend/src/i18n/locales/it.ts@@ -977,6 +977,7 @@ export const it = {},keyboardShortcuts: {title: "Scorciatoie da tastiera",+ intro: "Per cambiare una scorciatoia, seleziona la combinazione di tasti e poi digita i nuovi tasti",searchPlaceholder: "Cerca scorciatoie…",keystrokePlaceholder: "Premi una scorciatoia per cercare",searchByKeystrokes: "Cerca per combinazione",@@ -984,22 +985,23 @@ export const it = {noResults: "Nessuna scorciatoia corrisponde alla ricerca.",unassigned: "Non assegnata",recording: "Premi i tasti…",- recordingHint: "Premi la nuova combinazione, o Esc per annullare.",needsModifier: "Aggiungi ⌘, Ctrl o Alt. Un tasto singolo intercetterebbe la digitazione.",conflict: "Usata anche da un'altra scorciatoia",conflictShadowed: "Un'altra scorciatoia usa questa combinazione e viene eseguita al suo posto",edit: "Cambia scorciatoia",- clear: "Rimuovi scorciatoia",reset: "Ripristina il valore predefinito",resetAll: "Ripristina tutto",- primarySlot: "Scorciatoia",- alternateSlot: "Scorciatoia alternativa",browserReserved:"Il browser potrebbe riservare questa combinazione per sé. Nell’app desktop funziona.",metaUnsupported: "Il tasto Windows non può essere usato nelle scorciatoie.",altGraphUnsupported: "Le combinazioni con AltGr non possono essere usate come scorciatoie.",desktopOnly: "Solo nell'app desktop",- builtInKey: "Integrato: {key}",+ groups: {+ composer: "Editor messaggi",+ chat: "Chat",+ navigation: "Navigazione",+ app: "App",+ },actions: {findInPage: {label: "Trova nella pagina",@@ -1189,6 +1191,10 @@ export const it = {label: "Allega foto e file",description: "Aggiungi un allegato all’editor",},+ openComposerMenu: {+ label: "Apri menu +",+ description: "Apri il menu + dell'editor con strumenti e allegati",+ },sendMessage: {label: "Invia messaggio",description: "Invia il contenuto dell’editor",@@ -1217,10 +1223,6 @@ export const it = {label: "Riduci lo sforzo di ragionamento",description: "Abbassa di un livello lo sforzo di ragionamento",},- toggleFastMode: {- label: "Attiva/disattiva la modalità Fast",- description: "Attiva o disattiva la modalità Fast",- },renameChat: {label: "Rinomina chat",description: "Rinomina la chat corrente",diff --git a/studio/frontend/src/i18n/locales/ja.ts b/studio/frontend/src/i18n/locales/ja.tsindex 9460dfa955c..e698fbd55c1 100644--- a/studio/frontend/src/i18n/locales/ja.ts+++ b/studio/frontend/src/i18n/locales/ja.ts@@ -1073,6 +1073,7 @@ export const ja = {},keyboardShortcuts: {title: "キーボードショートカット",+ intro: "ショートカットを変更するには、キーの組み合わせを選択してから新しいキーを入力します",searchPlaceholder: "ショートカットを検索…",keystrokePlaceholder: "ショートカットを押して検索",searchByKeystrokes: "キー入力で検索",@@ -1080,22 +1081,23 @@ export const ja = {noResults: "該当するショートカットはありません。",unassigned: "未割り当て",recording: "キーを押してください…",- recordingHint: "新しいキーの組み合わせを押すか、Esc でキャンセルします。",needsModifier: "⌘、Ctrl、Alt のいずれかを加えてください。単独のキーでは入力を奪ってしまいます。",conflict: "別のショートカットでも使われています",conflictShadowed: "この組み合わせは別のショートカットのもので、そちらが実行されます",edit: "ショートカットを変更",- clear: "ショートカットを削除",reset: "既定値に戻す",resetAll: "すべて既定値に戻す",- primarySlot: "ショートカット",- alternateSlot: "代替ショートカット",browserReserved:"ブラウザがこのキーを使う場合があります。デスクトップアプリでは動作します。",metaUnsupported: "Windows キーはショートカットに使用できません。",altGraphUnsupported: "AltGr の組み合わせはショートカットに使用できません。",desktopOnly: "デスクトップアプリのみ",- builtInKey: "組み込み: {key}",+ groups: {+ composer: "入力欄",+ chat: "チャット",+ navigation: "ナビゲーション",+ app: "アプリ",+ },actions: {findInPage: {label: "ページ内検索",@@ -1285,6 +1287,10 @@ export const ja = {label: "写真とファイルを添付",description: "入力欄に添付ファイルを追加します",},+ openComposerMenu: {+ label: "+ メニューを開く",+ description: "入力欄のツールと添付ファイルの + メニューを開く",+ },sendMessage: {label: "メッセージを送信",description: "入力欄の内容を送信します",@@ -1313,10 +1319,6 @@ export const ja = {label: "思考の深さを下げる",description: "思考の深さを 1 段階下げます",},- toggleFastMode: {- label: "Fast モードの切り替え",- description: "Fast モードをオンまたはオフにします",- },renameChat: {label: "チャット名を変更",description: "現在のチャットの名前を変更します",diff --git a/studio/frontend/src/i18n/locales/ko.ts b/studio/frontend/src/i18n/locales/ko.tsindex 2f94702fd4d..db04298e50c 100644--- a/studio/frontend/src/i18n/locales/ko.ts+++ b/studio/frontend/src/i18n/locales/ko.ts@@ -1071,6 +1071,7 @@ export const ko = {},keyboardShortcuts: {title: "키보드 단축키",+ intro: "단축키를 변경하려면 키 조합을 선택한 다음 새 키를 입력하세요",searchPlaceholder: "단축키 검색…",keystrokePlaceholder: "단축키를 눌러 검색",searchByKeystrokes: "키 입력으로 검색",@@ -1078,22 +1079,23 @@ export const ko = {noResults: "검색과 일치하는 단축키가 없습니다.",unassigned: "지정 안 됨",recording: "키를 누르세요…",- recordingHint: "새 조합을 누르거나 Esc로 취소하세요.",needsModifier: "⌘, Ctrl 또는 Alt를 추가하세요. 단독 키는 입력을 가로챕니다.",conflict: "다른 단축키도 이 조합을 사용합니다",conflictShadowed: "다른 단축키가 이 조합을 차지하고 있어 그쪽이 실행됩니다",edit: "단축키 변경",- clear: "단축키 제거",reset: "기본값 복원",resetAll: "모두 기본값으로 초기화",- primarySlot: "단축키",- alternateSlot: "대체 단축키",browserReserved:"브라우저가 이 조합을 가져갈 수 있습니다. 데스크톱 앱에서는 동작합니다.",metaUnsupported: "Windows 키는 단축키에 사용할 수 없습니다.",altGraphUnsupported: "AltGr 조합은 단축키로 사용할 수 없습니다.",desktopOnly: "데스크톱 앱 전용",- builtInKey: "기본 제공: {key}",+ groups: {+ composer: "입력창",+ chat: "채팅",+ navigation: "탐색",+ app: "앱",+ },actions: {findInPage: {label: "페이지에서 찾기",@@ -1283,6 +1285,10 @@ export const ko = {label: "사진 및 파일 첨부",description: "입력창에 첨부 파일을 추가합니다",},+ openComposerMenu: {+ label: "+ 메뉴 열기",+ description: "입력창의 도구 및 첨부 파일 + 메뉴 열기",+ },sendMessage: {label: "메시지 보내기",description: "입력창의 내용을 보냅니다",@@ -1311,10 +1317,6 @@ export const ko = {label: "추론 강도 낮추기",description: "추론 강도를 한 단계 내립니다",},- toggleFastMode: {- label: "Fast 모드 토글",- description: "Fast 모드를 켜거나 끕니다",- },renameChat: {label: "채팅 이름 바꾸기",description: "현재 채팅의 이름을 바꿉니다",diff --git a/studio/frontend/src/i18n/locales/pt-br.ts b/studio/frontend/src/i18n/locales/pt-br.tsindex d7c9d5d97f4..96385655fcb 100644--- a/studio/frontend/src/i18n/locales/pt-br.ts+++ b/studio/frontend/src/i18n/locales/pt-br.ts@@ -1074,6 +1074,7 @@ export const ptBR = {},keyboardShortcuts: {title: "Atalhos de teclado",+ intro: "Para alterar um atalho, selecione a combinação de teclas e digite as novas teclas",searchPlaceholder: "Pesquisar atalhos…",keystrokePlaceholder: "Pressione um atalho para pesquisar",searchByKeystrokes: "Pesquisar por tecla",@@ -1081,22 +1082,23 @@ export const ptBR = {noResults: "Nenhum atalho corresponde a essa pesquisa.",unassigned: "Não atribuído",recording: "Pressione as teclas…",- recordingHint: "Pressione a nova combinação, ou Esc para cancelar.",needsModifier: "Adicione ⌘, Ctrl ou Alt. Uma tecla sozinha engoliria a digitação.",conflict: "Também usado por outro atalho",conflictShadowed: "Outro atalho tem essa combinação e é executado no lugar dele",edit: "Alterar atalho",- clear: "Remover atalho",reset: "Restaurar o padrão",resetAll: "Redefinir tudo para o padrão",- primarySlot: "Atalho",- alternateSlot: "Atalho alternativo",browserReserved:"Seu navegador pode reservar essa combinação. No app para desktop ela funciona.",metaUnsupported: "A tecla Windows não pode ser usada em atalhos.",altGraphUnsupported: "Combinações com AltGr não podem ser usadas como atalhos.",desktopOnly: "Somente no app para desktop",- builtInKey: "Integrado: {key}",+ groups: {+ composer: "Caixa de mensagem",+ chat: "Chat",+ navigation: "Navegação",+ app: "App",+ },actions: {findInPage: {label: "Localizar na página",@@ -1286,6 +1288,10 @@ export const ptBR = {label: "Anexar fotos e arquivos",description: "Adicionar um anexo ao compositor",},+ openComposerMenu: {+ label: "Abrir menu +",+ description: "Abrir o menu + da caixa de mensagem com ferramentas e anexos",+ },sendMessage: {label: "Enviar mensagem",description: "Enviar o que está no compositor",@@ -1314,10 +1320,6 @@ export const ptBR = {label: "Reduzir esforço de raciocínio",description: "Descer um nível o esforço de raciocínio",},- toggleFastMode: {- label: "Alternar modo Fast",- description: "Ligar ou desligar o modo Fast",- },renameChat: {label: "Renomear chat",description: "Renomear o chat atual",diff --git a/studio/frontend/src/i18n/locales/ru.ts b/studio/frontend/src/i18n/locales/ru.tsindex 5785281058c..f3d36815364 100644--- a/studio/frontend/src/i18n/locales/ru.ts+++ b/studio/frontend/src/i18n/locales/ru.ts@@ -1074,6 +1074,7 @@ export const ru = {},keyboardShortcuts: {title: "Сочетания клавиш",+ intro: "Чтобы изменить сочетание клавиш, выберите его и нажмите новые клавиши",searchPlaceholder: "Поиск сочетаний…",keystrokePlaceholder: "Нажмите сочетание для поиска",searchByKeystrokes: "Поиск по нажатию",@@ -1081,22 +1082,23 @@ export const ru = {noResults: "Ни одно сочетание не соответствует запросу.",unassigned: "Не назначено",recording: "Нажмите клавиши…",- recordingHint: "Нажмите новую комбинацию или Esc для отмены.",needsModifier: "Добавьте ⌘, Ctrl или Alt. Одиночная клавиша перехватит ввод текста.",conflict: "Используется также другим сочетанием",conflictShadowed: "Эта комбинация занята другим сочетанием, и выполняется оно",edit: "Изменить сочетание",- clear: "Удалить сочетание",reset: "Вернуть значение по умолчанию",resetAll: "Сбросить всё до значений по умолчанию",- primarySlot: "Сочетание",- alternateSlot: "Альтернативное сочетание",browserReserved:"Браузер может оставить это сочетание себе. В настольном приложении оно работает.",metaUnsupported: "Клавишу Windows нельзя использовать в сочетаниях клавиш.",altGraphUnsupported: "Сочетания с AltGr нельзя использовать как сочетания клавиш.",desktopOnly: "Только в настольном приложении",- builtInKey: "Встроено: {key}",+ groups: {+ composer: "Поле ввода",+ chat: "Чат",+ navigation: "Навигация",+ app: "Приложение",+ },actions: {findInPage: {label: "Поиск на странице",@@ -1286,6 +1288,10 @@ export const ru = {label: "Прикрепить фото и файлы",description: "Добавить вложение в поле ввода",},+ openComposerMenu: {+ label: "Открыть меню +",+ description: "Открыть меню + поля ввода с инструментами и вложениями",+ },sendMessage: {label: "Отправить сообщение",description: "Отправить содержимое поля ввода",@@ -1314,10 +1320,6 @@ export const ru = {label: "Уменьшить усилие рассуждения",description: "Снизить усилие рассуждения на один уровень",},- toggleFastMode: {- label: "Переключить режим Fast",- description: "Включить или выключить режим Fast",- },renameChat: {label: "Переименовать чат",description: "Переименовать текущий чат",diff --git a/studio/frontend/src/i18n/locales/sv.ts b/studio/frontend/src/i18n/locales/sv.tsindex ee83c3277fd..0efa6ab6aa7 100644--- a/studio/frontend/src/i18n/locales/sv.ts+++ b/studio/frontend/src/i18n/locales/sv.ts@@ -1187,6 +1187,7 @@ export const sv = {},keyboardShortcuts: {title: "Tangentbordsgenvägar",+ intro: "Om du vill ändra en genväg markerar du tangentkombinationen och skriver sedan de nya tangenterna",searchPlaceholder: "Sök genvägar …",keystrokePlaceholder: "Tryck på en tangentkombination för att söka",searchByKeystrokes: "Sök efter tangenttryckningar",@@ -1194,25 +1195,25 @@ export const sv = {noResults: "Inga genvägar matchar sökningen.",unassigned: "Ej tilldelad",recording: "Tryck på tangenter …",- recordingHint:- "Tryck på den nya tangentkombinationen eller Esc för att avbryta.",needsModifier:"Lägg till ⌘, Ctrl eller Alt. En ensam tangent skulle fånga upp textinmatning.",conflict: "Används också av en annan genväg",conflictShadowed:"En annan genväg har denna tangentkombination och körs i stället",edit: "Ändra genväg",- clear: "Ta bort genväg",reset: "Återställ standard",resetAll: "Återställ alla till standard",- primarySlot: "Genväg",- alternateSlot: "Alternativ genväg",browserReserved:"Din webbläsare kan reservera denna tangentkombination. Den fungerar i skrivbordsappen.",metaUnsupported: "Windows-tangenten kan inte användas i kortkommandon.",altGraphUnsupported: "AltGr-kombinationer kan inte användas som kortkommandon.",desktopOnly: "Endast i skrivbordsappen",- builtInKey: "Inbyggt: {key}",+ groups: {+ composer: "Meddelandefält",+ chat: "Chatt",+ navigation: "Navigering",+ app: "App",+ },actions: {findInPage: {label: "Sök på sidan",@@ -1402,6 +1403,10 @@ export const sv = {label: "Bifoga foton och filer",description: "Lägg till en bilaga i skrivfältet",},+ openComposerMenu: {+ label: "Öppna +-menyn",+ description: "Öppna meddelandefältets +-meny med verktyg och bilagor",+ },sendMessage: {label: "Skicka meddelande",description: "Skicka det som finns i skrivfältet",@@ -1430,10 +1435,6 @@ export const sv = {label: "Minska resonemangsnivå",description: "Sänk resonemangsnivån ett steg",},- toggleFastMode: {- label: "Växla snabbt läge",- description: "Aktivera eller inaktivera snabbt läge",- },renameChat: {label: "Byt namn på chatt",description: "Byt namn på den aktuella chatten",diff --git a/studio/frontend/src/i18n/locales/zh-CN.ts b/studio/frontend/src/i18n/locales/zh-CN.tsindex c3edfbf4cdc..a1c73ef8f85 100644--- a/studio/frontend/src/i18n/locales/zh-CN.ts+++ b/studio/frontend/src/i18n/locales/zh-CN.ts@@ -1069,6 +1069,7 @@ export const zhCN = {},keyboardShortcuts: {title: "键盘快捷键",+ intro: "要更改快捷键,请选择按键组合,然后输入新的按键",searchPlaceholder: "搜索快捷键…",keystrokePlaceholder: "按下快捷键进行搜索",searchByKeystrokes: "按键搜索",@@ -1076,22 +1077,23 @@ export const zhCN = {noResults: "没有匹配的快捷键。",unassigned: "未分配",recording: "请按下按键…",- recordingHint: "按下新的组合键,或按 Esc 取消。",needsModifier: "请加上 ⌘、Ctrl 或 Alt。单独一个按键会吞掉正常输入。",conflict: "另一个快捷键也在使用该组合",conflictShadowed: "该组合已被另一个快捷键占用,执行的是那一个",edit: "更改快捷键",- clear: "移除快捷键",reset: "恢复默认",resetAll: "全部恢复默认",- primarySlot: "快捷键",- alternateSlot: "备用快捷键",browserReserved:"浏览器可能会占用该组合键。桌面应用中可正常使用。",metaUnsupported: "Windows 键不能用于快捷键。",altGraphUnsupported: "AltGr 组合不能用作快捷键。",desktopOnly: "仅限桌面应用",- builtInKey: "内置:{key}",+ groups: {+ composer: "输入框",+ chat: "聊天",+ navigation: "导航",+ app: "应用",+ },actions: {findInPage: {label: "在页面中查找",@@ -1281,6 +1283,10 @@ export const zhCN = {label: "添加照片和文件",description: "为输入框添加附件",},+ openComposerMenu: {+ label: "打开 + 菜单",+ description: "打开输入框的工具和附件 + 菜单",+ },sendMessage: {label: "发送消息",description: "发送输入框中的内容",@@ -1309,10 +1315,6 @@ export const zhCN = {label: "降低推理强度",description: "将推理强度降低一级",},- toggleFastMode: {- label: "切换 Fast 模式",- description: "开启或关闭 Fast 模式",- },renameChat: {label: "重命名聊天",description: "重命名当前聊天",diff --git a/studio/frontend/tests/contrast-slider.test.ts b/studio/frontend/tests/contrast-slider.test.tsindex 134009b7712..e209f5f9661 100644--- a/studio/frontend/tests/contrast-slider.test.ts+++ b/studio/frontend/tests/contrast-slider.test.ts@@ -408,7 +408,7 @@ test("a light wash follows the slider as its dark twin does", () => {test("the hand-written washes follow the slider, the scrims do not", () => {const app = readSrc("features/settings/settings-dialog.tsx");- assert.match(app, /calc\(0\.06\*var\(--contrast-wash-gain,1\)\)/);+ assert.match(app, /calc\(0\.\d+\*var\(--contrast-wash-gain,1\)\)/);assert.doesNotMatch(app, /bg-white\/\[0\.0[0-9]\]/);assert.match(readSrc("components/assistant-ui/markdown-text.tsx"),@@ -529,7 +529,7 @@ test("a pane that repaints itself in dark is not reset to the page there", () =>);assert.match(readSrc("features/settings/settings-dialog.tsx"),- /bg-background[^"]*dark:bg-\[rgb\(255_255_255/,+ /bg-accent[^"]*dark:bg-\[rgb\(255_255_255/,);});diff --git a/studio/frontend/tests/keyboard-shortcuts-groups.test.ts b/studio/frontend/tests/keyboard-shortcuts-groups.test.tsnew file mode 100644index 00000000000..b0fb1bb34a3--- /dev/null+++ b/studio/frontend/tests/keyboard-shortcuts-groups.test.ts@@ -0,0 +1,117 @@+// SPDX-License-Identifier: AGPL-3.0-only+// Copyright 2026-present the Unsloth AI Inc. team. All rights reserved. See /studio/LICENSE.AGPL-3.0++import assert from "node:assert/strict";+import test from "node:test";+import {+ SHORTCUT_DEFS,+ SHORTCUT_GROUPS,+} from "../src/features/settings/lib/keyboard-shortcuts.ts";+import {+ assignedBinding,+ findConflicts,+ isShortcutEnabled,+ migrateStoredOverrides,+ resolveBinding,+ useKeyboardShortcutsStore,+} from "../src/features/settings/stores/keyboard-shortcuts-store.ts";+import { en } from "../src/i18n/locales/en.ts";++import { readSrc } from "./helpers/kit.ts";++test("every action sits in exactly one section of the shortcuts tab", () => {+ const seen = new Map<string, string>();+ for (const group of SHORTCUT_GROUPS) {+ for (const id of group.ids) {+ assert.equal(+ seen.has(id),+ false,+ `${id} is in ${seen.get(id)} and ${group.id}`,+ );+ seen.set(id, group.id);+ }+ assert.ok(+ (en.settings.keyboardShortcuts.groups as Record<string, string>)[+ group.id+ ],+ `${group.id} has no English heading`,+ );+ }+ for (const def of SHORTCUT_DEFS) {+ assert.ok(+ seen.has(def.id),+ `${def.id} is in no section, so the tab never shows it`,+ );+ }+ assert.equal(seen.size, SHORTCUT_DEFS.length);+});++test("a switched-off action keeps its chord but stops answering to it", () => {+ const store = useKeyboardShortcutsStore.getState();+ store.resetAll();+ const before = resolveBinding({}, "searchChats");+ assert.ok(before);++ store.setEnabled("searchChats", false);+ let { overrides } = useKeyboardShortcutsStore.getState();+ assert.equal(isShortcutEnabled(overrides, "searchChats"), false);+ assert.equal(resolveBinding(overrides, "searchChats"), null);+ assert.equal(assignedBinding(overrides, "searchChats"), before);++ store.setEnabled("searchChats", true);+ ({ overrides } = useKeyboardShortcutsStore.getState());+ assert.deepEqual(+ overrides,+ {},+ "switching back on leaves nothing overridden",+ );+});++test("recording a chord switches the action back on", () => {+ const store = useKeyboardShortcutsStore.getState();+ store.resetAll();+ store.setEnabled("renameChat", false);+ store.setBinding("renameChat", "primary", "Mod+Alt+KeyN");+ const { overrides } = useKeyboardShortcutsStore.getState();+ assert.deepEqual(overrides.renameChat, { primary: "Mod+Alt+KeyN" });+ assert.equal(resolveBinding(overrides, "renameChat"), "Mod+Alt+KeyN");+ store.resetAll();+});++test("a switched-off action no longer clashes with the one sharing its chord", () => {+ const overrides = migrateStoredOverrides({+ renameChat: { primary: "Mod+KeyK" },+ });+ assert.ok(findConflicts(overrides).has("renameChat"));+ const off = migrateStoredOverrides({+ renameChat: { primary: "Mod+KeyK", disabled: true },+ });+ assert.deepEqual(off.renameChat, { primary: "Mod+KeyK", disabled: true });+ assert.equal(findConflicts(off).has("renameChat"), false);+ assert.deepEqual(migrateStoredOverrides({ renameChat: { disabled: true } }), {+ renameChat: { disabled: true },+ });+});++test("the recorder clears a slot on a bare Backspace or Delete", () => {+ const tab = readSrc("features/settings/tabs/keyboard-shortcuts-tab.tsx");+ assert.match(+ tab,+ /if \(bare && \(binding\.code === "Backspace" \|\| binding\.code === "Delete"\)\) \{\s*clearBinding\(recording\.id, recording\.slot\);/,+ );+ // Leaving the box any other way ends recording, so no stale listener keeps swallowing keys.+ assert.match(tab, /onBlur=\{stopRecording\}/);+});++test("both composers open their + menu on the chord, never from behind a dialog", () => {+ for (const path of ["components/assistant-ui/thread.tsx", "features/chat/shared-composer.tsx"]) {+ const src = readSrc(path);+ const at = src.indexOf('"openComposerMenu",');+ assert.notEqual(at, -1, `${path} does not register openComposerMenu`);+ assert.match(+ src.slice(at, at + 400),+ /if \(plusOpen\) return setPlusMenuOpen\(false\);\s*if \(!isSurfaceInForeground\(COMPOSER_INPUT_SELECTOR\)\) return;\s*setPlusMenuOpen\(true\);/,+ );+ assert.match(src, /<DropdownMenu open=\{plusOpen\} onOpenChange=\{setPlusMenuOpen\}>/);+ }+});diff --git a/studio/frontend/tests/shortcut-dispatch-guards.test.ts b/studio/frontend/tests/shortcut-dispatch-guards.test.tsindex 8b756a390e1..24fdb89c9ed 100644--- a/studio/frontend/tests/shortcut-dispatch-guards.test.ts+++ b/studio/frontend/tests/shortcut-dispatch-guards.test.ts@@ -479,7 +479,6 @@ test("the remaining chat-page chords stop at a covered surface", async () => {"cycleReasoningEffort","increaseReasoningEffort","decreaseReasoningEffort",- "toggleFastMode",]) {const at = CHAT_PAGE.indexOf(`"${id}",`);assert.notEqual(at, -1, `${id} is gone`);diff --git a/tests/studio/playwright_settings_tabs.py b/tests/studio/playwright_settings_tabs.pyindex d05e3c26e13..a38d5ca5b11 100644--- a/tests/studio/playwright_settings_tabs.py+++ b/tests/studio/playwright_settings_tabs.py@@ -523,6 +523,81 @@ def run_keystroke_search(page) -> None:report["steps"].append("keystroke-search")+def run_shortcut_recorder(page) -> None:+ """Selecting a chord records the next one ahead of the shortcut it names and of the dialog's+ own Escape; the row's switch and Backspace turn the action off without losing the dialog."""+ open_dialog(page, "keyboard-shortcuts")+ settle_panel(page)+ row = page.locator(f'{PANEL} [data-settings-label="New chat"]')+ chord = row.locator('button[aria-label^="Change shortcut"]').first+ box = row.locator("input")+ stored_js = "() => localStorage.getItem('unsloth_keyboard_shortcuts')"+ # Same platform read as run_keystroke_search: Meta records nothing off macOS.+ mac = page.evaluate(+ "() => /mac|iphone|ipad|ipod/i.test(`${navigator.platform} ${navigator.userAgent}`)"+ )+ mod = "Meta" if mac else "Control"+ state: dict = {"mod": mod}++ click_forced(chord, timeout = 15000)+ box.wait_for(state = "visible", timeout = 5000)+ state["placeholder"] = box.get_attribute("placeholder")+ # A dialog gone here means the press reached Radix before the recorder.+ page.keyboard.press("Escape")+ page.wait_for_timeout(SETTLE_MS)+ state["after_escape"] = {+ "dialog": page.locator('div[role="dialog"]').count(),+ "recording": box.count(),+ }++ click_forced(chord, timeout = 15000)+ box.wait_for(state = "visible", timeout = 5000)+ page.keyboard.press(f"{mod}+Shift+KeyY")+ until(page, f"() => ({stored_js})()?.includes('Mod+Shift+KeyY')")+ state["recorded"] = {"stored": page.evaluate(stored_js), "shown": chord.inner_text()}++ switch = row.locator('button[role="switch"]')+ click_forced(switch, timeout = 15000)+ until(page, f"() => ({stored_js})()?.includes('\"disabled\":true')")+ state["switched_off"] = {+ "checked": switch.get_attribute("aria-checked"),+ "stored": page.evaluate(stored_js),+ }++ click_forced(chord, timeout = 15000)+ box.wait_for(state = "visible", timeout = 5000)+ page.keyboard.press("Backspace")+ until(page, "el => el && !el.isConnected", arg = box.element_handle())+ state["cleared"] = {"shown": chord.inner_text(), "stored": page.evaluate(stored_js)}++ click_forced(page.get_by_role("button", name = "Restore defaults"), timeout = 15000)+ until(page, f"() => ({stored_js})() === null")+ state["reset"] = {+ "stored": page.evaluate(stored_js),+ "checked": switch.get_attribute("aria-checked"),+ }+ report["shortcut_recorder"] = state++ if state["placeholder"] != "Press key sequence":+ fail(f"shortcut recorder: no recorder box ({state['placeholder']})")+ if state["after_escape"]["dialog"] != 1:+ fail("shortcut recorder: Escape closed the dialog instead of cancelling")+ if state["after_escape"]["recording"] != 0:+ fail("shortcut recorder: Escape left the recorder open")+ if "Mod+Shift+KeyY" not in (state["recorded"]["stored"] or ""):+ fail(f"shortcut recorder: the chord was not stored ({state['recorded']})")+ if "Y" not in state["recorded"]["shown"]:+ fail(f"shortcut recorder: the row does not show the chord ({state['recorded']})")+ if state["switched_off"]["checked"] != "false":+ fail(f"shortcut recorder: the switch did not turn off ({state['switched_off']})")+ if state["cleared"]["shown"].strip() != "none":+ fail(f"shortcut recorder: Backspace did not clear the chord ({state['cleared']})")+ if state["reset"]["stored"] is not None or state["reset"]["checked"] != "true":+ fail(f"shortcut recorder: Reset all left overrides ({state['reset']})")+ page.evaluate("() => window.__settingsSmoke.close()")+ report["steps"].append("shortcut-recorder")++def assert_model_memory_rows() -> None:"""The image/video idle row moved to Model memory; keepKv renders without a backend."""labels = {@@ -679,6 +754,8 @@ def run(page) -> None:run_keystroke_search(page)+ run_shortcut_recorder(page)+run_scroll_resets_on_tab_switch(page)report["page_errors"] = page.evaluate("() => window.__settingsSmoke.errors()")