Merge pull request #75862 from NousResearch/bb/cmdk-on-off
fix(desktop): put Toggle terminal on the ⌘K on/off pattern
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -37,7 +37,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 { setYoloEnabled } from '@/lib/yolo-session'
|
||||
import { pruneComposerPopoutZones } from '@/store/composer-popout'
|
||||
@@ -568,6 +568,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
|
||||
|
||||
Reference in New Issue
Block a user