From c17c1048270c9f69b9e904a2cd47f482b6a96b31 Mon Sep 17 00:00:00 2001 From: Dax Raad Date: Mon, 31 Aug 2026 14:24:53 -0400 Subject: [PATCH] fix(tui): toggle internal plugin controls --- packages/tui/src/config/keybind.ts | 2 +- packages/tui/src/config/v1/keybind.ts | 2 +- .../src/feature-plugins/system/plugins.tsx | 26 ++++++++----------- 3 files changed, 13 insertions(+), 17 deletions(-) diff --git a/packages/tui/src/config/keybind.ts b/packages/tui/src/config/keybind.ts index ba611af4166..fd3595df647 100644 --- a/packages/tui/src/config/keybind.ts +++ b/packages/tui/src/config/keybind.ts @@ -268,7 +268,7 @@ export const Definitions = { "prompt.autocomplete.select": keybind("return", "Select autocomplete item"), "prompt.autocomplete.complete": keybind("tab", "Complete autocomplete item"), "permission.prompt.fullscreen": keybind("ctrl+f", "Toggle permission prompt fullscreen"), - "plugins.toggle": keybind("space", "Toggle plugin"), + "plugins.toggle": keybind("return", "Toggle plugin"), "dialog.mcp.toggle": keybind("space", "Toggle MCP server"), "dialog.plugins.install": keybind("shift+i", "Install plugin from plugin dialog"), diff --git a/packages/tui/src/config/v1/keybind.ts b/packages/tui/src/config/v1/keybind.ts index e34f1a8dc54..be00ce28bf1 100644 --- a/packages/tui/src/config/v1/keybind.ts +++ b/packages/tui/src/config/v1/keybind.ts @@ -230,7 +230,7 @@ export const Definitions = { "prompt.autocomplete.select": keybind("return", "Select autocomplete item"), "prompt.autocomplete.complete": keybind("tab", "Complete autocomplete item"), "permission.prompt.fullscreen": keybind("ctrl+f", "Toggle permission prompt fullscreen"), - "plugins.toggle": keybind("space", "Toggle plugin"), + "plugins.toggle": keybind("return", "Toggle plugin"), "dialog.mcp.toggle": keybind("space", "Toggle MCP server"), terminal_suspend: keybind("ctrl+z", "Suspend terminal"), diff --git a/packages/tui/src/feature-plugins/system/plugins.tsx b/packages/tui/src/feature-plugins/system/plugins.tsx index eb30b5bad7a..ce259c9cd74 100644 --- a/packages/tui/src/feature-plugins/system/plugins.tsx +++ b/packages/tui/src/feature-plugins/system/plugins.tsx @@ -142,21 +142,17 @@ export function PluginsDialog(props: { current={initial()} locked={locked()} preserveSelection={true} - bindings={ - showInternal() - ? [] - : [ - { - bind: "ctrl+a", - title: "Show internal plugins", - group: "Plugins", - run: () => { - setShowInternal(true) - }, - }, - ] - } - footerHints={showInternal() ? [] : [{ title: "ctrl+a", label: "show internal" }]} + bindings={[ + { + bind: "ctrl+a", + title: "Toggle internal plugins", + group: "Plugins", + run: () => { + setShowInternal((value) => !value) + }, + }, + ]} + footerHints={[{ title: "ctrl+a", label: `${showInternal() ? "hide" : "show"} internal` }]} onMove={(option) => setFocused(option.value)} onSelect={(option) => { const entry = entries().find((entry) => entry.key === option.value)