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.
phase 6
Julius Marmingee7743632ecc8
diff --git a/apps/web/src/components/BranchToolbar.tsx b/apps/web/src/components/BranchToolbar.tsxindex 374902ea6..904ef96e2 100644--- a/apps/web/src/components/BranchToolbar.tsx+++ b/apps/web/src/components/BranchToolbar.tsx@@ -2,7 +2,7 @@ import type { GitBranch, ThreadId } from "@t3tools/contracts";import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";import { useEffect, useState } from "react";-import { newCommandId } from "../lib/orchestrationIds";+import { newCommandId } from "../lib/utils";import {gitBranchesQueryOptions,gitCheckoutMutationOptions,@@ -70,9 +70,7 @@ export default function BranchToolbar({: branchNames;// ── Mutations ─────────────────────────────────────────────────────────- const checkoutMutation = useMutation(- gitCheckoutMutationOptions({ cwd: branchCwd, queryClient }),- );+ const checkoutMutation = useMutation(gitCheckoutMutationOptions({ cwd: branchCwd, queryClient }));const createBranchMutation = useMutation(gitCreateBranchAndCheckoutMutationOptions({ cwd: branchCwd, queryClient }),@@ -108,14 +106,7 @@ export default function BranchToolbar({branch: syncedBranch,worktreePath: null,});- }, [- activeThreadId,- activeWorktreePath,- activeThreadBranch,- queryBranches,- envMode,- dispatch,- ]);+ }, [activeThreadId, activeWorktreePath, activeThreadBranch, queryBranches, envMode, dispatch]);useEffect(() => {if (isBranchMenuOpen) return;diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsxindex 1c528379f..0adc025eb 100644--- a/apps/web/src/components/ChatView.tsx+++ b/apps/web/src/components/ChatView.tsx@@ -103,7 +103,7 @@ import {} from "~/projectScripts";import { Toggle } from "./ui/toggle";import { SidebarTrigger } from "./ui/sidebar";-import { newCommandId, newMessageId } from "~/lib/orchestrationIds";+import { newCommandId, newMessageId } from "~/lib/utils";import { readNativeApi } from "~/nativeApi";function formatMessageMeta(createdAt: string, duration: string | null): string {diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex 3aef2b7f4..99dcdb62e 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -11,7 +11,7 @@ import { useNavigate, useParams } from "@tanstack/react-router";import { useAppSettings } from "../appSettings";import { isElectron } from "../env";import { APP_STAGE_LABEL } from "../branding";-import { newCommandId, newProjectId, newThreadId } from "../lib/orchestrationIds";+import { newCommandId, newProjectId, newThreadId } from "../lib/utils";import { useStore } from "../store";import { isChatNewLocalShortcut, isChatNewShortcut } from "../keybindings";import { type Thread } from "../types";diff --git a/apps/web/src/lib/orchestrationIds.ts b/apps/web/src/lib/orchestrationIds.tsdeleted file mode 100644index c288fdd4f..000000000--- a/apps/web/src/lib/orchestrationIds.ts+++ /dev/null@@ -1,15 +0,0 @@-import { ApprovalRequestId, CommandId, MessageId, ProjectId, ThreadId } from "@t3tools/contracts";--export const newCommandId = (): CommandId => CommandId.makeUnsafe(crypto.randomUUID());--export const newProjectId = (): ProjectId => ProjectId.makeUnsafe(crypto.randomUUID());--export const newThreadId = (): ThreadId => ThreadId.makeUnsafe(crypto.randomUUID());--export const newMessageId = (): MessageId => MessageId.makeUnsafe(crypto.randomUUID());---export const asProjectId = (value: string): ProjectId => ProjectId.makeUnsafe(value);--export const asApprovalRequestId = (value: string): ApprovalRequestId =>- ApprovalRequestId.makeUnsafe(value);diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.tsindex d9d5575a5..7684e68d7 100644--- a/apps/web/src/lib/utils.ts+++ b/apps/web/src/lib/utils.ts@@ -1,3 +1,4 @@+import { CommandId, MessageId, ProjectId, ThreadId } from "@t3tools/contracts";import { type CxOptions, cx } from "class-variance-authority";import { twMerge } from "tailwind-merge";@@ -12,3 +13,11 @@ export function isMacPlatform(platform: string): boolean {export function isWindowsPlatform(platform: string): boolean {return /^win(dows)?/i.test(platform);}++export const newCommandId = (): CommandId => CommandId.makeUnsafe(crypto.randomUUID());++export const newProjectId = (): ProjectId => ProjectId.makeUnsafe(crypto.randomUUID());++export const newThreadId = (): ThreadId => ThreadId.makeUnsafe(crypto.randomUUID());++export const newMessageId = (): MessageId => MessageId.makeUnsafe(crypto.randomUUID());