Skip to content

The agent that grows with you

fix(desktop): put Toggle terminal on the ⌘K on/off pattern

Brooklyn Nicholson35724244025a
diff --git a/apps/desktop/src/app/command-palette/index.tsx b/apps/desktop/src/app/command-palette/index.tsx
index ce9f0149e50..f9a640000ab 100644
--- a/apps/desktop/src/app/command-palette/index.tsx
+++ b/apps/desktop/src/app/command-palette/index.tsx
@@ -13,7 +13,6 @@ import {
HUD_SURFACE,
HUD_TEXT
} from '@/app/floating-hud'
-import { setTerminalTakeover } from '@/app/right-sidebar/store'
import { codiconIcon } from '@/components/ui/codicon'
import { Command, CommandGroup, CommandInput, CommandItem, CommandList } from '@/components/ui/command'
import { HighlightMatches } from '@/components/ui/highlight-matches'
@@ -52,7 +51,6 @@ import {
SlidersHorizontal,
Starmap,
Sun,
- Terminal,
Users,
Wrench,
Zap
@@ -771,14 +769,6 @@ function CommandPaletteBody({ onExited }: { onExited: () => void }) {
}
]
: []),
- {
- action: 'view.showTerminal',
- icon: Terminal,
- id: 'nav-terminal',
- keywords: ['terminal', 'shell', 'console'],
- label: t.keybinds.actions['view.showTerminal'],
- run: () => setTerminalTakeover(true)
- },
{
action: 'nav.settings',
icon: Settings,
diff --git a/apps/desktop/src/app/contrib/controller.tsx b/apps/desktop/src/app/contrib/controller.tsx
index 9e01cde324a..c6b5cd3296b 100644
--- a/apps/desktop/src/app/contrib/controller.tsx
+++ b/apps/desktop/src/app/contrib/controller.tsx
@@ -36,7 +36,7 @@ import { useContributions } from '@/contrib/react/use-contributions'
import { registry } from '@/contrib/registry'
import { discoverRuntimePlugins } from '@/contrib/runtime-loader'
import { sessionTitle as storedSessionTitle } from '@/lib/chat-runtime'
-import { FileText, LayoutDashboard, PanelBottom, Zap } from '@/lib/icons'
+import { FileText, LayoutDashboard, PanelBottom, Terminal, Zap } from '@/lib/icons'
import { type KeybindContribution, KEYBINDS_AREA } from '@/lib/keybinds/actions'
import { Codecs, persistentAtom } from '@/lib/persisted'
import { setYoloEnabled } from '@/lib/yolo-session'
@@ -579,6 +579,19 @@ bindPaneCollapse(
() => setTerminalTakeover(false),
() => setTerminalTakeover(true)
)
+// ⌘K door onto the same store the keybind and statusbar pill flip — was a
+// one-way "open" row under Go to, so it never showed on/off and couldn't hide.
+registry.register(
+ paletteToggle({
+ id: 'view.showTerminal',
+ label: 'Toggle terminal',
+ action: 'view.showTerminal',
+ icon: Terminal,
+ keywords: ['terminal', 'shell', 'console', 'pty'],
+ get: () => $terminalTakeover.get(),
+ set: setTerminalTakeover
+ })
+)
// Preview EXISTS only while something is previewed (old-shell semantics:
// closing the last preview tab closes the pane; a new target opens + fronts