chatroom-cli 1.44.0 → 1.45.1

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.
package/dist/index.js CHANGED
@@ -72586,6 +72586,9 @@ function viewTemplate() {
72586
72586
  ## Requirements
72587
72587
  - <outcome or requirement>
72588
72588
 
72589
+ ## Structure
72590
+ - <concrete folder structure, architecture style (e.g. vertical slice + clean architecture), key shape decisions>
72591
+
72589
72592
  ## Avoid
72590
72593
  - <thing to not do / out of scope>`;
72591
72594
  }
@@ -76388,18 +76391,26 @@ async function flushOutput(ctx, tracked) {
76388
76391
  return;
76389
76392
  const content = tracked.outputBuffer;
76390
76393
  tracked.outputBuffer = "";
76391
- const chunkIndex = tracked.chunkIndex++;
76392
- try {
76393
- await ctx.deps.backend.mutation(api.commands.appendOutput, {
76394
- sessionId: ctx.sessionId,
76395
- machineId: ctx.machineId,
76396
- runId: tracked.runId,
76397
- content,
76398
- chunkIndex
76399
- });
76400
- } catch (err) {
76401
- console.warn(`[${formatTimestamp()}] ⚠️ Failed to flush output for run ${tracked.runId}: ${getErrorMessage(err)}`);
76402
- tracked.outputBuffer = content + tracked.outputBuffer;
76394
+ const slices = [];
76395
+ for (let i2 = 0;i2 < content.length; i2 += MAX_BUFFER_SIZE) {
76396
+ slices.push(content.slice(i2, i2 + MAX_BUFFER_SIZE));
76397
+ }
76398
+ for (let i2 = 0;i2 < slices.length; i2++) {
76399
+ const chunkIndex = tracked.chunkIndex++;
76400
+ try {
76401
+ await ctx.deps.backend.mutation(api.commands.appendOutput, {
76402
+ sessionId: ctx.sessionId,
76403
+ machineId: ctx.machineId,
76404
+ runId: tracked.runId,
76405
+ content: slices[i2],
76406
+ chunkIndex
76407
+ });
76408
+ } catch (err) {
76409
+ console.warn(`[${formatTimestamp()}] ⚠️ Failed to flush output for run ${tracked.runId}: ${getErrorMessage(err)}`);
76410
+ tracked.outputBuffer = slices.slice(i2).join("") + tracked.outputBuffer;
76411
+ tracked.chunkIndex--;
76412
+ return;
76413
+ }
76403
76414
  }
76404
76415
  }
76405
76416
  function appendToBuffer(ctx, tracked, data) {
@@ -79881,5 +79892,5 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
79881
79892
  });
79882
79893
  program2.parse();
79883
79894
 
79884
- //# debugId=DFA3745A7992596664756E2164756E21
79895
+ //# debugId=967CC4EAFBE26E2364756E2164756E21
79885
79896
  //# sourceMappingURL=index.js.map