open-agents-ai 0.30.0 → 0.30.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 +47 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -19268,6 +19268,11 @@ var init_status_bar = __esm({
|
|
|
19268
19268
|
}
|
|
19269
19269
|
return false;
|
|
19270
19270
|
}
|
|
19271
|
+
/** Check if footer height would change, WITHOUT actually updating it */
|
|
19272
|
+
footerHeightChanged(termWidth) {
|
|
19273
|
+
const inputLines = this.computeInputLineCount(termWidth);
|
|
19274
|
+
return 4 + inputLines !== this._currentFooterHeight;
|
|
19275
|
+
}
|
|
19271
19276
|
/** Compute absolute row positions for all footer elements */
|
|
19272
19277
|
rowPositions(rows) {
|
|
19273
19278
|
const fh = this._currentFooterHeight;
|
|
@@ -19331,9 +19336,26 @@ var init_status_bar = __esm({
|
|
|
19331
19336
|
return;
|
|
19332
19337
|
const rows = process.stdout.rows ?? 24;
|
|
19333
19338
|
const w = getTermWidth();
|
|
19339
|
+
const oldFooterHeight = this._currentFooterHeight;
|
|
19334
19340
|
const heightChanged = this.updateFooterHeight(w);
|
|
19335
19341
|
const pos = this.rowPositions(rows);
|
|
19336
19342
|
if (heightChanged) {
|
|
19343
|
+
const heightDelta = this._currentFooterHeight - oldFooterHeight;
|
|
19344
|
+
if (heightDelta > 0) {
|
|
19345
|
+
const oldScrollEnd = Math.max(rows - oldFooterHeight, this.scrollRegionTop + 1);
|
|
19346
|
+
let scrollUp = `\x1B[${oldScrollEnd};1H`;
|
|
19347
|
+
for (let i = 0; i < heightDelta; i++)
|
|
19348
|
+
scrollUp += "\n";
|
|
19349
|
+
process.stdout.write(scrollUp);
|
|
19350
|
+
} else {
|
|
19351
|
+
const oldScrollEnd = Math.max(rows - oldFooterHeight, this.scrollRegionTop + 1);
|
|
19352
|
+
let clear = "";
|
|
19353
|
+
for (let row = oldScrollEnd + 1; row <= pos.scrollEnd; row++) {
|
|
19354
|
+
clear += `\x1B[${row};1H\x1B[2K`;
|
|
19355
|
+
}
|
|
19356
|
+
if (clear)
|
|
19357
|
+
process.stdout.write(clear);
|
|
19358
|
+
}
|
|
19337
19359
|
process.stdout.write(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
|
|
19338
19360
|
}
|
|
19339
19361
|
const sep = c2.dim("\u2500".repeat(w));
|
|
@@ -19363,7 +19385,7 @@ var init_status_bar = __esm({
|
|
|
19363
19385
|
renderFooterPreserveCursor() {
|
|
19364
19386
|
if (!this.active)
|
|
19365
19387
|
return;
|
|
19366
|
-
if (this.
|
|
19388
|
+
if (this.footerHeightChanged()) {
|
|
19367
19389
|
if (this.writeDepth === 0) {
|
|
19368
19390
|
this.renderFooterAndPositionInput();
|
|
19369
19391
|
}
|
|
@@ -19386,12 +19408,26 @@ var init_status_bar = __esm({
|
|
|
19386
19408
|
return;
|
|
19387
19409
|
const rows = process.stdout.rows ?? 24;
|
|
19388
19410
|
const w = getTermWidth();
|
|
19411
|
+
const oldFooterHeight = this._currentFooterHeight;
|
|
19389
19412
|
const heightChanged = this.updateFooterHeight(w);
|
|
19390
19413
|
const pos = this.rowPositions(rows);
|
|
19391
19414
|
const inputWrap = this.wrapInput(w);
|
|
19392
|
-
let buf = "\x1B7\x1B[?7l";
|
|
19393
19415
|
if (heightChanged) {
|
|
19416
|
+
const heightDelta = this._currentFooterHeight - oldFooterHeight;
|
|
19417
|
+
let buf = "\x1B7";
|
|
19418
|
+
if (heightDelta > 0) {
|
|
19419
|
+
const oldScrollEnd = Math.max(rows - oldFooterHeight, this.scrollRegionTop + 1);
|
|
19420
|
+
buf += `\x1B[${oldScrollEnd};1H`;
|
|
19421
|
+
for (let i = 0; i < heightDelta; i++)
|
|
19422
|
+
buf += "\n";
|
|
19423
|
+
} else {
|
|
19424
|
+
const oldScrollEnd = Math.max(rows - oldFooterHeight, this.scrollRegionTop + 1);
|
|
19425
|
+
for (let row = oldScrollEnd + 1; row <= pos.scrollEnd; row++) {
|
|
19426
|
+
buf += `\x1B[${row};1H\x1B[2K`;
|
|
19427
|
+
}
|
|
19428
|
+
}
|
|
19394
19429
|
buf += `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`;
|
|
19430
|
+
buf += "\x1B[?7l";
|
|
19395
19431
|
const sep = c2.dim("\u2500".repeat(w));
|
|
19396
19432
|
buf += `\x1B[${pos.bufferRow};1H\x1B[2K${this.buildBufferContent(w)}`;
|
|
19397
19433
|
buf += `\x1B[${pos.topSepRow};1H\x1B[2K${sep}`;
|
|
@@ -19402,15 +19438,22 @@ var init_status_bar = __esm({
|
|
|
19402
19438
|
}
|
|
19403
19439
|
buf += `\x1B[${pos.bottomSepRow};1H\x1B[2K${sep}`;
|
|
19404
19440
|
buf += `\x1B[${pos.metricsRow};1H\x1B[2K${this.buildMetricsLine()}`;
|
|
19441
|
+
buf += "\x1B[?7h";
|
|
19442
|
+
buf += "\x1B8";
|
|
19443
|
+
if (heightDelta > 0) {
|
|
19444
|
+
buf += `\x1B[${heightDelta}A`;
|
|
19445
|
+
}
|
|
19446
|
+
process.stdout.write(buf);
|
|
19405
19447
|
} else {
|
|
19448
|
+
let buf = "\x1B7\x1B[?7l";
|
|
19406
19449
|
for (let i = 0; i < inputWrap.lines.length; i++) {
|
|
19407
19450
|
const row = pos.inputStartRow + i;
|
|
19408
19451
|
const prefix = i === 0 ? this.promptText : " ".repeat(this.promptWidth);
|
|
19409
19452
|
buf += `\x1B[${row};1H\x1B[2K${prefix}${inputWrap.lines[i]}`;
|
|
19410
19453
|
}
|
|
19454
|
+
buf += "\x1B[?7h\x1B8";
|
|
19455
|
+
process.stdout.write(buf);
|
|
19411
19456
|
}
|
|
19412
|
-
buf += "\x1B[?7h\x1B8";
|
|
19413
|
-
process.stdout.write(buf);
|
|
19414
19457
|
}
|
|
19415
19458
|
/**
|
|
19416
19459
|
* Build the content for the buffer line.
|
package/package.json
CHANGED