open-agents-ai 0.187.78 → 0.187.80

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 +21 -12
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -279116,6 +279116,7 @@ var init_status_bar = __esm({
279116
279116
  startedAt: Date.now()
279117
279117
  });
279118
279118
  }
279119
+ setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
279119
279120
  this._prevTermRows = termRows();
279120
279121
  this._prevTermCols = termCols();
279121
279122
  this.applyScrollRegion(true);
@@ -279660,6 +279661,7 @@ var init_status_bar = __esm({
279660
279661
  _handleResizeImmediate() {
279661
279662
  if (!this.active)
279662
279663
  return;
279664
+ setTermSize(process.stdout.rows ?? 24, process.stdout.columns ?? 80);
279663
279665
  const prevRows = this._prevTermRows;
279664
279666
  const prevCols = this._prevTermCols;
279665
279667
  this.updateFooterHeight();
@@ -280728,9 +280730,11 @@ ${CONTENT_BG_SEQ}`);
280728
280730
  rl.line = "";
280729
280731
  rl.cursor = 0;
280730
280732
  self2._suppressStdinRedraw = true;
280733
+ self2.termWrite("\x1B[?2026h");
280731
280734
  self2.updateFooterHeight();
280732
280735
  self2.renderFooterAndPositionInput();
280733
280736
  rl.emit("line", currentLine);
280737
+ self2.termWrite("\x1B[?2026l");
280734
280738
  setImmediate(() => {
280735
280739
  self2._suppressStdinRedraw = false;
280736
280740
  });
@@ -280979,7 +280983,7 @@ function tuiSelect(opts) {
280979
280983
  const reservedTopBottom = 0;
280980
280984
  const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
280981
280985
  const selectChrome = (hasCrumbs ? 11 : 10) + 1;
280982
- const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : process.stdout.rows ?? 24;
280986
+ const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : termRows();
280983
280987
  let maxVisible = opts.maxVisible ?? Math.max(3, contentArea - selectChrome);
280984
280988
  let scrollOffset = 0;
280985
280989
  let lastRenderedLines = 0;
@@ -281018,7 +281022,7 @@ function tuiSelect(opts) {
281018
281022
  }
281019
281023
  const hasBreadcrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
281020
281024
  function render() {
281021
- const currentRows = process.stdout.rows ?? 24;
281025
+ const currentRows = termRows();
281022
281026
  if (!opts.maxVisible) {
281023
281027
  maxVisible = Math.max(3, currentRows - selectChrome);
281024
281028
  }
@@ -281488,6 +281492,7 @@ var init_tui_select = __esm({
281488
281492
  "use strict";
281489
281493
  init_overlay_lock();
281490
281494
  init_theme();
281495
+ init_layout2();
281491
281496
  isTTY3 = process.stdout.isTTY ?? false;
281492
281497
  selectColors = {
281493
281498
  orange: (t2) => fg2562(208, t2),
@@ -284475,8 +284480,8 @@ function showDropPanel(opts) {
284475
284480
  let errorMsg = "";
284476
284481
  function render() {
284477
284482
  overlayWrite("\x1B[H\x1B[2J");
284478
- const cols = process.stdout.columns ?? 80;
284479
- const rows = process.stdout.rows ?? 24;
284483
+ const cols = termCols();
284484
+ const rows = termRows();
284480
284485
  const textWidth = Math.max(10, cols - 9);
284481
284486
  const innerSpace = Math.max(10, cols - 6);
284482
284487
  const content = [];
@@ -284594,6 +284599,7 @@ var init_drop_panel = __esm({
284594
284599
  "packages/cli/dist/tui/drop-panel.js"() {
284595
284600
  "use strict";
284596
284601
  init_overlay_lock();
284602
+ init_layout2();
284597
284603
  isTTY4 = process.stdout.isTTY ?? false;
284598
284604
  dc = {
284599
284605
  bold: (t2) => ansi4("1", t2),
@@ -285440,7 +285446,7 @@ function getPreset2(id) {
285440
285446
  }
285441
285447
  function presetToBannerDesign(presetId, sponsorName, message2) {
285442
285448
  const preset = getPreset2(presetId);
285443
- const width = process.stdout.columns ?? 80;
285449
+ const width = termCols();
285444
285450
  const frames = preset ? preset.generate(width) : generateWave(width);
285445
285451
  if (sponsorName) {
285446
285452
  const nameText = ` \u2726 ${sponsorName}`;
@@ -285503,7 +285509,7 @@ function renderPreviewToString(presetId, width, sponsorName, message2) {
285503
285509
  }
285504
285510
  return lines.join("\n");
285505
285511
  }
285506
- async function generateCustomAnim(prompt, ollamaUrl, model, width = process.stdout.columns ?? 80, frameCount = 8) {
285512
+ async function generateCustomAnim(prompt, ollamaUrl, model, width = termCols(), frameCount = 8) {
285507
285513
  const genWidth = 40;
285508
285514
  const systemPrompt = `Generate ${frameCount} animation frames for a terminal banner. Each frame: 3 rows, each row exactly ${genWidth} characters. Use: \u2591\u2592\u2593\u2588\u25CF\u2605\u2726\u25A0\xB7 and spaces. Respond ONLY with a JSON array.
285509
285515
 
@@ -285592,7 +285598,7 @@ RULES: Each row EXACTLY ${genWidth} chars. Pad with spaces. Each frame is ["row1
285592
285598
  return null;
285593
285599
  }
285594
285600
  }
285595
- async function generateCustomAnimWithFallback(prompt, ollamaUrl, preferredModel, width = process.stdout.columns ?? 80, frameCount = 8, onStatus) {
285601
+ async function generateCustomAnimWithFallback(prompt, ollamaUrl, preferredModel, width = termCols(), frameCount = 8, onStatus) {
285596
285602
  onStatus?.(`Generating animation with ${preferredModel}...`);
285597
285603
  const result1 = await generateCustomAnim(prompt, ollamaUrl, preferredModel, width, frameCount);
285598
285604
  if (result1)
@@ -285621,6 +285627,7 @@ var ROWS, ANIM_PRESETS;
285621
285627
  var init_sponsor_anims = __esm({
285622
285628
  "packages/cli/dist/tui/sponsor-anims.js"() {
285623
285629
  "use strict";
285630
+ init_layout2();
285624
285631
  ROWS = 3;
285625
285632
  ANIM_PRESETS = [
285626
285633
  { id: "wave", name: "Wave", desc: "Flowing wave pattern", generate: generateWave },
@@ -285997,7 +286004,7 @@ async function stepBanner(config, rl, availableRows) {
285997
286004
  },
285998
286005
  onCustomKey: (item, key, _helpers) => {
285999
286006
  if ((key === "p" || key === "P") && ANIM_PRESETS2.some((p2) => p2.id === item.key)) {
286000
- const width = process.stdout.columns ?? 80;
286007
+ const width = termCols();
286001
286008
  const preview = renderPreviewToString(item.key, width, config.header?.message || "Sponsor Preview", config.header?.linkText || void 0);
286002
286009
  process.stdout.write("\n" + preview + "\n\n");
286003
286010
  return true;
@@ -286007,7 +286014,7 @@ async function stepBanner(config, rl, availableRows) {
286007
286014
  });
286008
286015
  if (!result.confirmed)
286009
286016
  return false;
286010
- const previewWidth = process.stdout.columns ?? 80;
286017
+ const previewWidth = termCols();
286011
286018
  const previewStr = renderPreviewToString(config.banner.preset, previewWidth, config.header?.message || "Sponsor Preview", config.header?.linkText || void 0);
286012
286019
  process.stdout.write("\n" + previewStr + "\n\n");
286013
286020
  if (result.key === "next")
@@ -286524,6 +286531,7 @@ var init_sponsor_wizard = __esm({
286524
286531
  init_tui_select();
286525
286532
  init_render();
286526
286533
  init_sponsor_anims();
286534
+ init_layout2();
286527
286535
  COLOR_PRESETS = [
286528
286536
  { name: "Amber", code: 214 },
286529
286537
  { name: "Cyan", code: 51 },
@@ -294189,7 +294197,7 @@ async function handleUpdate(subcommand, ctx3) {
294189
294197
  const centerCol = Math.floor(cols / 2);
294190
294198
  const boxW = Math.min(50, cols - 4);
294191
294199
  const boxH = 5;
294192
- const boxTop = centerRow - Math.floor(boxH / 2);
294200
+ const boxTop = Math.max(contentTop, Math.min(centerRow - Math.floor(boxH / 2), contentBottom - boxH + 1));
294193
294201
  const boxLeft = centerCol - Math.floor(boxW / 2);
294194
294202
  const innerW = boxW - 2;
294195
294203
  buf += `\x1B[${boxTop};${boxLeft}H${boxFg}\u256D${"\u2500".repeat(innerW)}\u256E`;
@@ -297306,6 +297314,7 @@ var isTTY8, PASTEL, StreamRenderer;
297306
297314
  var init_stream_renderer = __esm({
297307
297315
  "packages/cli/dist/tui/stream-renderer.js"() {
297308
297316
  "use strict";
297317
+ init_layout2();
297309
297318
  isTTY8 = process.stdout.isTTY ?? false;
297310
297319
  PASTEL = {
297311
297320
  key: 222,
@@ -297554,7 +297563,7 @@ var init_stream_renderer = __esm({
297554
297563
  rendered = this.highlightJson(raw, true);
297555
297564
  break;
297556
297565
  case "content": {
297557
- const maxW = (process.stdout.columns ?? 80) - 6;
297566
+ const maxW = termCols() - 6;
297558
297567
  if (this.inCodeBlock) {
297559
297568
  const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
297560
297569
  if (this.codeLang === "diff" || this.codeLang === "patch") {
@@ -297760,7 +297769,7 @@ var init_stream_renderer = __esm({
297760
297769
  return boldText(fg2563(colors2[level - 1] ?? 147, text));
297761
297770
  }
297762
297771
  if (/^[-*_]{3,}\s*$/.test(line)) {
297763
- const w = (process.stdout.columns ?? 80) - 10;
297772
+ const w = termCols() - 10;
297764
297773
  return fg2563(PASTEL.hr, "\u2500".repeat(Math.min(w, 60)));
297765
297774
  }
297766
297775
  if (/^>\s?/.test(line)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.78",
3
+ "version": "0.187.80",
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",