open-agents-ai 0.138.20 → 0.138.21
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 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51429,6 +51429,7 @@ var init_status_bar = __esm({
|
|
|
51429
51429
|
* tool event executed mid-stream will push depth to 2; its paired
|
|
51430
51430
|
* endContentWrite() drops it back to 1 without touching the footer.
|
|
51431
51431
|
*/
|
|
51432
|
+
_origWrite = null;
|
|
51432
51433
|
beginContentWrite() {
|
|
51433
51434
|
if (!this.active)
|
|
51434
51435
|
return;
|
|
@@ -51436,7 +51437,21 @@ var init_status_bar = __esm({
|
|
|
51436
51437
|
this._brailleSpinner.setMetrics({ isStreaming: true });
|
|
51437
51438
|
const rows = process.stdout.rows ?? 24;
|
|
51438
51439
|
const scrollEnd = Math.max(rows - this._currentFooterHeight, this.scrollRegionTop + 1);
|
|
51439
|
-
|
|
51440
|
+
if (this.writeDepth === 1 && !this._origWrite) {
|
|
51441
|
+
this._origWrite = process.stdout.write;
|
|
51442
|
+
const origBound = this._origWrite.bind(process.stdout);
|
|
51443
|
+
process.stdout.write = ((chunk, ...args) => {
|
|
51444
|
+
if (typeof chunk === "string") {
|
|
51445
|
+
chunk = chunk.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
|
|
51446
|
+
chunk = chunk.replace(/\n/g, `\x1B[K
|
|
51447
|
+
${CONTENT_BG_SEQ}`);
|
|
51448
|
+
}
|
|
51449
|
+
return origBound(chunk, ...args);
|
|
51450
|
+
});
|
|
51451
|
+
}
|
|
51452
|
+
process.stdout.write(`\x1B[?25l` + // hide cursor
|
|
51453
|
+
CONTENT_BG_SEQ + // set content area bg (#111)
|
|
51454
|
+
`\x1B[${this.scrollRegionTop};${scrollEnd}r\x1B[${scrollEnd};1H`);
|
|
51440
51455
|
}
|
|
51441
51456
|
/**
|
|
51442
51457
|
* Call AFTER writing content to the scrollable area.
|
|
@@ -51450,6 +51465,11 @@ var init_status_bar = __esm({
|
|
|
51450
51465
|
return;
|
|
51451
51466
|
this.writeDepth = Math.max(0, this.writeDepth - 1);
|
|
51452
51467
|
if (this.writeDepth === 0) {
|
|
51468
|
+
if (this._origWrite) {
|
|
51469
|
+
process.stdout.write = this._origWrite;
|
|
51470
|
+
this._origWrite = null;
|
|
51471
|
+
}
|
|
51472
|
+
process.stdout.write(RESET);
|
|
51453
51473
|
this._brailleSpinner.setMetrics({ isStreaming: false });
|
|
51454
51474
|
this.renderFooterAndPositionInput();
|
|
51455
51475
|
}
|
package/package.json
CHANGED