Skip to content

Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.

doc

Julius Marminge228862ac564e
diff --git a/KEYBINDINGS.md b/KEYBINDINGS.md
index 16fce1a4d..a44f1f5f4 100644
--- a/KEYBINDINGS.md
+++ b/KEYBINDINGS.md
@@ -23,8 +23,9 @@ See the full schema for more details: [`packages/contracts/src/keybindings.ts`](
{ "key": "mod+d", "command": "terminal.split", "when": "terminalFocus" },
{ "key": "mod+n", "command": "terminal.new", "when": "terminalFocus" },
{ "key": "mod+w", "command": "terminal.close", "when": "terminalFocus" },
- { "key": "mod+shift+o", "command": "chat.new" },
- { "key": "mod+shift+n", "command": "chat.newLocal" },
+ { "key": "mod+n", "command": "chat.new", "when": "!terminalFocus" },
+ { "key": "mod+shift+o", "command": "chat.new", "when": "!terminalFocus" },
+ { "key": "mod+shift+n", "command": "chat.newLocal", "when": "!terminalFocus" },
{ "key": "mod+o", "command": "editor.openFavorite" }
]
```
diff --git a/apps/server/src/keybindings.test.ts b/apps/server/src/keybindings.test.ts
index 364ebc486..d761588e9 100644
--- a/apps/server/src/keybindings.test.ts
+++ b/apps/server/src/keybindings.test.ts
@@ -1,10 +1,6 @@
import { assert, describe, it } from "vitest";
-import {
- DEFAULT_KEYBINDINGS,
- compileResolvedKeybindingRule,
- parseKeybindingShortcut,
-} from "./keybindings";
+import { compileResolvedKeybindingRule, parseKeybindingShortcut } from "./keybindings";
describe("server keybindings", () => {
it("parses shortcuts including plus key", () => {
@@ -70,16 +66,4 @@ describe("server keybindings", () => {
}),
);
});
-
- it("defines defaults for terminal.close and chat.newLocal", () => {
- assert.deepInclude(DEFAULT_KEYBINDINGS, {
- key: "mod+w",
- command: "terminal.close",
- when: "terminalFocus",
- });
- assert.deepInclude(DEFAULT_KEYBINDINGS, {
- key: "mod+shift+n",
- command: "chat.newLocal",
- });
- });
});
diff --git a/apps/server/src/keybindings.ts b/apps/server/src/keybindings.ts
index a78e25b31..97e2de438 100644
--- a/apps/server/src/keybindings.ts
+++ b/apps/server/src/keybindings.ts
@@ -29,8 +29,9 @@ export const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule> = [
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
{ key: "mod+n", command: "terminal.new", when: "terminalFocus" },
{ key: "mod+w", command: "terminal.close", when: "terminalFocus" },
- { key: "mod+shift+o", command: "chat.new" },
- { key: "mod+shift+n", command: "chat.newLocal" },
+ { key: "mod+n", command: "chat.new", when: "!terminalFocus" },
+ { key: "mod+shift+o", command: "chat.new", when: "!terminalFocus" },
+ { key: "mod+shift+n", command: "chat.newLocal", when: "!terminalFocus" },
{ key: "mod+o", command: "editor.openFavorite" },
];