| ... | @@ -22,13 +22,16 @@ import type { | ... | @@ -22,13 +22,16 @@ import type { |
| 22 | import { ServerSettingsError } from "@t3tools/contracts"; | 22 | import { ServerSettingsError } from "@t3tools/contracts"; |
| 23 | | 23 | |
| 24 | import { createModelCapabilities } from "@t3tools/shared/model"; | 24 | import { createModelCapabilities } from "@t3tools/shared/model"; |
| 25 | import { buildServerProvider, type ServerProviderDraft } from "../providerSnapshot.ts"; | 25 | import { |
| | 26 | AUTH_PROBE_TIMEOUT_MS, |
| | 27 | buildServerProvider, |
| | 28 | type ServerProviderDraft, |
| | 29 | } from "../providerSnapshot.ts"; |
| 26 | import { expandHomePath } from "../../pathExpansion.ts"; | 30 | import { expandHomePath } from "../../pathExpansion.ts"; |
| 27 | import { scopedSafeTeardown } from "./scopedSafeTeardown.ts"; | 31 | import { scopedSafeTeardown } from "./scopedSafeTeardown.ts"; |
| 28 | import packageJson from "../../../package.json" with { type: "json" }; | 32 | import packageJson from "../../../package.json" with { type: "json" }; |
| 29 | const isCodexAppServerSpawnError = Schema.is(CodexErrors.CodexAppServerSpawnError); | 33 | const isCodexAppServerSpawnError = Schema.is(CodexErrors.CodexAppServerSpawnError); |
| 30 | | 34 | |
| 31 | const PROVIDER_PROBE_TIMEOUT_MS = 8_000; | | |
| 32 | const CODEX_PRESENTATION = { | 35 | const CODEX_PRESENTATION = { |
| 33 | displayName: "Codex", | 36 | displayName: "Codex", |
| 34 | showInteractionModeToggle: true, | 37 | showInteractionModeToggle: true, |
| ... | @@ -447,7 +450,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu | ... | @@ -447,7 +450,7 @@ export const checkCodexProviderStatus = Effect.fn("checkCodexProviderStatus")(fu |
| 447 | cwd: process.cwd(), | 450 | cwd: process.cwd(), |
| 448 | customModels: codexSettings.customModels, | 451 | customModels: codexSettings.customModels, |
| 449 | environment, | 452 | environment, |
| 450 | }).pipe(Effect.timeoutOption(Duration.millis(PROVIDER_PROBE_TIMEOUT_MS)), Effect.result); | 453 | }).pipe(Effect.timeoutOption(Duration.millis(AUTH_PROBE_TIMEOUT_MS)), Effect.result); |
| 451 | | 454 | |
| 452 | if (Result.isFailure(probeResult)) { | 455 | if (Result.isFailure(probeResult)) { |
| 453 | const error = probeResult.failure; | 456 | const error = probeResult.failure; |