@clwnd/opencode 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +0 -15
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -296,15 +296,6 @@ function streamCall(msg) {
296
296
  unix: SOCK_PATH
297
297
  });
298
298
  }
299
- async function ipcCall(msg) {
300
- const r = await fetch("http://localhost/", {
301
- method: "POST",
302
- headers: { "Content-Type": "application/json" },
303
- body: JSON.stringify(msg),
304
- unix: SOCK_PATH
305
- });
306
- if (!r.ok) throw new Error(`clwnd IPC ${r.status}`);
307
- }
308
299
  function extractText(prompt) {
309
300
  for (let i = prompt.length - 1; i >= 0; i--) {
310
301
  const m = prompt[i];
@@ -356,8 +347,6 @@ var ClwndModel = class {
356
347
  const abort = () => {
357
348
  if (resolved) return;
358
349
  resolved = true;
359
- ipcCall({ action: "destroy", opencodeSessionId: sid }).catch(() => {
360
- });
361
350
  reject(new Error("aborted"));
362
351
  };
363
352
  opts.abortSignal?.addEventListener("abort", abort);
@@ -496,8 +485,6 @@ var ClwndModel = class {
496
485
  }
497
486
  }
498
487
  opts.abortSignal?.addEventListener("abort", () => {
499
- ipcCall({ action: "destroy", opencodeSessionId: sid }).catch(() => {
500
- });
501
488
  close();
502
489
  });
503
490
  let resp;
@@ -619,8 +606,6 @@ var ClwndModel = class {
619
606
  }
620
607
  },
621
608
  cancel() {
622
- ipcCall({ action: "destroy", opencodeSessionId: sid }).catch(() => {
623
- });
624
609
  }
625
610
  });
626
611
  return {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clwnd/opencode",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "clwnd for opencode",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",