The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 25, 18:30 UTC
fmt
Julius Marminge committed
Feb 17, 2026 at 16:09 UTC
ba4a62eb0335805b6aeab55d55836a2dfbb6d5b5
5 files changed
+50
-39
apps/web/src/chat-scroll.test.ts
+1
-4
@@ -1,9 +1,6 @@
1
import { describe, expect, it } from "vitest";
2
3
-import {
4
- AUTO_SCROLL_BOTTOM_THRESHOLD_PX,
5
- isScrollContainerNearBottom,
6
-} from "./chat-scroll";
3
+import { AUTO_SCROLL_BOTTOM_THRESHOLD_PX, isScrollContainerNearBottom } from "./chat-scroll";
4
5
describe("isScrollContainerNearBottom", () => {
6
it("returns true when already at bottom", () => {
apps/web/src/components/ChatView.tsx
+3
-1
@@ -1447,7 +1447,9 @@ const MessagesTimeline = memo(function MessagesTimeline({
1447
if (!hasMessages && !isWorking) {
1448
return (
1449
<div className="flex h-full items-center justify-center">
1450
- <p className="text-sm text-muted-foreground/30">Send a message to start the conversation.</p>
1450
+ <p className="text-sm text-muted-foreground/30">
1451
+ Send a message to start the conversation.
1452
+ </p>
1453
</div>
1454
);
1455
}
apps/web/src/components/GitActionsControl.tsx
+2
-1
@@ -627,7 +627,8 @@ export default function GitActionsControl({ api, gitCwd }: GitActionsControlProp
627
: gitStatusForActions.aheadCount === 0 &&
628
gitStatusForActions.behindCount === 0
629
? "Up to date"
630
- : gitStatusForActions.aheadCount > 0 && gitStatusForActions.behindCount > 0
630
+ : gitStatusForActions.aheadCount > 0 &&
631
+ gitStatusForActions.behindCount > 0
632
? `Diverged (+${gitStatusForActions.aheadCount} / -${gitStatusForActions.behindCount})`
633
: gitStatusForActions.aheadCount > 0
634
? `Ahead by ${gitStatusForActions.aheadCount}`
apps/web/src/keybindings.test.ts
+27
-20
@@ -98,7 +98,9 @@ const DEFAULT_BINDINGS = compile([
98
describe("isTerminalToggleShortcut", () => {
99
it("matches Cmd+J on macOS", () => {
100
assert.isTrue(
101
- isTerminalToggleShortcut(event({ metaKey: true }), DEFAULT_BINDINGS, { platform: "MacIntel" }),
101
+ isTerminalToggleShortcut(event({ metaKey: true }), DEFAULT_BINDINGS, {
102
+ platform: "MacIntel",
103
+ }),
104
);
105
});
106
@@ -219,7 +221,10 @@ describe("shortcutLabelForCommand", () => {
221
whenAst: whenNot(whenIdentifier("terminalFocus")),
222
},
223
]);
222
- assert.strictEqual(shortcutLabelForCommand(bindings, "terminal.split", "Linux"), "Ctrl+Shift+\\");
224
+ assert.strictEqual(
225
+ shortcutLabelForCommand(bindings, "terminal.split", "Linux"),
226
+ "Ctrl+Shift+\\",
227
+ );
228
});
229
230
it("returns labels for non-terminal commands", () => {
@@ -247,22 +252,14 @@ describe("chat/editor shortcuts", () => {
252
253
it("matches chat.newLocal shortcut", () => {
254
assert.isTrue(
250
- isChatNewLocalShortcut(
251
- event({ key: "n", metaKey: true, shiftKey: true }),
252
- DEFAULT_BINDINGS,
253
- {
254
- platform: "MacIntel",
255
- },
256
- ),
255
+ isChatNewLocalShortcut(event({ key: "n", metaKey: true, shiftKey: true }), DEFAULT_BINDINGS, {
256
+ platform: "MacIntel",
257
+ }),
258
);
259
assert.isTrue(
259
- isChatNewLocalShortcut(
260
- event({ key: "n", ctrlKey: true, shiftKey: true }),
261
- DEFAULT_BINDINGS,
262
- {
263
- platform: "Linux",
264
- },
265
- ),
260
+ isChatNewLocalShortcut(event({ key: "n", ctrlKey: true, shiftKey: true }), DEFAULT_BINDINGS, {
261
+ platform: "Linux",
262
+ }),
263
);
264
});
265
@@ -344,11 +341,17 @@ describe("cross-command precedence", () => {
341
342
describe("formatShortcutLabel", () => {
343
it("formats labels for macOS", () => {
347
- assert.strictEqual(formatShortcutLabel(modShortcut("d", { shiftKey: true }), "MacIntel"), "⇧⌘D");
344
+ assert.strictEqual(
345
+ formatShortcutLabel(modShortcut("d", { shiftKey: true }), "MacIntel"),
346
+ "⇧⌘D",
347
+ );
348
});
349
350
it("formats labels for non-macOS", () => {
351
- assert.strictEqual(formatShortcutLabel(modShortcut("d", { shiftKey: true }), "Linux"), "Ctrl+Shift+D");
351
+ assert.strictEqual(
352
+ formatShortcutLabel(modShortcut("d", { shiftKey: true }), "Linux"),
353
+ "Ctrl+Shift+D",
354
+ );
355
});
356
357
it("formats labels for plus key", () => {
@@ -368,7 +371,9 @@ describe("isTerminalClearShortcut", () => {
371
});
372
373
it("ignores non-keydown events", () => {
371
- assert.isFalse(isTerminalClearShortcut(event({ type: "keyup", key: "l", ctrlKey: true }), "Linux"));
374
+ assert.isFalse(
375
+ isTerminalClearShortcut(event({ type: "keyup", key: "l", ctrlKey: true }), "Linux"),
376
+ );
377
});
378
});
379
@@ -413,7 +418,9 @@ describe("terminalNavigationShortcutData", () => {
418
"MacIntel",
419
),
420
);
416
- assert.isNull(terminalNavigationShortcutData(event({ key: "ArrowLeft", metaKey: true }), "Linux"));
421
+ assert.isNull(
422
+ terminalNavigationShortcutData(event({ key: "ArrowLeft", metaKey: true }), "Linux"),
423
+ );
424
assert.isNull(terminalNavigationShortcutData(event({ key: "a", altKey: true }), "MacIntel"));
425
});
426
packages/contracts/src/keybindings.ts
+17
-13
@@ -21,14 +21,16 @@ export const keybindingRuleSchema = z.object({
21
22
export const keybindingsConfigSchema = z.array(keybindingRuleSchema).max(256);
23
24
-export const keybindingShortcutSchema = z.object({
25
- key: z.string().trim().min(1).max(32),
26
- metaKey: z.boolean(),
27
- ctrlKey: z.boolean(),
28
- shiftKey: z.boolean(),
29
- altKey: z.boolean(),
30
- modKey: z.boolean(),
31
-}).strict();
24
+export const keybindingShortcutSchema = z
25
+ .object({
26
+ key: z.string().trim().min(1).max(32),
27
+ metaKey: z.boolean(),
28
+ ctrlKey: z.boolean(),
29
+ shiftKey: z.boolean(),
30
+ altKey: z.boolean(),
31
+ modKey: z.boolean(),
32
+ })
33
+ .strict();
34
35
export type KeybindingWhenNode =
36
| { type: "identifier"; name: string }
@@ -59,11 +61,13 @@ export const keybindingWhenNodeSchema: z.ZodType<KeybindingWhenNode> = z.lazy(()
61
]),
62
);
63
62
-export const resolvedKeybindingRuleSchema = z.object({
63
- command: keybindingCommandSchema,
64
- shortcut: keybindingShortcutSchema,
65
- whenAst: keybindingWhenNodeSchema.optional(),
66
-}).strict();
64
+export const resolvedKeybindingRuleSchema = z
65
+ .object({
66
+ command: keybindingCommandSchema,
67
+ shortcut: keybindingShortcutSchema,
68
+ whenAst: keybindingWhenNodeSchema.optional(),
69
+ })
70
+ .strict();
71
72
export const resolvedKeybindingsConfigSchema = z.array(resolvedKeybindingRuleSchema).max(256);
73