open-agents-ai 0.138.15 → 0.138.17

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 +55 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -36415,6 +36415,18 @@ var init_setup = __esm({
36415
36415
  });
36416
36416
 
36417
36417
  // packages/cli/dist/tui/overlay-lock.js
36418
+ var overlay_lock_exports = {};
36419
+ __export(overlay_lock_exports, {
36420
+ bufferIfOverlay: () => bufferIfOverlay,
36421
+ enterOverlay: () => enterOverlay,
36422
+ isOverlayActive: () => isOverlayActive,
36423
+ leaveOverlay: () => leaveOverlay,
36424
+ onOverlayLeave: () => onOverlayLeave,
36425
+ overlayWrite: () => overlayWrite
36426
+ });
36427
+ function onOverlayLeave(cb) {
36428
+ _onLeaveCallback = cb;
36429
+ }
36418
36430
  function isOverlayActive() {
36419
36431
  return _overlayActive;
36420
36432
  }
@@ -36464,6 +36476,12 @@ function leaveOverlay() {
36464
36476
  process.stderr.write = _origStderrWrite;
36465
36477
  _origStderrWrite = null;
36466
36478
  }
36479
+ if (_onLeaveCallback) {
36480
+ try {
36481
+ _onLeaveCallback();
36482
+ } catch {
36483
+ }
36484
+ }
36467
36485
  const pending = _buffer;
36468
36486
  _buffer = [];
36469
36487
  for (const { stream, data } of pending) {
@@ -36475,7 +36493,7 @@ function leaveOverlay() {
36475
36493
  }
36476
36494
  }
36477
36495
  }
36478
- var _overlayActive, _depth, _buffer, _origStdoutWrite, _origStderrWrite;
36496
+ var _overlayActive, _depth, _buffer, _origStdoutWrite, _origStderrWrite, _onLeaveCallback;
36479
36497
  var init_overlay_lock = __esm({
36480
36498
  "packages/cli/dist/tui/overlay-lock.js"() {
36481
36499
  "use strict";
@@ -36484,6 +36502,7 @@ var init_overlay_lock = __esm({
36484
36502
  _buffer = [];
36485
36503
  _origStdoutWrite = null;
36486
36504
  _origStderrWrite = null;
36505
+ _onLeaveCallback = null;
36487
36506
  }
36488
36507
  });
36489
36508
 
@@ -44407,24 +44426,42 @@ function createDefaultBanner(version = "0.120.0") {
44407
44426
  const width = process.stdout.columns ?? 80;
44408
44427
  const rows = 3;
44409
44428
  const grid = [];
44410
- const textColor = 178;
44411
- const shades = [" ", "\u2591", "\u2592", "\u2593", "\u2588"];
44429
+ const yellow = 178;
44430
+ const blockChars = [" ", "\xB7", "\u2591", "\u2592", "\u2593", "\u2588"];
44431
+ const hash = (r, c3) => (r * 7 + c3 * 13 + 37) % 17 / 17;
44412
44432
  for (let r = 0; r < rows; r++) {
44413
44433
  const row = [];
44414
44434
  for (let c3 = 0; c3 < width; c3++) {
44415
- const progress = c3 / (width - 1);
44416
- const shadeIdx = Math.min(shades.length - 1, Math.floor(progress * shades.length));
44417
- row.push({ char: shades[shadeIdx], fg: textColor, bg: 0, bold: false });
44435
+ const midpoint = Math.floor(width * 0.5);
44436
+ if (c3 >= midpoint) {
44437
+ const progress = (c3 - midpoint) / (width - midpoint - 1);
44438
+ const density = progress * progress;
44439
+ const noise = hash(r, c3);
44440
+ if (noise < density) {
44441
+ const charIdx = Math.min(blockChars.length - 1, Math.floor(density * blockChars.length));
44442
+ row.push({ char: blockChars[charIdx], fg: yellow, bg: 0, bold: false });
44443
+ } else {
44444
+ row.push({ char: " ", fg: 0, bg: 0, bold: false });
44445
+ }
44446
+ } else {
44447
+ row.push({ char: " ", fg: 0, bg: 0, bold: false });
44448
+ }
44418
44449
  }
44419
44450
  grid.push(row);
44420
44451
  }
44421
- const text = `OA v${version}`;
44422
- const startCol = 2;
44423
- for (let c3 = 0; c3 < Math.min(width, startCol + text.length + 2); c3++) {
44424
- grid[1][c3] = { char: "\u2588", fg: textColor, bg: 0, bold: false };
44452
+ const versionText = ` OA v${version}`;
44453
+ for (let i = 0; i < versionText.length && i < width; i++) {
44454
+ grid[0][i] = { char: versionText[i], fg: yellow, bg: 0, bold: true };
44425
44455
  }
44426
- for (let i = 0; i < text.length && startCol + i < width; i++) {
44427
- grid[1][startCol + i] = { char: text[i], fg: 0, bg: textColor, bold: true };
44456
+ const cwd4 = process.cwd();
44457
+ const shortCwd = cwd4.length > 40 ? "..." + cwd4.slice(-37) : cwd4;
44458
+ const infoText = ` ${shortCwd}`;
44459
+ for (let i = 0; i < infoText.length && i < Math.floor(width * 0.5); i++) {
44460
+ grid[1][i] = { char: infoText[i], fg: 245, bg: 0, bold: false };
44461
+ }
44462
+ const hints = " /help /voice /cohere /model";
44463
+ for (let i = 0; i < hints.length && i < Math.floor(width * 0.5); i++) {
44464
+ grid[2][i] = { char: hints[i], fg: 240, bg: 0, bold: false };
44428
44465
  }
44429
44466
  return {
44430
44467
  id: "default-header",
@@ -53483,6 +53520,12 @@ async function startInteractive(config, repoPath) {
53483
53520
  const scrollTop = carouselLines > 0 ? carouselLines + 1 : 1;
53484
53521
  statusBar.activate(scrollTop);
53485
53522
  statusBar.setBannerRefresh(() => banner.renderCurrentFrame());
53523
+ const { onOverlayLeave: onOverlayLeave2 } = await Promise.resolve().then(() => (init_overlay_lock(), overlay_lock_exports));
53524
+ onOverlayLeave2(() => {
53525
+ banner.renderCurrentFrame();
53526
+ if (statusBar.isActive)
53527
+ statusBar.handleResize();
53528
+ });
53486
53529
  if (isResumed) {
53487
53530
  statusBar.beginContentWrite();
53488
53531
  const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.15",
3
+ "version": "0.138.17",
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",