open-agents-ai 0.187.398 → 0.187.400

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.
package/dist/index.js CHANGED
@@ -532525,7 +532525,7 @@ var init_status_bar = __esm({
532525
532525
  };
532526
532526
  const decorateMenuButton = (cmd, label) => {
532527
532527
  const fg3 = buttonFg(cmd);
532528
- const body = `⡇ ${label} ⢸`;
532528
+ const body = `▏ ${label} ▕`;
532529
532529
  return linkify(cmd, `\x1B[4m\x1B[53m\x1B[38;5;${fg3}m${body}\x1B[24m\x1B[55m`);
532530
532530
  };
532531
532531
  const renderBtn = (cmd, label) => {
@@ -532534,11 +532534,11 @@ var init_status_bar = __esm({
532534
532534
  };
532535
532535
  const identity3 = this.buildHeaderIdentityRender();
532536
532536
  const menuBtns = [
532537
- { cmd: "help", label: "help", w: " help ".length },
532538
- { cmd: "voice", label: "voice", w: " voice ".length },
532539
- { cmd: "model", label: "model", w: " model ".length },
532540
- { cmd: "endpoint", label: "endpoint", w: " endpoint ".length },
532541
- { cmd: "sponsor", label: "sponsor", w: " sponsor ".length }
532537
+ { cmd: "help", label: "help", w: " help ".length },
532538
+ { cmd: "voice", label: "voice", w: " voice ".length },
532539
+ { cmd: "model", label: "model", w: " model ".length },
532540
+ { cmd: "endpoint", label: "endpoint", w: " endpoint ".length },
532541
+ { cmd: "sponsor", label: "sponsor", w: " sponsor ".length }
532542
532542
  ];
532543
532543
  const verW = identity3.width;
532544
532544
  let menuPages = [];
@@ -533402,17 +533402,31 @@ var init_status_bar = __esm({
533402
533402
  get hasSuggestions() {
533403
533403
  return this._suggestions.length > 0;
533404
533404
  }
533405
- /** Move suggestion highlight up */
533405
+ /** Move suggestion highlight up. Returns false at the top edge so callers can hand off to history. */
533406
533406
  suggestUp() {
533407
- if (this._suggestions.length === 0) return;
533408
- this._suggestIndex = this._suggestIndex <= 0 ? this._suggestions.length - 1 : this._suggestIndex - 1;
533407
+ if (this._suggestions.length === 0) return false;
533408
+ if (this._suggestIndex < 0) {
533409
+ this._suggestIndex = this._suggestions.length - 1;
533410
+ } else if (this._suggestIndex > 0) {
533411
+ this._suggestIndex -= 1;
533412
+ } else {
533413
+ return false;
533414
+ }
533409
533415
  if (this.active) this.renderFooterPreserveCursor();
533416
+ return true;
533410
533417
  }
533411
- /** Move suggestion highlight down */
533418
+ /** Move suggestion highlight down. Returns false at the bottom edge so callers can hand off to history. */
533412
533419
  suggestDown() {
533413
- if (this._suggestions.length === 0) return;
533414
- this._suggestIndex = this._suggestIndex >= this._suggestions.length - 1 ? 0 : this._suggestIndex + 1;
533420
+ if (this._suggestions.length === 0) return false;
533421
+ if (this._suggestIndex < 0) {
533422
+ this._suggestIndex = 0;
533423
+ } else if (this._suggestIndex < this._suggestions.length - 1) {
533424
+ this._suggestIndex += 1;
533425
+ } else {
533426
+ return false;
533427
+ }
533415
533428
  if (this.active) this.renderFooterPreserveCursor();
533429
+ return true;
533416
533430
  }
533417
533431
  /** Accept the currently highlighted suggestion */
533418
533432
  suggestAccept() {
@@ -534383,14 +534397,27 @@ ${CONTENT_BG_SEQ}`);
534383
534397
  const capsStr = capParts.length > 0 ? " " + capParts.join(" ") : "";
534384
534398
  const capsVisW = capParts.length > 0 ? 1 + capParts.length * 2 + (capParts.length - 1) : 0;
534385
534399
  if (this._modelName) {
534386
- const paramMatch = this._modelName.match(/(\d+\.?\d*[bBmM])/);
534387
- const paramStr = paramMatch ? paramMatch[1] : this._modelName.split(":")[0]?.split("/").pop() ?? this._modelName;
534388
- const modelExpanded = pastel2(146, this._modelName) + (capsStr ? " " + pastel2(183, capParts.join(" ")) : "") + promptSuffix + ctxSuffix;
534389
- const modelCompact = (capParts.length > 0 ? pastel2(183, capParts.join(" ")) : pastel2(146, paramStr)) + promptCompSuffix + ctxCompSuffix;
534390
- const expW = this._modelName.length + capsVisW + promptSuffixW + ctxSuffixW;
534391
- const compW = (capParts.length > 0 ? capParts.length * 2 + (capParts.length - 1) : paramStr.length) + promptCompSuffixW + ctxCompSuffixW;
534392
- modelSectionIdx = sections.length;
534393
- sections.push({ expanded: modelExpanded, compact: modelCompact, expandedW: expW, compactW: compW, empty: false });
534400
+ const hasCaps = capParts.length > 0;
534401
+ const hasPrompt = promptSuffixW > 0;
534402
+ const hasCtx = ctxSuffixW > 0;
534403
+ if (hasCaps || hasPrompt || hasCtx) {
534404
+ const capsRender = hasCaps ? pastel2(183, capParts.join(" ")) : "";
534405
+ const stripLead = (s2, n2) => s2.startsWith(" ".repeat(n2)) ? s2.slice(n2) : s2;
534406
+ const expandedTail = promptSuffix + ctxSuffix;
534407
+ const compactTail = promptCompSuffix + ctxCompSuffix;
534408
+ const modelExpanded = hasCaps ? capsRender + expandedTail : stripLead(expandedTail, 1);
534409
+ const modelCompact = hasCaps ? capsRender + compactTail : stripLead(compactTail, 1);
534410
+ const expW = (hasCaps ? capParts.length * 2 + (capParts.length - 1) : 0) + promptSuffixW + ctxSuffixW - (hasCaps ? 0 : 1);
534411
+ const compW = (hasCaps ? capParts.length * 2 + (capParts.length - 1) : 0) + promptCompSuffixW + ctxCompSuffixW - (hasCaps ? 0 : 1);
534412
+ modelSectionIdx = sections.length;
534413
+ sections.push({
534414
+ expanded: modelExpanded,
534415
+ compact: modelCompact,
534416
+ expandedW: Math.max(0, expW),
534417
+ compactW: Math.max(0, compW),
534418
+ empty: false
534419
+ });
534420
+ }
534394
534421
  } else if (capParts.length > 0) {
534395
534422
  const capsOnly = pastel2(183, capParts.join(" ")) + ctxCompSuffix;
534396
534423
  const capsOnlyW = capParts.length * 2 + (capParts.length - 1) + ctxCompSuffixW;
@@ -534544,12 +534571,6 @@ ${CONTENT_BG_SEQ}`);
534544
534571
  const recW = 1 + 4 + (this._countdown > 0 ? 1 + `${this._countdown}s`.length : 0);
534545
534572
  sections.push({ expanded: recStr, compact: recStr, expandedW: recW, compactW: recW, empty: false });
534546
534573
  }
534547
- if (this._version) {
534548
- versionSectionIdx = sections.length;
534549
- const vStr = pastel2(245, "v" + this._version);
534550
- const vW = 1 + this._version.length;
534551
- sections.push({ expanded: vStr, compact: vStr, expandedW: vW, compactW: vW, empty: false });
534552
- }
534553
534574
  const activeIndices = sections.map((s2, i2) => !s2.empty ? i2 : -1).filter((i2) => i2 >= 0);
534554
534575
  const isCompact = new Array(sections.length).fill(false);
534555
534576
  const isHidden = new Array(sections.length).fill(false);
@@ -535063,6 +535084,10 @@ ${CONTENT_BG_SEQ}`);
535063
535084
  else self2.scrollContentDown(1);
535064
535085
  return;
535065
535086
  }
535087
+ if (self2._suggestions.length > 0) {
535088
+ const handled = key.name === "up" ? self2.suggestUp() : self2.suggestDown();
535089
+ if (handled) return;
535090
+ }
535066
535091
  self2.notifyHistoryNavigation();
535067
535092
  return origTtyWrite(s2, key);
535068
535093
  }
@@ -535141,19 +535166,25 @@ ${CONTENT_BG_SEQ}`);
535141
535166
  di.on("ctrl-shift-b", () => self2.armBlockSelection());
535142
535167
  di.on("up", () => {
535143
535168
  if (self2._suggestions.length > 0) {
535144
- self2.suggestUp();
535169
+ if (self2.suggestUp()) return;
535170
+ self2.notifyHistoryNavigation();
535171
+ di.historyUp();
535145
535172
  } else if (self2.writeDepth > 0 || self2._contentScrollOffset > 0) {
535146
535173
  self2.scrollContentUp(1);
535147
535174
  } else {
535175
+ self2.notifyHistoryNavigation();
535148
535176
  di.historyUp();
535149
535177
  }
535150
535178
  });
535151
535179
  di.on("down", () => {
535152
535180
  if (self2._suggestions.length > 0) {
535153
- self2.suggestDown();
535181
+ if (self2.suggestDown()) return;
535182
+ self2.notifyHistoryNavigation();
535183
+ di.historyDown();
535154
535184
  } else if (self2.writeDepth > 0 || self2._contentScrollOffset > 0) {
535155
535185
  self2.scrollContentDown(1);
535156
535186
  } else {
535187
+ self2.notifyHistoryNavigation();
535157
535188
  di.historyDown();
535158
535189
  }
535159
535190
  });
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.398",
3
+ "version": "0.187.400",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-agents-ai",
9
- "version": "0.187.398",
9
+ "version": "0.187.400",
10
10
  "hasInstallScript": true,
11
11
  "license": "CC-BY-NC-4.0",
12
12
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.398",
3
+ "version": "0.187.400",
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",