Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(opencode): show OpenCode Go usage when no Console workspace is signed in #36002

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

Showing 2 changed files with 130 additions and 3 deletions.

x
0 of 2 viewed, 2 left
124 additions and 3 deletionspackages/provider-opencode/src/server/driver.test.tsModified
View file
@@ -92,7 +92,11 @@
OpenCodeDriver.create({
instanceId: ProviderInstanceId.make("opencode-test"),
displayName: undefined,
- environment: [],
+ // Usage checks may read local credentials; keep them away from the host's own store.
+ environment: [
+ { name: "OPENCODE_AUTH_CONTENT", sensitive: true, value: "{}" },
+ { name: "OPENCODE_API_KEY", sensitive: true, value: "" },
+ ],
enabled,
config: { ...OpenCodeDriver.defaultConfig(), ...config },
}).pipe(Effect.provideService(HttpClient.HttpClient, http));
@@ -219,7 +223,10 @@
const instance = yield* OpenCodeDriver.create({
instanceId: ProviderInstanceId.make("opencode-home"),
displayName: undefined,
- environment: [],
+ environment: [
+ { name: "OPENCODE_AUTH_CONTENT", sensitive: true, value: "{}" },
+ { name: "OPENCODE_API_KEY", sensitive: true, value: "" },
+ ],
enabled: true,
config: {
...OpenCodeDriver.defaultConfig(),
@@ -1053,6 +1060,117 @@
assert.strictEqual(serverStarts, starts);
}).pipe(Effect.scoped, Effect.provide(TestClock.layer())),