@devries-cameron20 / t3code Mirror · read-only / commits / 060a8cef00
Fork 0

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

fmt

Julius Marminge committed Feb 22, 2026 at 11:13 UTC 060a8cef00dee1728be2fa7cd96ad0332ad15353
6 files changed +21 -20
apps/server/src/codexTextGenerator.ts
+7 -5
@@ -12,11 +12,13 @@ import type {
12 } from "./coreServices";
13 import { type ProcessRunOptions, type ProcessRunResult, runProcess } from "./processRunner";
14
15 -type ProcessRunner = (
16 - command: string,
17 - args: readonly string[],
18 - options?: ProcessRunOptions,
19 -) => Promise<ProcessRunResult>;
15 +interface ProcessRunner {
16 + (
17 + command: string,
18 + args: readonly string[],
19 + options?: ProcessRunOptions,
20 + ): Promise<ProcessRunResult>;
21 +}
22
23 const CODEX_MODEL = "gpt-5.3-codex";
24 const CODEX_REASONING_EFFORT = "low";
apps/server/src/git.ts
+6 -6
@@ -29,7 +29,7 @@ export interface TerminalCommandInput {
29 maxOutputBytes?: number;
30 }
31
32 -export type TerminalCommandResult = ProcessRunResult;
32 +
33
34 export interface GitStatusDetails extends Omit<GitStatusResult, "openPr"> {
35 upstreamRef: string | null;
@@ -159,7 +159,7 @@ function normalizeGitSpawnError(cwd: string, error: unknown): Error {
159 return new Error(`Failed to run git command: ${error.message}`);
160 }
161
162 -function normalizeGitExecutionError(args: readonly string[], result: TerminalCommandResult): Error {
162 +function normalizeGitExecutionError(args: readonly string[], result: ProcessRunResult): Error {
163 const stderr = result.stderr.trim();
164 if (stderr.toLowerCase().includes("not a git repository")) {
165 return new Error("Current folder is not a git repository.");
@@ -176,8 +176,8 @@ async function runGitOrThrow(
176 cwd: string,
177 args: readonly string[],
178 options: RunGitOptions = {},
179 -): Promise<TerminalCommandResult> {
180 - let result: TerminalCommandResult;
179 +): Promise<ProcessRunResult> {
180 + let result: ProcessRunResult;
181 try {
182 result = await runGit(args, cwd, options.timeoutMs);
183 } catch (error) {
@@ -197,7 +197,7 @@ async function executeGit(
197 cwd: string,
198 args: readonly string[],
199 options: ExecuteGitOptions = {},
200 -): Promise<TerminalCommandResult> {
200 +): Promise<ProcessRunResult> {
201 const result = await runGitOrThrow(cwd, args, {
202 timeoutMs: options.timeoutMs,
203 allowNonZeroExit: true,
@@ -680,7 +680,7 @@ const defaultGitCoreService = new GitCoreService();
680
681 export async function runTerminalCommand(
682 input: TerminalCommandInput,
683 -): Promise<TerminalCommandResult> {
683 +): Promise<ProcessRunResult> {
684 const maxOutputBytes = input.maxOutputBytes ?? DEFAULT_MAX_OUTPUT_BYTES;
685 const shellPath =
686 process.platform === "win32"
apps/server/src/orchestration/Layer.ts
+2 -2
@@ -17,10 +17,10 @@ import {
17 import { createEmptyReadModel, reduceEvent } from "./reducer.ts";
18 import { OrchestrationEngineService, type OrchestrationEngineShape } from "./Service.ts";
19
20 -type CommandEnvelope = {
20 +interface CommandEnvelope {
21 command: OrchestrationCommand;
22 result: Deferred.Deferred<{ sequence: number }, OrchestrationDispatchError>;
23 -};
23 +}
24
25 function mapCommandToEvent(command: OrchestrationCommand): Omit<OrchestrationEvent, "sequence"> {
26 const eventId = crypto.randomUUID();
apps/server/src/persistence/Layers/OrchestrationEvents.ts
+1 -3
@@ -30,8 +30,6 @@ const EventRowSchema = Schema.Struct({
30 payloadJson: Schema.String,
31 });
32
33 -type EventRow = Schema.Schema.Type<typeof EventRowSchema>;
34 -
33 const AppendEventRequestSchema = Schema.Struct({
34 eventId: Schema.String,
35 type: Schema.String,
@@ -48,7 +46,7 @@ const ReadFromSequenceRequestSchema = Schema.Struct({
46 });
47
48 function eventRowToOrchestrationEvent(
51 - row: EventRow,
49 + row: Schema.Schema.Type<typeof EventRowSchema>,
50 operation: string,
51 ): Effect.Effect<OrchestrationEvent, OrchestrationEventRepositoryError> {
52 return Effect.try({
apps/server/src/persistence/Layers/Projects.ts
+1 -3
@@ -44,8 +44,6 @@ const ProjectRowSchema = Schema.Struct({
44 updatedAt: Schema.String,
45 });
46
47 -type ProjectRow = Schema.Schema.Type<typeof ProjectRowSchema>;
48 -
47 const FindByIdRequestSchema = Schema.Struct({
48 id: Schema.String,
49 });
@@ -137,7 +135,7 @@ function decodeScriptsJson(
135 }
136
137 function rowToProjectRecord(
140 - row: ProjectRow,
138 + row: Schema.Schema.Type<typeof ProjectRowSchema>,
139 operation: string,
140 ): Effect.Effect<ProjectRecord, ProjectRepositoryError> {
141 return decodeScriptsJson(row.scriptsJson, `${operation}:scripts`).pipe(
apps/server/src/terminalManager.ts
+4 -1
@@ -69,7 +69,10 @@ interface ShellCandidate {
69 args?: string[];
70 }
71
72 -type TerminalStartInput = TerminalOpenInput & { cols: number; rows: number };
72 +interface TerminalStartInput extends TerminalOpenInput {
73 + cols: number;
74 + rows: number
75 +};
76
77 function defaultShellResolver(): string {
78 if (process.platform === "win32") {