@devries-cameron20 / t3code Mirror · read-only
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 21, 04:45 UTC

main
ts 20 lines 686 Bytes
Raw
1 import type { CodexSettings, ProviderInstanceId } from "@t3tools/contracts";
2 import * as Effect from "effect/Effect";
3 import * as Path from "effect/Path";
4 import { resolveCodexHomeLayout } from "./Drivers/CodexHomeLayout.ts";
5
6 export const resolveManagedCodexHomeLayout = Effect.fn("resolveManagedCodexHomeLayout")(function* (
7 stateDir: string,
8 instanceId: ProviderInstanceId,
9 config: CodexSettings,
10 ) {
11 const path = yield* Path.Path;
12 return yield* resolveCodexHomeLayout({
13 ...config,
14 shadowHomePath:
15 config.shadowHomePath.trim() ||
16 (instanceId === "codex"
17 ? ""
18 : path.join(stateDir, "providers", "codex", instanceId, "shadow")),
19 });
20 });