@ycodium-ai/plugin-session-import 0.2.2167 → 0.2.2510

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 +11 -8
  2. package/package.json +2 -2
package/dist/index.js CHANGED
@@ -476,17 +476,20 @@ async function openCodexAppServer(input) {
476
476
  entry.resolve(typed.result);
477
477
  };
478
478
  const pumpStdout = (async () => {
479
- let buffer = "";
479
+ const fragments = [];
480
480
  for await (const chunk of handle.stdout) {
481
- buffer += decoder.decode(chunk, { stream: true });
482
- let index = buffer.indexOf("\n");
483
- while (index >= 0) {
484
- dispatch(buffer.slice(0, index));
485
- buffer = buffer.slice(index + 1);
486
- index = buffer.indexOf("\n");
481
+ const text = decoder.decode(chunk, { stream: true });
482
+ let start = 0;
483
+ for (let newline = text.indexOf("\n"); newline !== -1; newline = text.indexOf("\n", start)) {
484
+ fragments.push(text.slice(start, newline));
485
+ const line = fragments.join("");
486
+ fragments.length = 0;
487
+ dispatch(line);
488
+ start = newline + 1;
487
489
  }
490
+ if (start < text.length) fragments.push(text.slice(start));
488
491
  }
489
- dispatch(buffer);
492
+ dispatch(fragments.join(""));
490
493
  })().catch(() => void 0);
491
494
  const pumpStderr = (async () => {
492
495
  const errorDecoder = new TextDecoder();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ycodium-ai/plugin-session-import",
3
- "version": "0.2.2167",
3
+ "version": "0.2.2510",
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.2167"
23
+ "@ycodium-ai/plugin-api": "0.2.2510"
24
24
  },
25
25
  "ycodium": {
26
26
  "plugin": "./dist/index.js",