@ycodium-ai/plugin-session-import 0.2.2126 → 0.2.2143

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 +12 -4
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -509,10 +509,18 @@ async function openCodexAppServer(input) {
509
509
  const settled = new Promise((resolve, reject) => {
510
510
  pending.set(id, { resolve, reject, method });
511
511
  });
512
- await handle.writeStdin(
513
- `${JSON.stringify({ id, method, ...params === void 0 ? {} : { params } })}
512
+ try {
513
+ await Promise.race([
514
+ handle.writeStdin(
515
+ `${JSON.stringify({ id, method, ...params === void 0 ? {} : { params } })}
514
516
  `
515
- );
517
+ ),
518
+ settled
519
+ ]);
520
+ } catch (error) {
521
+ pending.delete(id);
522
+ throw error;
523
+ }
516
524
  let timer;
517
525
  try {
518
526
  return await Promise.race([
@@ -553,7 +561,7 @@ async function openCodexAppServer(input) {
553
561
  await close();
554
562
  throw error;
555
563
  }
556
- return { request, notify, close };
564
+ return { request, notify, close, pendingCountForTests: () => pending.size };
557
565
  }
558
566
 
559
567
  // src/codexSessionScan.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-session-import",
3
- "version": "0.2.2126",
3
+ "version": "0.2.2143",
4
4
  "description": "Brings a session you started in a terminal into Ycodium.",
5
5
  "keywords": [
6
6
  "session-import",
@@ -20,7 +20,7 @@
20
20
  "effect": "4.0.0-beta.103",
21
21
  "esbuild": "0.28.1",
22
22
  "vite-plus": "0.2.2",
23
- "@ycodium-ai/plugin-api": "0.2.2126"
23
+ "@ycodium-ai/plugin-api": "0.2.2143"
24
24
  },
25
25
  "ycodium": {
26
26
  "plugin": "./dist/index.js",