Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions apps/web/src/components/ChatView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4860,6 +4860,13 @@ function ChatViewContent(props: ChatViewProps) {
return;
}

if (command === "rightPanel.openTerminal") {
event.preventDefault();
event.stopPropagation();
addTerminalSurface();
return;
}

if (command === "terminal.split") {
event.preventDefault();
event.stopPropagation();
Expand Down
3 changes: 3 additions & 0 deletions docs/user/keybindings.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ successful pick; its hover glow and badge preview the element and color family t
`rightPanel.toggleMaximized` maximizes or restores the open right panel. It has no default shortcut,
so add one in **Settings** → **Keybindings** if you want to use it.

`rightPanel.openTerminal` opens a terminal as a right-panel surface for the active thread,
independent of the bottom drawer, and defaults to `mod+alt+j`.

The command palette searches active thread titles, projects, branches, user messages, and final
agent responses across connected environments. Message matches show one labeled excerpt while
keeping the thread's project, branch, and machine context visible. Message search begins after two
Expand Down
1 change: 1 addition & 0 deletions packages/contracts/src/keybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const STATIC_KEYBINDING_COMMANDS = [
"terminal.close",
"rightPanel.toggle",
"rightPanel.toggleMaximized",
"rightPanel.openTerminal",
"diff.toggle",
"preview.toggle",
"preview.refresh",
Expand Down
24 changes: 24 additions & 0 deletions packages/shared/src/keybindings.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { describe, expect, it } from "vite-plus/test";

import { DEFAULT_KEYBINDINGS, DEFAULT_RESOLVED_KEYBINDINGS } from "./keybindings.ts";

describe("DEFAULT_KEYBINDINGS", () => {
it("binds mod+alt+j to rightPanel.openTerminal", () => {
const rules = DEFAULT_KEYBINDINGS.filter((rule) => rule.command === "rightPanel.openTerminal");
expect(rules).toEqual([{ key: "mod+alt+j", command: "rightPanel.openTerminal" }]);
});

it("resolves the rightPanel.openTerminal default binding", () => {
const binding = DEFAULT_RESOLVED_KEYBINDINGS.find(
(rule) => rule.command === "rightPanel.openTerminal",
);
expect(binding?.shortcut).toEqual({
key: "j",
metaKey: false,
ctrlKey: false,
shiftKey: false,
altKey: true,
modKey: true,
});
});
});
1 change: 1 addition & 0 deletions packages/shared/src/keybindings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule> = [
{ key: "mod+b", command: "sidebar.toggle" },
{ key: "mod+j", command: "terminal.toggle" },
{ key: "mod+alt+b", command: "rightPanel.toggle" },
{ key: "mod+alt+j", command: "rightPanel.openTerminal" },
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.splitVertical", when: "terminalFocus" },
{ key: "mod+n", command: "terminal.new", when: "terminalFocus" },
Expand Down
Loading