From 801dfaf67cf2098be62364ecde5f0fc46ed7cd5d Mon Sep 17 00:00:00 2001 From: Neil Date: Thu, 12 Nov 2026 18:06:29 -0800 Subject: [PATCH] perf(shortcuts): omit plugin display metadata during matching --- .../commands/plugin-command-keybindings.ts | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/renderer/src/lib/plugins/commands/plugin-command-keybindings.ts b/src/renderer/src/lib/plugins/commands/plugin-command-keybindings.ts index abd9800a668..a0f765af988 100644 --- a/src/renderer/src/lib/plugins/commands/plugin-command-keybindings.ts +++ b/src/renderer/src/lib/plugins/commands/plugin-command-keybindings.ts @@ -25,22 +25,31 @@ import { translate } from '@/i18n/i18n' import { pluginCommandKeybindingActionId } from '../../../../../shared/plugins/contributions/plugin-command-actions' import { isWorkspaceScopedPluginContext } from '../../../../../shared/plugins/contributions/plugin-command-contribution' -export function pluginCommandKeybindingDefinition( - command: ActivePluginCommand -): KeybindingDefinition { +function pluginCommandBindingDefinition(command: ActivePluginCommand): KeybindingDefinition { const defaults = command.keybindings.map((keybinding) => keybinding.key) return { id: pluginCommandKeybindingActionId(command.pluginKey, command.id), + title: '', + group: '', + scope: 'global', + searchKeywords: [], + defaultBindings: { darwin: defaults, linux: defaults, win32: defaults } + } +} + +export function pluginCommandKeybindingDefinition( + command: ActivePluginCommand +): KeybindingDefinition { + return { + ...pluginCommandBindingDefinition(command), title: `${command.title} — ${command.pluginName}`, group: translate('auto.lib.pluginCommandKeybindings.group', 'Plugins'), - scope: 'global', searchKeywords: [ 'plugin', 'shortcut', command.title.toLowerCase(), command.pluginName.toLowerCase() - ], - defaultBindings: { darwin: defaults, linux: defaults, win32: defaults } + ] } } @@ -62,7 +71,7 @@ export function findPluginCommandForKeybinding( if (isWorkspaceScopedPluginContext(command.context) && !hasActiveWorktree) { continue } - const definition = pluginCommandKeybindingDefinition(command) + const definition = pluginCommandBindingDefinition(command) // Why: plugin chords obey the terminal shortcut policy exactly as Orca's own app shortcuts do (#15642). if (!keybindingIsActiveInContext(definition, options)) { continue