mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 17:01:37 +03:00
fix(tui): toggle internal plugin controls
This commit is contained in:
@@ -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"),
|
||||
|
||||
|
||||
@@ -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"),
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user