open-agents-ai 0.187.78 → 0.187.79

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 +19 -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();
@@ -280979,7 +280981,7 @@ function tuiSelect(opts) {
280979
280981
  const reservedTopBottom = 0;
280980
280982
  const hasCrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
280981
280983
  const selectChrome = (hasCrumbs ? 11 : 10) + 1;
280982
- const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : process.stdout.rows ?? 24;
280984
+ const contentArea = opts.availableRows ? opts.availableRows + reservedTopBottom : termRows();
280983
280985
  let maxVisible = opts.maxVisible ?? Math.max(3, contentArea - selectChrome);
280984
280986
  let scrollOffset = 0;
280985
280987
  let lastRenderedLines = 0;
@@ -281018,7 +281020,7 @@ function tuiSelect(opts) {
281018
281020
  }
281019
281021
  const hasBreadcrumbs = opts.breadcrumbs && opts.breadcrumbs.length > 0;
281020
281022
  function render() {
281021
- const currentRows = process.stdout.rows ?? 24;
281023
+ const currentRows = termRows();
281022
281024
  if (!opts.maxVisible) {
281023
281025
  maxVisible = Math.max(3, currentRows - selectChrome);
281024
281026
  }
@@ -281488,6 +281490,7 @@ var init_tui_select = __esm({
281488
281490
  "use strict";
281489
281491
  init_overlay_lock();
281490
281492
  init_theme();
281493
+ init_layout2();
281491
281494
  isTTY3 = process.stdout.isTTY ?? false;
281492
281495
  selectColors = {
281493
281496
  orange: (t2) => fg2562(208, t2),
@@ -284475,8 +284478,8 @@ function showDropPanel(opts) {
284475
284478
  let errorMsg = "";
284476
284479
  function render() {
284477
284480
  overlayWrite("\x1B[H\x1B[2J");
284478
- const cols = process.stdout.columns ?? 80;
284479
- const rows = process.stdout.rows ?? 24;
284481
+ const cols = termCols();
284482
+ const rows = termRows();
284480
284483
  const textWidth = Math.max(10, cols - 9);
284481
284484
  const innerSpace = Math.max(10, cols - 6);
284482
284485
  const content = [];
@@ -284594,6 +284597,7 @@ var init_drop_panel = __esm({
284594
284597
  "packages/cli/dist/tui/drop-panel.js"() {
284595
284598
  "use strict";
284596
284599
  init_overlay_lock();
284600
+ init_layout2();
284597
284601
  isTTY4 = process.stdout.isTTY ?? false;
284598
284602
  dc = {
284599
284603
  bold: (t2) => ansi4("1", t2),
@@ -285440,7 +285444,7 @@ function getPreset2(id) {
285440
285444
  }
285441
285445
  function presetToBannerDesign(presetId, sponsorName, message2) {
285442
285446
  const preset = getPreset2(presetId);
285443
- const width = process.stdout.columns ?? 80;
285447
+ const width = termCols();
285444
285448
  const frames = preset ? preset.generate(width) : generateWave(width);
285445
285449
  if (sponsorName) {
285446
285450
  const nameText = ` \u2726 ${sponsorName}`;
@@ -285503,7 +285507,7 @@ function renderPreviewToString(presetId, width, sponsorName, message2) {
285503
285507
  }
285504
285508
  return lines.join("\n");
285505
285509
  }
285506
- async function generateCustomAnim(prompt, ollamaUrl, model, width = process.stdout.columns ?? 80, frameCount = 8) {
285510
+ async function generateCustomAnim(prompt, ollamaUrl, model, width = termCols(), frameCount = 8) {
285507
285511
  const genWidth = 40;
285508
285512
  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
285513
 
@@ -285592,7 +285596,7 @@ RULES: Each row EXACTLY ${genWidth} chars. Pad with spaces. Each frame is ["row1
285592
285596
  return null;
285593
285597
  }
285594
285598
  }
285595
- async function generateCustomAnimWithFallback(prompt, ollamaUrl, preferredModel, width = process.stdout.columns ?? 80, frameCount = 8, onStatus) {
285599
+ async function generateCustomAnimWithFallback(prompt, ollamaUrl, preferredModel, width = termCols(), frameCount = 8, onStatus) {
285596
285600
  onStatus?.(`Generating animation with ${preferredModel}...`);
285597
285601
  const result1 = await generateCustomAnim(prompt, ollamaUrl, preferredModel, width, frameCount);
285598
285602
  if (result1)
@@ -285621,6 +285625,7 @@ var ROWS, ANIM_PRESETS;
285621
285625
  var init_sponsor_anims = __esm({
285622
285626
  "packages/cli/dist/tui/sponsor-anims.js"() {
285623
285627
  "use strict";
285628
+ init_layout2();
285624
285629
  ROWS = 3;
285625
285630
  ANIM_PRESETS = [
285626
285631
  { id: "wave", name: "Wave", desc: "Flowing wave pattern", generate: generateWave },
@@ -285997,7 +286002,7 @@ async function stepBanner(config, rl, availableRows) {
285997
286002
  },
285998
286003
  onCustomKey: (item, key, _helpers) => {
285999
286004
  if ((key === "p" || key === "P") && ANIM_PRESETS2.some((p2) => p2.id === item.key)) {
286000
- const width = process.stdout.columns ?? 80;
286005
+ const width = termCols();
286001
286006
  const preview = renderPreviewToString(item.key, width, config.header?.message || "Sponsor Preview", config.header?.linkText || void 0);
286002
286007
  process.stdout.write("\n" + preview + "\n\n");
286003
286008
  return true;
@@ -286007,7 +286012,7 @@ async function stepBanner(config, rl, availableRows) {
286007
286012
  });
286008
286013
  if (!result.confirmed)
286009
286014
  return false;
286010
- const previewWidth = process.stdout.columns ?? 80;
286015
+ const previewWidth = termCols();
286011
286016
  const previewStr = renderPreviewToString(config.banner.preset, previewWidth, config.header?.message || "Sponsor Preview", config.header?.linkText || void 0);
286012
286017
  process.stdout.write("\n" + previewStr + "\n\n");
286013
286018
  if (result.key === "next")
@@ -286524,6 +286529,7 @@ var init_sponsor_wizard = __esm({
286524
286529
  init_tui_select();
286525
286530
  init_render();
286526
286531
  init_sponsor_anims();
286532
+ init_layout2();
286527
286533
  COLOR_PRESETS = [
286528
286534
  { name: "Amber", code: 214 },
286529
286535
  { name: "Cyan", code: 51 },
@@ -294189,7 +294195,7 @@ async function handleUpdate(subcommand, ctx3) {
294189
294195
  const centerCol = Math.floor(cols / 2);
294190
294196
  const boxW = Math.min(50, cols - 4);
294191
294197
  const boxH = 5;
294192
- const boxTop = centerRow - Math.floor(boxH / 2);
294198
+ const boxTop = Math.max(contentTop, Math.min(centerRow - Math.floor(boxH / 2), contentBottom - boxH + 1));
294193
294199
  const boxLeft = centerCol - Math.floor(boxW / 2);
294194
294200
  const innerW = boxW - 2;
294195
294201
  buf += `\x1B[${boxTop};${boxLeft}H${boxFg}\u256D${"\u2500".repeat(innerW)}\u256E`;
@@ -297306,6 +297312,7 @@ var isTTY8, PASTEL, StreamRenderer;
297306
297312
  var init_stream_renderer = __esm({
297307
297313
  "packages/cli/dist/tui/stream-renderer.js"() {
297308
297314
  "use strict";
297315
+ init_layout2();
297309
297316
  isTTY8 = process.stdout.isTTY ?? false;
297310
297317
  PASTEL = {
297311
297318
  key: 222,
@@ -297554,7 +297561,7 @@ var init_stream_renderer = __esm({
297554
297561
  rendered = this.highlightJson(raw, true);
297555
297562
  break;
297556
297563
  case "content": {
297557
- const maxW = (process.stdout.columns ?? 80) - 6;
297564
+ const maxW = termCols() - 6;
297558
297565
  if (this.inCodeBlock) {
297559
297566
  const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
297560
297567
  if (this.codeLang === "diff" || this.codeLang === "patch") {
@@ -297760,7 +297767,7 @@ var init_stream_renderer = __esm({
297760
297767
  return boldText(fg2563(colors2[level - 1] ?? 147, text));
297761
297768
  }
297762
297769
  if (/^[-*_]{3,}\s*$/.test(line)) {
297763
- const w = (process.stdout.columns ?? 80) - 10;
297770
+ const w = termCols() - 10;
297764
297771
  return fg2563(PASTEL.hr, "\u2500".repeat(Math.min(w, 60)));
297765
297772
  }
297766
297773
  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.79",
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",