Skip to content

Commit d377e56

Browse files
juliusmarmingecodex
andcommitted
Merge origin/main into codething/50e6e9da
Co-authored-by: codex <[email protected]>
2 parents 38644b0 + 73fa2d6 commit d377e56

14 files changed

Lines changed: 938 additions & 447 deletions

‎KEYBINDINGS.md‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,10 @@ See the full schema for more details: [`packages/contracts/src/keybindings.ts`](
2222
{ "key": "mod+j", "command": "terminal.toggle" },
2323
{ "key": "mod+d", "command": "terminal.split", "when": "terminalFocus" },
2424
{ "key": "mod+n", "command": "terminal.new", "when": "terminalFocus" },
25-
{ "key": "mod+shift+o", "command": "chat.new" },
25+
{ "key": "mod+w", "command": "terminal.close", "when": "terminalFocus" },
26+
{ "key": "mod+n", "command": "chat.new", "when": "!terminalFocus" },
27+
{ "key": "mod+shift+o", "command": "chat.new", "when": "!terminalFocus" },
28+
{ "key": "mod+shift+n", "command": "chat.newLocal", "when": "!terminalFocus" },
2629
{ "key": "mod+o", "command": "editor.openFavorite" }
2730
]
2831
```
@@ -46,7 +49,9 @@ Invalid rules are ignored. Invalid config files are ignored. Warnings are logged
4649
- `terminal.toggle`: open/close terminal drawer
4750
- `terminal.split`: split terminal (in focused terminal context by default)
4851
- `terminal.new`: create new terminal (in focused terminal context by default)
49-
- `chat.new`: create a new chat thread for the active project
52+
- `terminal.close`: close/kill the focused terminal (in focused terminal context by default)
53+
- `chat.new`: create a new chat thread preserving the active thread's branch/worktree state
54+
- `chat.newLocal`: create a new local chat thread for the active project (no worktree context)
5055
- `editor.openFavorite`: open current project/worktree in the last-used editor
5156

5257
### Key Syntax

‎apps/server/src/keybindings.ts‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,10 @@ export const DEFAULT_KEYBINDINGS: ReadonlyArray<KeybindingRule> = [
2828
{ key: "mod+j", command: "terminal.toggle" },
2929
{ key: "mod+d", command: "terminal.split", when: "terminalFocus" },
3030
{ key: "mod+n", command: "terminal.new", when: "terminalFocus" },
31-
{ key: "mod+shift+o", command: "chat.new" },
31+
{ key: "mod+w", command: "terminal.close", when: "terminalFocus" },
32+
{ key: "mod+n", command: "chat.new", when: "!terminalFocus" },
33+
{ key: "mod+shift+o", command: "chat.new", when: "!terminalFocus" },
34+
{ key: "mod+shift+n", command: "chat.newLocal", when: "!terminalFocus" },
3235
{ key: "mod+o", command: "editor.openFavorite" },
3336
];
3437

‎apps/web/src/components/ChatMarkdown.tsx‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { memo } from "react";
12
import type { Components } from "react-markdown";
23
import ReactMarkdown from "react-markdown";
34
import rehypeHighlight from "rehype-highlight";
@@ -13,7 +14,7 @@ const markdownComponents: Components = {
1314
},
1415
};
1516

16-
export default function ChatMarkdown({ text }: ChatMarkdownProps) {
17+
function ChatMarkdown({ text }: ChatMarkdownProps) {
1718
return (
1819
<div className="chat-markdown text-sm leading-relaxed text-foreground/80">
1920
<ReactMarkdown
@@ -26,3 +27,5 @@ export default function ChatMarkdown({ text }: ChatMarkdownProps) {
2627
</div>
2728
);
2829
}
30+
31+
export default memo(ChatMarkdown);

0 commit comments

Comments
 (0)