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, 17:15 UTC
phase 6
Julius Marminge committed
Feb 25, 2026 at 17:15 UTC
e7743632ecc89ddec30dc01d9553353a1f062c83
5 files changed
+14
-29
apps/web/src/components/BranchToolbar.tsx
+3
-12
@@ -2,7 +2,7 @@ import type { GitBranch, ThreadId } from "@t3tools/contracts";
2
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
3
import { useEffect, useState } from "react";
4
5
-import { newCommandId } from "../lib/orchestrationIds";
5
+import { newCommandId } from "../lib/utils";
6
import {
7
gitBranchesQueryOptions,
8
gitCheckoutMutationOptions,
@@ -70,9 +70,7 @@ export default function BranchToolbar({
70
: branchNames;
71
// ── Mutations ─────────────────────────────────────────────────────────
72
73
- const checkoutMutation = useMutation(
74
- gitCheckoutMutationOptions({ cwd: branchCwd, queryClient }),
75
- );
73
+ const checkoutMutation = useMutation(gitCheckoutMutationOptions({ cwd: branchCwd, queryClient }));
74
75
const createBranchMutation = useMutation(
76
gitCreateBranchAndCheckoutMutationOptions({ cwd: branchCwd, queryClient }),
@@ -108,14 +106,7 @@ export default function BranchToolbar({
106
branch: syncedBranch,
107
worktreePath: null,
108
});
111
- }, [
112
- activeThreadId,
113
- activeWorktreePath,
114
- activeThreadBranch,
115
- queryBranches,
116
- envMode,
117
- dispatch,
118
- ]);
109
+ }, [activeThreadId, activeWorktreePath, activeThreadBranch, queryBranches, envMode, dispatch]);
110
111
useEffect(() => {
112
if (isBranchMenuOpen) return;
apps/web/src/components/ChatView.tsx
+1
-1
@@ -103,7 +103,7 @@ import {
103
} from "~/projectScripts";
104
import { Toggle } from "./ui/toggle";
105
import { SidebarTrigger } from "./ui/sidebar";
106
-import { newCommandId, newMessageId } from "~/lib/orchestrationIds";
106
+import { newCommandId, newMessageId } from "~/lib/utils";
107
import { readNativeApi } from "~/nativeApi";
108
109
function formatMessageMeta(createdAt: string, duration: string | null): string {
apps/web/src/components/Sidebar.tsx
+1
-1
@@ -11,7 +11,7 @@ import { useNavigate, useParams } from "@tanstack/react-router";
11
import { useAppSettings } from "../appSettings";
12
import { isElectron } from "../env";
13
import { APP_STAGE_LABEL } from "../branding";
14
-import { newCommandId, newProjectId, newThreadId } from "../lib/orchestrationIds";
14
+import { newCommandId, newProjectId, newThreadId } from "../lib/utils";
15
import { useStore } from "../store";
16
import { isChatNewLocalShortcut, isChatNewShortcut } from "../keybindings";
17
import { type Thread } from "../types";
apps/web/src/lib/orchestrationIds.ts
deleted
-15
@@ -1,15 +0,0 @@
1
-import { ApprovalRequestId, CommandId, MessageId, ProjectId, ThreadId } from "@t3tools/contracts";
2
-
3
-export const newCommandId = (): CommandId => CommandId.makeUnsafe(crypto.randomUUID());
4
-
5
-export const newProjectId = (): ProjectId => ProjectId.makeUnsafe(crypto.randomUUID());
6
-
7
-export const newThreadId = (): ThreadId => ThreadId.makeUnsafe(crypto.randomUUID());
8
-
9
-export const newMessageId = (): MessageId => MessageId.makeUnsafe(crypto.randomUUID());
10
-
11
-
12
-export const asProjectId = (value: string): ProjectId => ProjectId.makeUnsafe(value);
13
-
14
-export const asApprovalRequestId = (value: string): ApprovalRequestId =>
15
- ApprovalRequestId.makeUnsafe(value);
apps/web/src/lib/utils.ts
+9
@@ -1,3 +1,4 @@
1
+import { CommandId, MessageId, ProjectId, ThreadId } from "@t3tools/contracts";
2
import { type CxOptions, cx } from "class-variance-authority";
3
import { twMerge } from "tailwind-merge";
4
@@ -12,3 +13,11 @@ export function isMacPlatform(platform: string): boolean {
13
export function isWindowsPlatform(platform: string): boolean {
14
return /^win(dows)?/i.test(platform);
15
}
16
+
17
+export const newCommandId = (): CommandId => CommandId.makeUnsafe(crypto.randomUUID());
18
+
19
+export const newProjectId = (): ProjectId => ProjectId.makeUnsafe(crypto.randomUUID());
20
+
21
+export const newThreadId = (): ThreadId => ThreadId.makeUnsafe(crypto.randomUUID());
22
+
23
+export const newMessageId = (): MessageId => MessageId.makeUnsafe(crypto.randomUUID());