open-agents-ai 0.138.5 → 0.138.6

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 +39 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51583,13 +51583,23 @@ var init_status_bar = __esm({
51583
51583
  this._contentScrollOffset = 0;
51584
51584
  this.repaintContent();
51585
51585
  }
51586
- /** Repaint content area from buffer at current scroll position.
51587
- * Uses direct cursor positioning (btop-style) no DECSTBM scrolling. */
51586
+ /**
51587
+ * Repaint content area from buffer at current scroll position.
51588
+ *
51589
+ * btop-style: every line is positioned with Mv::to(row, col) — no DECSTBM.
51590
+ * Wrapped in synchronized output (?2026h/?2026l) to prevent flicker.
51591
+ * Single atomic process.stdout.write() call for the entire frame.
51592
+ *
51593
+ * Reference: btop_draw.cpp lines 2080-2102 — process list rendering.
51594
+ */
51588
51595
  repaintContent() {
51589
51596
  const h = this.contentHeight;
51590
51597
  const totalLines = this._contentLines.length;
51591
51598
  const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
51592
- let buf = "\x1B7\x1B[?25l";
51599
+ const w = process.stdout.columns ?? 80;
51600
+ let buf = "\x1B[?2026h";
51601
+ buf += "\x1B7";
51602
+ buf += "\x1B[?25l";
51593
51603
  for (let row = 0; row < h; row++) {
51594
51604
  const lineIdx = startIdx + row;
51595
51605
  const line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
@@ -51597,10 +51607,15 @@ var init_status_bar = __esm({
51597
51607
  buf += `\x1B[${screenRow};1H\x1B[2K${line}`;
51598
51608
  }
51599
51609
  if (this._contentScrollOffset > 0) {
51600
- const linesAbove = Math.max(0, totalLines - h - this._contentScrollOffset);
51601
- buf += `\x1B[${this.scrollRegionTop};1H\x1B[7m \u2191 ${linesAbove} lines above (PgDn/End to return) \x1B[0m`;
51610
+ const linesAbove = startIdx;
51611
+ const pct = totalLines > 0 ? Math.round((startIdx + h) / totalLines * 100) : 100;
51612
+ const indicator = ` \u2191 ${linesAbove} lines above \xB7 ${pct}% \xB7 PgDn/End to return `;
51613
+ const pad = Math.max(0, w - indicator.length);
51614
+ buf += `\x1B[${this.scrollRegionTop};1H\x1B[7m${indicator}${" ".repeat(pad)}\x1B[0m`;
51602
51615
  }
51603
- buf += "\x1B8\x1B[?25h";
51616
+ buf += "\x1B8";
51617
+ buf += "\x1B[?25h";
51618
+ buf += "\x1B[?2026l";
51604
51619
  process.stdout.write(buf);
51605
51620
  }
51606
51621
  /**
@@ -53465,10 +53480,24 @@ async function startInteractive(config, repoPath) {
53465
53480
  let carouselLines = 0;
53466
53481
  const version = getVersion3();
53467
53482
  if (isResumed) {
53468
- process.stdout.write("\r\x1B[K");
53469
- const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.
53470
- ` : `Updated to v${version}.
53471
- `;
53483
+ if (process.stdout.isTTY) {
53484
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
53485
+ const restoreScreen = () => {
53486
+ process.stdout.write("\x1B[?25h\x1B[?1049l");
53487
+ };
53488
+ process.on("exit", restoreScreen);
53489
+ process.on("SIGINT", () => {
53490
+ restoreScreen();
53491
+ process.exit(130);
53492
+ });
53493
+ process.on("SIGTERM", () => {
53494
+ restoreScreen();
53495
+ process.exit(143);
53496
+ });
53497
+ }
53498
+ banner.setDesign(createDefaultBanner(version));
53499
+ carouselLines = banner.start();
53500
+ const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
53472
53501
  renderInfo(resumeMsg);
53473
53502
  } else {
53474
53503
  process.stdout.write("\x1B[H");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.5",
3
+ "version": "0.138.6",
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",