chatroom-cli 1.45.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 +21 -13
- package/dist/index.js.map +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76391,18 +76391,26 @@ async function flushOutput(ctx, tracked) {
|
|
|
76391
76391
|
return;
|
|
76392
76392
|
const content = tracked.outputBuffer;
|
|
76393
76393
|
tracked.outputBuffer = "";
|
|
76394
|
-
const
|
|
76395
|
-
|
|
76396
|
-
|
|
76397
|
-
|
|
76398
|
-
|
|
76399
|
-
|
|
76400
|
-
|
|
76401
|
-
|
|
76402
|
-
|
|
76403
|
-
|
|
76404
|
-
|
|
76405
|
-
|
|
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
|
+
}
|
|
76406
76414
|
}
|
|
76407
76415
|
}
|
|
76408
76416
|
function appendToBuffer(ctx, tracked, data) {
|
|
@@ -79884,5 +79892,5 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
79884
79892
|
});
|
|
79885
79893
|
program2.parse();
|
|
79886
79894
|
|
|
79887
|
-
//# debugId=
|
|
79895
|
+
//# debugId=967CC4EAFBE26E2364756E2164756E21
|
|
79888
79896
|
//# sourceMappingURL=index.js.map
|