Add configurable shortcuts for new chat and open-in-editor

- add `chat.new` and `editor.openFavorite` to keybinding contracts and server defaults
- use shared keybinding matching in sidebar/chat view instead of hardcoded Cmd/Ctrl combos
- document new commands/defaults and extend server/web keybinding tests
This commit is contained in:
Julius Marminge authored and Julius Marminge committed 2026-02-15 15:51:05 -08:00
1 parent 61e9ba4b19
commit ef4ce2e1ec
8 files changed
+122 -41

No files matched your search

+10
View File
@@ -313,6 +313,8 @@ describe("WebSocket Server", () => {
{ key: "mod+j", command: "terminal.toggle" },
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
{ key: "mod+shift+o", command: "chat.new" },
{ key: "mod+o", command: "editor.openFavorite" },
],
});
});
@@ -347,6 +349,8 @@ describe("WebSocket Server", () => {
expect(response.result).toEqual({
cwd: "/my/workspace",
keybindings: [
{ key: "mod+shift+o", command: "chat.new" },
{ key: "mod+o", command: "editor.openFavorite" },
{ key: "cmd+j", command: "terminal.toggle" },
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
@@ -386,6 +390,8 @@ describe("WebSocket Server", () => {
keybindings: [
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
{ key: "mod+shift+o", command: "chat.new" },
{ key: "mod+o", command: "editor.openFavorite" },
{ key: "mod+j", command: "terminal.toggle" },
],
});
@@ -426,6 +432,8 @@ describe("WebSocket Server", () => {
{ key: "mod+j", command: "terminal.toggle" },
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
{ key: "mod+shift+o", command: "chat.new" },
{ key: "mod+o", command: "editor.openFavorite" },
],
});
expect(
@@ -461,6 +469,8 @@ describe("WebSocket Server", () => {
{ key: "mod+j", command: "terminal.toggle" },
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+shift+d", command: "terminal.new", when: "terminalFocus" },
{ key: "mod+shift+o", command: "chat.new" },
{ key: "mod+o", command: "editor.openFavorite" },
],
});
expect(