Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(opencode): keep workspace commands retryable after probe timeouts #14933

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

Showing 2 changed files with 91 additions and 1 deletion.

x
0 of 2 viewed, 2 left
90 additions and 0 deletionsapps/server/src/provider/Drivers/OpenCodeDriver.test.tsModified
View file
@@ -5,11 +5,13 @@
​
import * as NodeServices from "@effect/platform-node/NodeServices";
import { assert, it } from "@effect/vitest";
+import { createOpencodeClient } from "@opencode-ai/sdk/v2";
import { ProviderInstanceId, type OpenCodeSettings } from "@t3tools/contracts";
import { HostProcessPlatform } from "@t3tools/shared/hostProcess";
import * as Effect from "effect/Effect";
import * as Fiber from "effect/Fiber";
import * as Layer from "effect/Layer";
+import * as Result from "effect/Result";
import * as TestClock from "effect/testing/TestClock";
import { HttpClient } from "effect/unstable/http";
import { ChildProcessSpawner } from "effect/unstable/process";
@@ -22,6 +24,7 @@
import * as ProviderMaintenance from "../providerMaintenance.ts";
import * as OpenCodeRuntime from "../opencodeRuntime.ts";
import {
+ OPENCODE_1_RESPONSES,
OPENCODE_2_RESPONSES,
OPENCODE_2_WORKSPACE_RESPONSES,
replayOpenCodeServer,
@@ -70,6 +73,93 @@
​
const noHttp = HttpClient.make(() => Effect.die("A local binary must not be probed over HTTP"));
​
+const createOpenCode1WorkspaceDriver = (client: ReturnType<typeof createOpencodeClient>) =>
+ create(