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.
Preserve $defs in Codex output schema and refine sidebar header
Julius Marminge5ca9b54d6627
diff --git a/apps/server/src/git/Layers/CodexTextGeneration.ts b/apps/server/src/git/Layers/CodexTextGeneration.tsindex 064d4da9c..d2450e7a8 100644--- a/apps/server/src/git/Layers/CodexTextGeneration.ts+++ b/apps/server/src/git/Layers/CodexTextGeneration.ts@@ -19,6 +19,17 @@ const CODEX_MODEL = "gpt-5.3-codex";const CODEX_REASONING_EFFORT = "low";const CODEX_TIMEOUT_MS = 180_000;+function toCodexOutputJsonSchema(schema: Schema.Top): unknown {+ const document = Schema.toJsonSchemaDocument(schema);+ if (document.definitions && Object.keys(document.definitions).length > 0) {+ return {+ ...document.schema,+ $defs: document.definitions,+ };+ }+ return document.schema;+}+function normalizeCodexError(operation: string,error: unknown,@@ -204,7 +215,7 @@ const makeCodexTextGeneration = Effect.gen(function* () {const schemaPath = yield* writeTempFile(operation,"codex-schema",- JSON.stringify(Schema.toJsonSchemaDocument(outputSchemaJson).schema),+ JSON.stringify(toCodexOutputJsonSchema(outputSchemaJson)),);const outputPath = yield* writeTempFile(operation, "codex-output", "");diff --git a/apps/web/src/components/Sidebar.tsx b/apps/web/src/components/Sidebar.tsxindex f6e477417..b19dff76b 100644--- a/apps/web/src/components/Sidebar.tsx+++ b/apps/web/src/components/Sidebar.tsx@@ -171,7 +171,7 @@ function T3Wordmark() {return (<svgaria-label="T3"- className="h-3 w-auto shrink-0 text-foreground"+ className="h-2.5 w-auto shrink-0 text-foreground"viewBox="15.5309 37 94.3941 56.96"xmlns="http://www.w3.org/2000/svg">@@ -312,7 +312,7 @@ export default function Sidebar() {const status = target.cwd ? statusByCwd.get(target.cwd) : undefined;const branchMatches =target.branch !== null && status?.branch !== null && status?.branch === target.branch;- map.set(target.threadId, branchMatches ? status?.pr ?? null : null);+ map.set(target.threadId, branchMatches ? (status?.pr ?? null) : null);}return map;}, [threadGitStatusCwds, threadGitStatusQueries, threadGitTargets]);@@ -689,9 +689,7 @@ export default function Sidebar() {void handleNewThread(projectId, {branch: activeThread?.branch ?? activeDraftThread?.branch ?? null,worktreePath: activeThread?.worktreePath ?? activeDraftThread?.worktreePath ?? null,- envMode:- activeDraftThread?.envMode ??- (activeThread?.worktreePath ? "worktree" : "local"),+ envMode: activeDraftThread?.envMode ?? (activeThread?.worktreePath ? "worktree" : "local"),});};@@ -711,14 +709,14 @@ export default function Sidebar() {};const wordmark = (- <div className={`flex items-center gap-2 ${isElectron ? "-translate-y-px" : ""}`}>+ <div className="flex items-center gap-2"><SidebarTrigger className="shrink-0 md:hidden" />- <div className="flex min-w-0 flex-1 items-center gap-1">+ <div className="flex min-w-0 flex-1 items-center gap-1 mt-2 ml-1"><T3Wordmark />- <span className="truncate text-base font-medium tracking-tight text-muted-foreground">+ <span className="truncate text-sm font-medium tracking-tight text-muted-foreground">Code</span>- <span className="rounded-full bg-muted/50 px-1.5 py-0.5 text-[9px] font-medium uppercase tracking-widest text-muted-foreground/60">+ <span className="rounded-full bg-muted/50 px-1.5 py-0.5 text-[8px] font-medium uppercase tracking-[0.18em] text-muted-foreground/60">{APP_STAGE_LABEL}</span></div>@@ -740,10 +738,10 @@ export default function Sidebar() {<>{isElectron ? (<>- <SidebarHeader className="drag-region h-[52px] flex-row items-center gap-2 px-4 py-0 pl-[88px]">+ <SidebarHeader className="drag-region h-[52px] flex-row items-center gap-2 px-4 py-0 pl-[82px]">{wordmark}</SidebarHeader>- <div className="px-4 pb-2">{newThreadButton}</div>+ <div className="px-4 py-2">{newThreadButton}</div></>) : (<SidebarHeader className="gap-3 px-3 py-2 sm:gap-2.5 sm:px-4 sm:py-3">