open-agents-ai 0.30.0 → 0.30.2

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 +51 -6
  2. 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,10 +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) {
19337
- process.stdout.write(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
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
+ process.stdout.write(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
19351
+ } else {
19352
+ const absD = Math.abs(heightDelta);
19353
+ process.stdout.write(`\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`);
19354
+ let scrollDown = `\x1B[${this.scrollRegionTop};1H`;
19355
+ for (let i = 0; i < absD; i++)
19356
+ scrollDown += "\x1BM";
19357
+ process.stdout.write(scrollDown);
19358
+ }
19338
19359
  }
19339
19360
  const sep = c2.dim("\u2500".repeat(w));
19340
19361
  const inputWrap = this.wrapInput(w);
@@ -19363,7 +19384,7 @@ var init_status_bar = __esm({
19363
19384
  renderFooterPreserveCursor() {
19364
19385
  if (!this.active)
19365
19386
  return;
19366
- if (this.updateFooterHeight()) {
19387
+ if (this.footerHeightChanged()) {
19367
19388
  if (this.writeDepth === 0) {
19368
19389
  this.renderFooterAndPositionInput();
19369
19390
  }
@@ -19386,12 +19407,27 @@ var init_status_bar = __esm({
19386
19407
  return;
19387
19408
  const rows = process.stdout.rows ?? 24;
19388
19409
  const w = getTermWidth();
19410
+ const oldFooterHeight = this._currentFooterHeight;
19389
19411
  const heightChanged = this.updateFooterHeight(w);
19390
19412
  const pos = this.rowPositions(rows);
19391
19413
  const inputWrap = this.wrapInput(w);
19392
- let buf = "\x1B7\x1B[?7l";
19393
19414
  if (heightChanged) {
19394
- buf += `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`;
19415
+ const heightDelta = this._currentFooterHeight - oldFooterHeight;
19416
+ let buf = "\x1B7";
19417
+ if (heightDelta > 0) {
19418
+ const oldScrollEnd = Math.max(rows - oldFooterHeight, this.scrollRegionTop + 1);
19419
+ buf += `\x1B[${oldScrollEnd};1H`;
19420
+ for (let i = 0; i < heightDelta; i++)
19421
+ buf += "\n";
19422
+ buf += `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`;
19423
+ } else {
19424
+ const absD = Math.abs(heightDelta);
19425
+ buf += `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r`;
19426
+ buf += `\x1B[${this.scrollRegionTop};1H`;
19427
+ for (let i = 0; i < absD; i++)
19428
+ buf += "\x1BM";
19429
+ }
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,24 @@ 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
+ } else {
19446
+ buf += `\x1B[${Math.abs(heightDelta)}B`;
19447
+ }
19448
+ process.stdout.write(buf);
19405
19449
  } else {
19450
+ let buf = "\x1B7\x1B[?7l";
19406
19451
  for (let i = 0; i < inputWrap.lines.length; i++) {
19407
19452
  const row = pos.inputStartRow + i;
19408
19453
  const prefix = i === 0 ? this.promptText : " ".repeat(this.promptWidth);
19409
19454
  buf += `\x1B[${row};1H\x1B[2K${prefix}${inputWrap.lines[i]}`;
19410
19455
  }
19456
+ buf += "\x1B[?7h\x1B8";
19457
+ process.stdout.write(buf);
19411
19458
  }
19412
- buf += "\x1B[?7h\x1B8";
19413
- process.stdout.write(buf);
19414
19459
  }
19415
19460
  /**
19416
19461
  * Build the content for the buffer line.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.30.0",
3
+ "version": "0.30.2",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",