Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(server): stop sending the local directory to a remote OpenCode server #6228

ClosedCDVolvik(GitHub profile, opens in a new tab)wants to merge 5 commits intomain fromrefs/pull/6228/headopened View on GitHub

Showing 9 changed files with 70 additions and 4 deletions (loading 6).

x
0 of 9 viewed, 9 left
2 additions and 0 deletionsapps/server/src/provider/Drivers/OpenCodeDriver.tsModified
View file
@@ -180,6 +180,7 @@
const client = openCodeRuntime.createOpenCodeSdkClient({
baseUrl: server.url,
directory: cwd,
+ external: server.external,
...(effectiveConfig.serverPassword
? { serverPassword: effectiveConfig.serverPassword }
: {}),
@@ -192,6 +193,7 @@
openCodeRuntime.createOpenCodeSdkClient({
baseUrl: server.url,
directory: cwd,
+ external: false,
...(server.serverPassword !== undefined
? { serverPassword: server.serverPassword }
: {}),
58 additions and 0 deletionsapps/server/src/provider/Layers/OpenCodeAdapter.test.tsModified
View file
@@ -535,6 +535,13 @@
serverPassword: "secret-password",
});
​
+// A non-loopback server URL, so the adapter treats the session as remote.
+const openCodeAdapterRemoteSettings = Schema.decodeSync(OpenCodeSettings)({
+ binaryPath: "fake-opencode",
+ serverUrl: "http://10.0.0.5:4096",
+ serverPassword: "secret-password",