open-agents-ai 0.103.88 → 0.103.90

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 +118 -123
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -46731,28 +46731,28 @@ var init_status_bar = __esm({
46731
46731
  const pos = this.rowPositions(rows);
46732
46732
  const w = getTermWidth();
46733
46733
  const sep = c2.dim("\u2500".repeat(w));
46734
- let clearBuf = "";
46735
- if (prevRows > 0 && (rows !== prevRows || cols !== prevCols)) {
46736
- const wrapFactor = cols > 0 ? Math.ceil(prevCols / cols) : 1;
46737
- const extraWrappedRows = Math.max(0, (wrapFactor - 1) * 3);
46738
- const safetyMargin = extraWrappedRows + 2;
46739
- const clearFrom = Math.max(1, pos.bufferRow - safetyMargin);
46740
- clearBuf = "\x1B[1;" + rows + `r\x1B[${clearFrom};1H\x1B[J`;
46741
- }
46742
46734
  if (this.writeDepth > 0) {
46743
46735
  const inputWrap = this.wrapInput(w);
46744
- let buf = clearBuf + `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[?25l\x1B[?7l\x1B[${pos.bufferRow};1H\x1B[2K${this.buildBufferContent(w)}\x1B[${pos.topSepRow};1H\x1B[2K${sep}`;
46736
+ let buf = `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[?25l\x1B[?7l`;
46737
+ for (let row = pos.bufferRow; row <= rows; row++) {
46738
+ buf += `\x1B[${row};1H\x1B[2K`;
46739
+ }
46740
+ buf += `\x1B[${pos.bufferRow};1H${this.buildBufferContent(w)}\x1B[${pos.topSepRow};1H${sep}`;
46745
46741
  for (let i = 0; i < inputWrap.lines.length; i++) {
46746
46742
  const row = pos.inputStartRow + i;
46747
46743
  const prefix = i === 0 ? this.promptText : " ".repeat(this.promptWidth);
46748
- buf += `\x1B[${row};1H\x1B[2K${prefix}${inputWrap.lines[i]}`;
46744
+ buf += `\x1B[${row};1H${prefix}${inputWrap.lines[i]}`;
46749
46745
  }
46750
- buf += `\x1B[${pos.bottomSepRow};1H\x1B[2K${sep}\x1B[${pos.metricsRow};1H\x1B[2K${this.buildMetricsLine()}\x1B[?7h\x1B[${pos.scrollEnd};1H`;
46746
+ buf += `\x1B[${pos.bottomSepRow};1H${sep}\x1B[${pos.metricsRow};1H${this.buildMetricsLine()}\x1B[?7h\x1B[${pos.scrollEnd};1H`;
46751
46747
  process.stdout.write(buf);
46752
46748
  } else {
46753
- if (clearBuf)
46754
- process.stdout.write(clearBuf);
46755
46749
  this.applyScrollRegion();
46750
+ let clearBuf = "\x1B[?7l";
46751
+ for (let row = pos.bufferRow; row <= rows; row++) {
46752
+ clearBuf += `\x1B[${row};1H\x1B[2K`;
46753
+ }
46754
+ clearBuf += "\x1B[?7h";
46755
+ process.stdout.write(clearBuf);
46756
46756
  this.renderFooterAndPositionInput();
46757
46757
  }
46758
46758
  }
@@ -46843,58 +46843,68 @@ var init_status_bar = __esm({
46843
46843
  const pipe = pastel2(60, " \u2502 ");
46844
46844
  const pipeW = 3;
46845
46845
  const sections = [];
46846
+ const compactOrder = [];
46847
+ let modelSectionIdx = -1;
46848
+ let versionSectionIdx = -1;
46846
46849
  const tokInRaw = m.promptTokens > 0 ? m.promptTokens : Math.max(m.estimatedContextTokens, 0);
46847
- const tokInPrefix = m.promptTokens > 0 ? "" : "~";
46848
- const tokInExpanded = pastel2(117, "In: ") + c2.bold(tokInPrefix + tokInRaw.toLocaleString());
46849
- const tokInCompact = pastel2(117, "I:") + c2.bold(tokInPrefix + _StatusBar.compactNum(tokInRaw));
46850
- sections.push({
46851
- expanded: tokInExpanded,
46852
- compact: tokInCompact,
46853
- expandedW: 4 + (tokInPrefix + tokInRaw.toLocaleString()).length,
46854
- compactW: 2 + (tokInPrefix + _StatusBar.compactNum(tokInRaw)).length,
46855
- empty: false
46856
- });
46857
46850
  const effectiveOut = this.effectiveCompletionTokens;
46858
46851
  const tokOutRaw = effectiveOut > 0 ? effectiveOut : Math.ceil(m.totalTokens > 0 ? m.totalTokens - m.promptTokens : m.estimatedContextTokens * 0.3);
46859
- const tokOutPrefix = effectiveOut > 0 ? "" : "~";
46860
- const tokOutExpanded = pastel2(151, "Out: ") + c2.bold(tokOutPrefix + Math.max(0, tokOutRaw).toLocaleString());
46861
- const tokOutCompact = pastel2(151, "O:") + c2.bold(tokOutPrefix + _StatusBar.compactNum(Math.max(0, tokOutRaw)));
46862
- sections.push({
46863
- expanded: tokOutExpanded,
46864
- compact: tokOutCompact,
46865
- expandedW: 5 + (tokOutPrefix + Math.max(0, tokOutRaw).toLocaleString()).length,
46866
- compactW: 2 + (tokOutPrefix + _StatusBar.compactNum(Math.max(0, tokOutRaw))).length,
46867
- empty: false
46868
- });
46869
- const ctxUsed = m.estimatedContextTokens;
46870
- const ctxTotal = m.contextWindowSize;
46871
- let ctxExpanded;
46872
- let ctxCompact;
46873
- let ctxExpandedW;
46874
- let ctxCompactW;
46875
- if (ctxTotal <= 0) {
46876
- ctxExpanded = pastel2(153, "Ctx: ") + c2.dim("--");
46877
- ctxCompact = pastel2(153, "Ctx:") + c2.dim("--");
46878
- ctxExpandedW = 7;
46879
- ctxCompactW = 6;
46880
- } else {
46881
- const ctxPct = Math.max(0, Math.min(100, Math.round((1 - ctxUsed / ctxTotal) * 100)));
46882
- const ctxColor = ctxPct > 50 ? c2.green : ctxPct > 20 ? c2.yellow : c2.red;
46883
- const ctxFullStr = `${ctxUsed.toLocaleString()}/${ctxTotal.toLocaleString()}`;
46884
- ctxExpanded = pastel2(153, "Ctx: ") + c2.bold(ctxFullStr) + ` ${ctxColor(`${ctxPct}%`)}`;
46885
- ctxCompact = pastel2(153, "Ctx:") + ctxColor(`${ctxPct}%`);
46886
- ctxExpandedW = 5 + ctxFullStr.length + 1 + `${ctxPct}%`.length;
46887
- ctxCompactW = 4 + `${ctxPct}%`.length;
46888
- }
46889
- sections.push({ expanded: ctxExpanded, compact: ctxCompact, expandedW: ctxExpandedW, compactW: ctxCompactW, empty: false });
46852
+ const tokOutVal = Math.max(0, tokOutRaw);
46853
+ const tokExpanded = pastel2(117, "\u2191") + c2.bold(tokInRaw.toLocaleString()) + " " + pastel2(151, "\u2193") + c2.bold(tokOutVal.toLocaleString());
46854
+ const tokCompact = pastel2(117, "\u2191") + c2.bold(_StatusBar.compactNum(tokInRaw)) + " " + pastel2(151, "\u2193") + c2.bold(_StatusBar.compactNum(tokOutVal));
46855
+ const tokExpW = 1 + tokInRaw.toLocaleString().length + 1 + 1 + tokOutVal.toLocaleString().length;
46856
+ const tokCompW = 1 + _StatusBar.compactNum(tokInRaw).length + 1 + 1 + _StatusBar.compactNum(tokOutVal).length;
46857
+ sections.push({ expanded: tokExpanded, compact: tokCompact, expandedW: tokExpW, compactW: tokCompW, empty: false });
46858
+ {
46859
+ const ctxUsed = m.estimatedContextTokens;
46860
+ const ctxTotal = m.contextWindowSize;
46861
+ let ctxSuffix = "";
46862
+ let ctxSuffixW = 0;
46863
+ let ctxCompSuffix = "";
46864
+ let ctxCompSuffixW = 0;
46865
+ if (ctxTotal > 0) {
46866
+ const ctxPct = Math.max(0, Math.min(100, Math.round((1 - ctxUsed / ctxTotal) * 100)));
46867
+ const ctxColor = ctxPct > 50 ? c2.green : ctxPct > 20 ? c2.yellow : c2.red;
46868
+ const ctxSizeStr = _StatusBar.compactNum(ctxTotal);
46869
+ ctxSuffix = " " + ctxColor(`${ctxPct}%`) + c2.dim(` ${ctxSizeStr}`);
46870
+ ctxSuffixW = 1 + `${ctxPct}%`.length + 1 + ctxSizeStr.length;
46871
+ ctxCompSuffix = " " + ctxColor(`${ctxPct}%`);
46872
+ ctxCompSuffixW = 1 + `${ctxPct}%`.length;
46873
+ }
46874
+ const capParts = [];
46875
+ if (this._caps.vision)
46876
+ capParts.push("\u{1F441}");
46877
+ if (this._caps.toolUse)
46878
+ capParts.push("\u{1F527}");
46879
+ if (this._caps.thinking)
46880
+ capParts.push("\u{1F9E0}");
46881
+ const capsStr = capParts.length > 0 ? " " + capParts.join(" ") : "";
46882
+ const capsVisW = capParts.length > 0 ? 1 + capParts.length * 2 + (capParts.length - 1) : 0;
46883
+ if (this._modelName) {
46884
+ const paramMatch = this._modelName.match(/(\d+\.?\d*[bBmM])/);
46885
+ const paramStr = paramMatch ? paramMatch[1] : this._modelName.split(":")[0]?.split("/").pop() ?? this._modelName;
46886
+ const modelExpanded = pastel2(146, this._modelName) + (capsStr ? " " + pastel2(183, capParts.join(" ")) : "") + ctxSuffix;
46887
+ const modelCompact = (capParts.length > 0 ? pastel2(183, capParts.join(" ")) : pastel2(146, paramStr)) + ctxCompSuffix;
46888
+ const expW = this._modelName.length + capsVisW + ctxSuffixW;
46889
+ const compW = (capParts.length > 0 ? capParts.length * 2 + (capParts.length - 1) : paramStr.length) + ctxCompSuffixW;
46890
+ modelSectionIdx = sections.length;
46891
+ sections.push({ expanded: modelExpanded, compact: modelCompact, expandedW: expW, compactW: compW, empty: false });
46892
+ } else if (capParts.length > 0) {
46893
+ const capsOnly = pastel2(183, capParts.join(" ")) + ctxCompSuffix;
46894
+ const capsOnlyW = capParts.length * 2 + (capParts.length - 1) + ctxCompSuffixW;
46895
+ sections.push({ expanded: capsOnly, compact: capsOnly, expandedW: capsOnlyW, compactW: capsOnlyW, empty: false });
46896
+ } else if (ctxTotal > 0) {
46897
+ sections.push({ expanded: ctxSuffix.trimStart(), compact: ctxCompSuffix.trimStart(), expandedW: ctxSuffixW - 1, compactW: ctxCompSuffixW - 1, empty: false });
46898
+ }
46899
+ }
46890
46900
  if (this._snr) {
46891
46901
  const snrPct = Math.round(this._snr.ratio * 100);
46892
46902
  const snrColor = snrPct >= 70 ? c2.green : snrPct >= 40 ? c2.yellow : c2.red;
46893
46903
  const dPrimeStr = this._snr.dPrime.toFixed(1);
46894
46904
  const capStr = this._snr.capacityWarning ? c2.red(" !CAP") : "";
46895
- const snrExpanded = pastel2(183, "SNR: ") + snrColor(c2.bold(`${snrPct}%`)) + c2.dim(` d'${dPrimeStr}`) + capStr;
46905
+ const snrExpanded = pastel2(183, "SNR ") + snrColor(c2.bold(`${snrPct}%`)) + c2.dim(` d'${dPrimeStr}`) + capStr;
46896
46906
  const snrCompact = snrColor(`${snrPct}%`);
46897
- const expW = 5 + `${snrPct}%`.length + 3 + dPrimeStr.length + (this._snr.capacityWarning ? 5 : 0);
46907
+ const expW = 4 + `${snrPct}%`.length + 3 + dPrimeStr.length + (this._snr.capacityWarning ? 5 : 0);
46898
46908
  sections.push({ expanded: snrExpanded, compact: snrCompact, expandedW: expW, compactW: `${snrPct}%`.length, empty: false });
46899
46909
  }
46900
46910
  if (this._emotion) {
@@ -46904,9 +46914,7 @@ var init_status_bar = __esm({
46904
46914
  expanded: emotionExpanded,
46905
46915
  compact: emotionCompact,
46906
46916
  expandedW: 2 + 1 + this._emotion.label.length,
46907
- // emoji(2) + space + label
46908
46917
  compactW: 2,
46909
- // just emoji
46910
46918
  empty: false
46911
46919
  });
46912
46920
  }
@@ -46915,63 +46923,28 @@ var init_status_bar = __esm({
46915
46923
  if (ratio > 0) {
46916
46924
  const ratioStr = ratio >= 10 ? `${Math.round(ratio)}x` : `${ratio.toFixed(1)}x`;
46917
46925
  const ratioColor = ratio >= 2 ? c2.green : ratio >= 1 ? c2.yellow : c2.red;
46918
- const speedExpanded = pastel2(218, "Exp: ") + ratioColor(c2.bold(ratioStr));
46926
+ const speedExpanded = pastel2(218, "Exp ") + ratioColor(c2.bold(ratioStr));
46919
46927
  sections.push({
46920
46928
  expanded: speedExpanded,
46921
46929
  compact: speedExpanded,
46922
- expandedW: 5 + ratioStr.length,
46923
- compactW: 5 + ratioStr.length,
46930
+ expandedW: 4 + ratioStr.length,
46931
+ compactW: 4 + ratioStr.length,
46924
46932
  empty: false
46925
46933
  });
46926
46934
  }
46927
46935
  }
46928
46936
  if (m.hasPricing && m.estimatedCost !== void 0) {
46929
46937
  const costStr = m.estimatedCost < 0.01 ? `$${m.estimatedCost.toFixed(4)}` : m.estimatedCost < 1 ? `$${m.estimatedCost.toFixed(3)}` : `$${m.estimatedCost.toFixed(2)}`;
46930
- const costExpanded = pastel2(222, "Cost: ") + c2.bold(costStr);
46931
- const costCompact = pastel2(222, "") + c2.bold(costStr);
46938
+ const costExpanded = pastel2(222, "Cost ") + c2.bold(costStr);
46939
+ const costCompact = c2.bold(costStr);
46932
46940
  sections.push({
46933
46941
  expanded: costExpanded,
46934
46942
  compact: costCompact,
46935
- expandedW: 6 + costStr.length,
46943
+ expandedW: 5 + costStr.length,
46936
46944
  compactW: costStr.length,
46937
46945
  empty: false
46938
46946
  });
46939
46947
  }
46940
- if (this._modelName) {
46941
- const capParts = [];
46942
- if (this._caps.vision)
46943
- capParts.push("\u{1F441}");
46944
- if (this._caps.toolUse)
46945
- capParts.push("\u{1F527}");
46946
- if (this._caps.thinking)
46947
- capParts.push("\u{1F9E0}");
46948
- const capsStr = capParts.length > 0 ? " " + capParts.join(" ") : "";
46949
- const capsVisW = capParts.length > 0 ? 1 + capParts.length * 2 + (capParts.length - 1) : 0;
46950
- const paramMatch = this._modelName.match(/(\d+\.?\d*[bBmM])/);
46951
- const paramStr = paramMatch ? paramMatch[1] : this._modelName.split(":")[0]?.split("/").pop() ?? this._modelName;
46952
- const modelExpanded = pastel2(146, this._modelName) + (capsStr ? pastel2(60, " ") + pastel2(183, capParts.join(" ")) : "");
46953
- const modelCompact = pastel2(146, paramStr) + (capsStr ? pastel2(60, " ") + pastel2(183, capParts.join(" ")) : "");
46954
- sections.push({
46955
- expanded: modelExpanded,
46956
- compact: modelCompact,
46957
- expandedW: this._modelName.length + capsVisW,
46958
- compactW: paramStr.length + capsVisW,
46959
- empty: false
46960
- });
46961
- } else {
46962
- const capParts = [];
46963
- if (this._caps.vision)
46964
- capParts.push("\u{1F441}");
46965
- if (this._caps.toolUse)
46966
- capParts.push("\u{1F527}");
46967
- if (this._caps.thinking)
46968
- capParts.push("\u{1F9E0}");
46969
- if (capParts.length > 0) {
46970
- const capsStr = pastel2(183, capParts.join(" "));
46971
- const capsVisW = capParts.length * 2 + (capParts.length - 1);
46972
- sections.push({ expanded: capsStr, compact: capsStr, expandedW: capsVisW, compactW: capsVisW, empty: false });
46973
- }
46974
- }
46975
46948
  if (this._expose) {
46976
46949
  const INTERNAL_CAPS = /* @__PURE__ */ new Set(["system_metrics", "__list_capabilities"]);
46977
46950
  const statusEmoji = this._expose.activeConnections > 0 ? this._exposeBlinkOn ? "\u{1F7E2}" : "\u26AB" : this._expose.status === "active" ? "\u{1F7E2}" : this._expose.status === "error" ? "\u{1F534}" : "\u{1F7E0}";
@@ -46992,7 +46965,6 @@ var init_status_bar = __esm({
46992
46965
  expanded: exposeExpanded,
46993
46966
  compact: exposeCompact,
46994
46967
  expandedW: 2 + expFullStr.length,
46995
- // emoji(2) + text
46996
46968
  compactW: 2 + expCompStr.length,
46997
46969
  empty: false
46998
46970
  });
@@ -47010,39 +46982,39 @@ var init_status_bar = __esm({
47010
46982
  if (rm2.cpuUtil >= 0) {
47011
46983
  const cpuColor = rm2.cpuUtil > 80 ? c2.red : rm2.cpuUtil > 50 ? c2.yellow : c2.green;
47012
46984
  const cpuCoresInfo = rm2.cpuCores > 0 ? ` (${rm2.cpuCores}c` + (rm2.cpuModel ? " " + rm2.cpuModel.replace(/\s+/g, " ").slice(0, 30) : "") + ")" : "";
47013
- hwExpStr += `CPU:${cpuColor(rm2.cpuUtil + "%")}${c2.dim(cpuCoresInfo)}`;
47014
- hwCompStr += `CPU:${cpuColor(rm2.cpuUtil + "%")}`;
46985
+ hwExpStr += `CPU ${cpuColor(rm2.cpuUtil + "%")}${c2.dim(cpuCoresInfo)}`;
46986
+ hwCompStr += `CPU ${cpuColor(rm2.cpuUtil + "%")}`;
47015
46987
  hwExpW += 4 + `${rm2.cpuUtil}%`.length + cpuCoresInfo.length;
47016
46988
  hwCompW += 4 + `${rm2.cpuUtil}%`.length;
47017
46989
  }
47018
46990
  if (rm2.memUtil >= 0) {
47019
46991
  const memColor = rm2.memUtil > 80 ? c2.red : rm2.memUtil > 50 ? c2.yellow : c2.green;
47020
46992
  const memDetail = rm2.memTotalGB > 0 ? ` (${rm2.memUsedGB}/${rm2.memTotalGB}GB)` : "";
47021
- hwExpStr += ` RAM:${memColor(rm2.memUtil + "%")}${c2.dim(memDetail)}`;
47022
- hwCompStr += ` RAM:${memColor(rm2.memUtil + "%")}`;
46993
+ hwExpStr += ` RAM ${memColor(rm2.memUtil + "%")}${c2.dim(memDetail)}`;
46994
+ hwCompStr += ` RAM ${memColor(rm2.memUtil + "%")}`;
47023
46995
  hwExpW += 5 + `${rm2.memUtil}%`.length + memDetail.length;
47024
46996
  hwCompW += 5 + `${rm2.memUtil}%`.length;
47025
46997
  }
47026
46998
  if (rm2.gpuUtil >= 0) {
47027
46999
  const gpuColor = rm2.gpuUtil > 80 ? c2.red : rm2.gpuUtil > 50 ? c2.yellow : c2.green;
47028
47000
  const gpuNameShort = rm2.gpuName ? ` (${rm2.gpuName.slice(0, 20)})` : "";
47029
- hwExpStr += ` GPU:${gpuColor(rm2.gpuUtil + "%")}${c2.dim(gpuNameShort)}`;
47030
- hwCompStr += ` GPU:${gpuColor(rm2.gpuUtil + "%")}`;
47001
+ hwExpStr += ` GPU ${gpuColor(rm2.gpuUtil + "%")}${c2.dim(gpuNameShort)}`;
47002
+ hwCompStr += ` GPU ${gpuColor(rm2.gpuUtil + "%")}`;
47031
47003
  hwExpW += 5 + `${rm2.gpuUtil}%`.length + gpuNameShort.length;
47032
47004
  hwCompW += 5 + `${rm2.gpuUtil}%`.length;
47033
47005
  }
47034
47006
  if (rm2.vramUtil >= 0) {
47035
47007
  const vramColor = rm2.vramUtil > 80 ? c2.red : rm2.vramUtil > 50 ? c2.yellow : c2.green;
47036
47008
  const vramDetail = rm2.vramTotalMB > 0 ? ` (${rm2.vramUsedMB}/${rm2.vramTotalMB}MB)` : "";
47037
- hwExpStr += ` VRAM:${vramColor(rm2.vramUtil + "%")}${c2.dim(vramDetail)}`;
47009
+ hwExpStr += ` VRAM ${vramColor(rm2.vramUtil + "%")}${c2.dim(vramDetail)}`;
47038
47010
  hwExpW += 6 + `${rm2.vramUtil}%`.length + vramDetail.length;
47039
47011
  }
47040
47012
  const net = um.network;
47041
47013
  const rxStr = formatRate(net.rxBytesPerSec);
47042
47014
  const txStr = formatRate(net.txBytesPerSec);
47043
- const netExpStr = ` ${c2.dim("i:")}${pastel2(116, rxStr)} ${c2.dim("o:")}${pastel2(218, txStr)}`;
47044
- const netCompStr = ` ${c2.dim("i:")}${pastel2(116, rxStr)} ${c2.dim("o:")}${pastel2(218, txStr)}`;
47045
- const netW = 3 + rxStr.length + 3 + txStr.length;
47015
+ const netExpStr = ` ${pastel2(116, "\u2193" + rxStr)} ${pastel2(218, "\u2191" + txStr)}`;
47016
+ const netCompStr = netExpStr;
47017
+ const netW = 1 + 1 + rxStr.length + 1 + 1 + txStr.length;
47046
47018
  const sysExpanded = srcTag + " " + hwExpStr + netExpStr;
47047
47019
  const sysCompact = srcTag + " " + hwCompStr + netCompStr;
47048
47020
  sections.push({
@@ -47061,34 +47033,54 @@ var init_status_bar = __esm({
47061
47033
  sections.push({ expanded: recStr, compact: recStr, expandedW: recW, compactW: recW, empty: false });
47062
47034
  }
47063
47035
  if (this._version) {
47064
- const vExpanded = pastel2(245, "v" + this._version);
47065
- const vCompact = pastel2(245, "v" + this._version);
47036
+ versionSectionIdx = sections.length;
47037
+ const vStr = pastel2(245, "v" + this._version);
47066
47038
  const vW = 1 + this._version.length;
47067
- sections.push({ expanded: vExpanded, compact: vCompact, expandedW: vW, compactW: vW, empty: false });
47039
+ sections.push({ expanded: vStr, compact: vStr, expandedW: vW, compactW: vW, empty: false });
47068
47040
  }
47069
47041
  const activeIndices = sections.map((s, i) => !s.empty ? i : -1).filter((i) => i >= 0);
47070
47042
  const isCompact = new Array(sections.length).fill(false);
47043
+ const isHidden = new Array(sections.length).fill(false);
47044
+ if (modelSectionIdx >= 0)
47045
+ compactOrder.push(modelSectionIdx);
47046
+ if (versionSectionIdx >= 0)
47047
+ compactOrder.push(versionSectionIdx);
47048
+ for (let j = activeIndices.length - 1; j >= 0; j--) {
47049
+ const idx = activeIndices[j];
47050
+ if (idx !== modelSectionIdx && idx !== versionSectionIdx) {
47051
+ compactOrder.push(idx);
47052
+ }
47053
+ }
47071
47054
  const calcTotalWidth = () => {
47072
47055
  let w = 1;
47073
- for (let j = 0; j < activeIndices.length; j++) {
47074
- const idx = activeIndices[j];
47056
+ let first2 = true;
47057
+ for (const idx of activeIndices) {
47058
+ if (isHidden[idx])
47059
+ continue;
47075
47060
  const sec = sections[idx];
47076
- if (j > 0)
47061
+ if (!first2)
47077
47062
  w += pipeW;
47063
+ first2 = false;
47078
47064
  w += isCompact[idx] ? sec.compactW : sec.expandedW;
47079
47065
  }
47080
47066
  return w;
47081
47067
  };
47082
47068
  let totalW = calcTotalWidth();
47083
- for (let j = activeIndices.length - 1; j >= 0 && totalW > termWidth; j--) {
47084
- const idx = activeIndices[j];
47069
+ for (const idx of compactOrder) {
47070
+ if (totalW <= termWidth)
47071
+ break;
47085
47072
  if (!isCompact[idx] && sections[idx].compactW < sections[idx].expandedW) {
47086
47073
  isCompact[idx] = true;
47087
47074
  totalW = calcTotalWidth();
47088
47075
  }
47089
47076
  }
47090
- for (let j = 0; j < activeIndices.length; j++) {
47091
- const idx = activeIndices[j];
47077
+ if (totalW > termWidth && versionSectionIdx >= 0 && !isHidden[versionSectionIdx]) {
47078
+ isHidden[versionSectionIdx] = true;
47079
+ totalW = calcTotalWidth();
47080
+ }
47081
+ for (const idx of activeIndices) {
47082
+ if (isHidden[idx])
47083
+ continue;
47092
47084
  if (isCompact[idx]) {
47093
47085
  const savings = sections[idx].expandedW - sections[idx].compactW;
47094
47086
  if (totalW + savings <= termWidth) {
@@ -47100,10 +47092,13 @@ var init_status_bar = __esm({
47100
47092
  }
47101
47093
  }
47102
47094
  let result = " ";
47103
- for (let j = 0; j < activeIndices.length; j++) {
47104
- const idx = activeIndices[j];
47105
- if (j > 0)
47095
+ let first = true;
47096
+ for (const idx of activeIndices) {
47097
+ if (isHidden[idx])
47098
+ continue;
47099
+ if (!first)
47106
47100
  result += pipe;
47101
+ first = false;
47107
47102
  result += isCompact[idx] ? sections[idx].compact : sections[idx].expanded;
47108
47103
  }
47109
47104
  return result;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.103.88",
3
+ "version": "0.103.90",
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",