Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): keep a ready OpenCode provider through a slow version probe #14575

Closedmacodev00(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/14575/headopened View on GitHub

Showing 6 changed files with 90 additions and 3 deletions (loading 5).

x
0 of 6 viewed, 6 left
90 additions and 3 deletionsapps/server/src/provider/Layers/OpenCodeProvider.test.tsModified
View file
@@ -28,7 +28,10 @@
openCodeCommandsToServerProviderSlashCommands,
} from "./OpenCodeProvider.ts";
import { readOpenCodeGoUsageLimits } from "./openCodeUsageLimits.ts";
-import { probeOpenCodeRuntime } from "../opencodeVersionProbe.ts";
+import {
+ OPENCODE_VERSION_PROBE_TIMEOUT_ENV,
+ probeOpenCodeRuntime,
+} from "../opencodeVersionProbe.ts";
import {
OPENCODE_1_RESPONSES,
OPENCODE_2_RESPONSES,
@@ -170,6 +173,7 @@
state: {
runVersionError: null as Error | null,
runVersionPending: false,
+ runVersionDelayMs: null as number | null,
versionStdout: DEFAULT_VERSION_STDOUT,
inventoryError: null as Error | null,
connectionError: null as Error | null,
@@ -189,6 +193,7 @@
reset() {
this.state.runVersionError = null;
this.state.runVersionPending = false;
+ this.state.runVersionDelayMs = null;
this.state.versionStdout = DEFAULT_VERSION_STDOUT;
this.state.inventoryError = null;
this.state.connectionError = null;