diff options
| author | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-18 23:46:34 +0300 |
|---|---|---|
| committer | Ogulcan Celik <ogulcancelik@gmail.com> | 2026-07-18 23:56:20 +0300 |
| commit | a51a15914a5b29155022a1fd589d2bcc6409cadf (patch) | |
| tree | 8602b6d94c811666d49e4c2aa7636bb6a9b0e8a3 /src/integration/assets/opencode | |
| parent | 60c040057e3949ae93ee88d495df09b4b848d22d (diff) | |
fix: support javascript integrations on windows
refs #1531
Diffstat (limited to 'src/integration/assets/opencode')
| -rw-r--r-- | src/integration/assets/opencode/herdr-agent-state.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/integration/assets/opencode/herdr-agent-state.js b/src/integration/assets/opencode/herdr-agent-state.js index 4d59f9ec..27ea7ee5 100644 --- a/src/integration/assets/opencode/herdr-agent-state.js +++ b/src/integration/assets/opencode/herdr-agent-state.js @@ -62,6 +62,9 @@ function requestOnce(method, params) { return Promise.resolve(); } + const socketEndpoint = + process.platform === "win32" ? `\\\\.\\pipe\\${socketPath}` : socketPath; + const requestId = `${SOURCE}:${Date.now()}:${Math.floor(Math.random() * 1_000_000) .toString() .padStart(6, "0")}`; @@ -78,7 +81,7 @@ function requestOnce(method, params) { }; return new Promise((resolve) => { - const client = net.createConnection(socketPath, () => { + const client = net.createConnection(socketEndpoint, () => { client.write(`${JSON.stringify(request)}\n`); }); |
