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/kilo | |
| parent | 60c040057e3949ae93ee88d495df09b4b848d22d (diff) | |
fix: support javascript integrations on windows
refs #1531
Diffstat (limited to 'src/integration/assets/kilo')
| -rw-r--r-- | src/integration/assets/kilo/herdr-agent-state.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/integration/assets/kilo/herdr-agent-state.js b/src/integration/assets/kilo/herdr-agent-state.js index fc12919c..e8600ab1 100644 --- a/src/integration/assets/kilo/herdr-agent-state.js +++ b/src/integration/assets/kilo/herdr-agent-state.js @@ -2,7 +2,7 @@ // managed by herdr; reinstalling or updating the integration overwrites this file. // add custom hooks/plugins beside this file instead of editing it. // HERDR_INTEGRATION_ID=kilo -// HERDR_INTEGRATION_VERSION=2 +// HERDR_INTEGRATION_VERSION=3 import net from "node:net"; @@ -48,6 +48,9 @@ function request(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")}`; @@ -64,7 +67,7 @@ function request(method, params) { }; return new Promise((resolve) => { - const client = net.createConnection(socketPath, () => { + const client = net.createConnection(socketEndpoint, () => { client.write(`${JSON.stringify(request)}\n`); }); |
