open-agents-ai 0.187.108 → 0.187.109

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 -7
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -279168,13 +279168,23 @@ var init_status_bar = __esm({
279168
279168
  });
279169
279169
  }
279170
279170
  const sysItems = [];
279171
+ const trunc3 = (s2) => {
279172
+ const parts = s2.trim().split(/\s+/).slice(0, 3);
279173
+ return parts.join(" ");
279174
+ };
279175
+ if (this._activeViewId !== "main") {
279176
+ const mainLabel = ` \u21A9 main `;
279177
+ const mainColored = `\x1B[38;5;110m${mainLabel}\x1B[0m`;
279178
+ sysItems.push({ render: () => mainColored + " ", w: mainLabel.length + 1 });
279179
+ }
279171
279180
  if (this._agentViews.size > 1) {
279172
279181
  for (const view of this._agentViews.values()) {
279173
279182
  if (view.id === "main" && this._activeViewId === "main")
279174
279183
  continue;
279175
279184
  const icon = view.status === "running" ? "\u25CF" : view.status === "completed" ? "\u2713" : view.status === "failed" ? "\u2717" : "\u25CB";
279176
- const label = ` ${view.label} ${icon} `;
279177
- sysItems.push({ render: () => renderBtn(`view:${view.id}`, label) + " ", w: label.length + 1 });
279185
+ const base3 = ` ${trunc3(view.label)} ${icon} `;
279186
+ const colored = view.id === this._activeViewId ? `\x1B[1;38;5;219m${base3}\x1B[0m` : `\x1B[38;5;213m${base3}\x1B[0m`;
279187
+ sysItems.push({ render: () => renderBtn(`view:${view.id}`, colored) + " ", w: base3.length + 1 });
279178
279188
  }
279179
279189
  } else {
279180
279190
  sysItems.push({ render: () => `\x1B[38;5;${TEXT_DIM}m no sub-agents `, w: 14 });
@@ -279237,7 +279247,55 @@ var init_status_bar = __esm({
279237
279247
  const panel = this._headerPanels[this._headerPanelIndex];
279238
279248
  if (!panel)
279239
279249
  return;
279240
- const content = panel.render(innerW);
279250
+ let content = panel.render(innerW);
279251
+ this._sysClickZones = [];
279252
+ if (String(this.currentHeaderPanel).startsWith("sys-")) {
279253
+ const zones = [];
279254
+ const trunc3 = (s2) => s2.trim().split(/\s+/).slice(0, 3).join(" ");
279255
+ if (this._activeViewId !== "main") {
279256
+ const mainLabel = ` \u21A9 main `;
279257
+ zones.push({ w: mainLabel.length + 1, id: "main", render: () => "" });
279258
+ }
279259
+ if (this._agentViews.size > 1) {
279260
+ for (const view of this._agentViews.values()) {
279261
+ if (view.id === "main" && this._activeViewId === "main")
279262
+ continue;
279263
+ const icon = view.status === "running" ? "\u25CF" : view.status === "completed" ? "\u2713" : view.status === "failed" ? "\u2717" : "\u25CB";
279264
+ const base3 = ` ${trunc3(view.label)} ${icon} `;
279265
+ zones.push({ w: base3.length + 1, id: view.id, render: () => "" });
279266
+ }
279267
+ } else {
279268
+ zones.push({ w: 14, render: () => "" });
279269
+ }
279270
+ zones.push({ w: 2, render: () => "" });
279271
+ const voiceLabel = this._voiceActive ? ` ${this._voiceModelId || "voice"} ` : " voice ";
279272
+ zones.push({ w: voiceLabel.length + 2, render: () => "" });
279273
+ zones.push({ w: 9, render: () => "" });
279274
+ let pages = [];
279275
+ let cur = [];
279276
+ let used = 0;
279277
+ for (const z16 of zones) {
279278
+ if (used + z16.w > innerW && cur.length > 0) {
279279
+ pages.push(cur);
279280
+ cur = [];
279281
+ used = 0;
279282
+ }
279283
+ cur.push(z16);
279284
+ used += z16.w;
279285
+ }
279286
+ if (cur.length > 0)
279287
+ pages.push(cur);
279288
+ const idx = parseInt(String(this.currentHeaderPanel).split("-")[1] || "0", 10) || 0;
279289
+ const page2 = pages[Math.max(0, Math.min(idx, pages.length - 1))] ?? [];
279290
+ let col = 4;
279291
+ const clickZones = [];
279292
+ for (const z16 of page2) {
279293
+ if (z16.id)
279294
+ clickZones.push({ start: col, end: col + z16.w - 2, id: z16.id });
279295
+ col += z16.w;
279296
+ }
279297
+ this._sysClickZones = clickZones;
279298
+ }
279241
279299
  const hasMultiple = this._headerPanels.length > 1;
279242
279300
  const leftArrow = hasMultiple ? `\x1B]8;;oa-cmd:header-prev\x07\x1B[38;5;${TEXT_DIM}m${this._headerPanelIndex > 0 ? "\u25C0" : " "}\x1B]8;;\x07` : " ";
279243
279301
  const rightArrow = hasMultiple ? `\x1B]8;;oa-cmd:header-next\x07\x1B[38;5;${TEXT_DIM}m${this._headerPanelIndex < this._headerPanels.length - 1 ? "\u25B6" : " "}\x1B]8;;\x07` : " ";
@@ -280095,6 +280153,22 @@ var init_status_bar = __esm({
280095
280153
  return;
280096
280154
  }
280097
280155
  if (row < this.scrollRegionTop) {
280156
+ const hdrRow = layout().headerContent;
280157
+ if (type === "press" && row === hdrRow && String(this.currentHeaderPanel).startsWith("sys-")) {
280158
+ const zones = this._sysClickZones ?? [];
280159
+ const hit = zones.find((z16) => col >= z16.start && col <= z16.end);
280160
+ if (hit) {
280161
+ this.switchToView(hit.id);
280162
+ if (hit.id !== "main") {
280163
+ this.beginContentWrite();
280164
+ process.stdout.write(`
280165
+ \x1B[38;5;245mpress Esc to return to primary interface\x1B[0m
280166
+ `);
280167
+ this.endContentWrite();
280168
+ }
280169
+ return;
280170
+ }
280171
+ }
280098
280172
  const cmd = hitTestHeaderButton(row, col, w);
280099
280173
  if (type === "press" && cmd) {
280100
280174
  if (cmd === "header-prev") {
@@ -280596,6 +280670,11 @@ ${CONTENT_BG_SEQ}`);
280596
280670
  line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
280597
280671
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
280598
280672
  }
280673
+ const L = layout();
280674
+ const spacerRow = L.footerBoxTop - 1;
280675
+ if (spacerRow >= this.scrollRegionTop && spacerRow < this.scrollRegionTop + h + 2) {
280676
+ buf += `\x1B[${spacerRow};1H${CONTENT_BG_SEQ}\x1B[2K`;
280677
+ }
280599
280678
  if (this._contentScrollOffset > 0) {
280600
280679
  const linesAbove = startIdx;
280601
280680
  const pct = totalLines > 0 ? Math.round((startIdx + h) / totalLines * 100) : 100;
@@ -280617,7 +280696,7 @@ ${CONTENT_BG_SEQ}`);
280617
280696
  if (!this.active)
280618
280697
  return;
280619
280698
  const L = layout();
280620
- this.termWrite(`\x1B[${L.footerInput};${this.promptWidth + 1}H\x1B[?25h`);
280699
+ this.termWrite(`\x1B[${L.footerInput};${this.promptWidth + 2}H\x1B[?25h`);
280621
280700
  }
280622
280701
  /** Strip ANSI escape codes to measure visible character width */
280623
280702
  static visWidth(s2) {
@@ -281068,7 +281147,8 @@ ${CONTENT_BG_SEQ}`);
281068
281147
  return {
281069
281148
  lines,
281070
281149
  cursorRow: cursorLineIdx,
281071
- cursorCol: this.promptWidth + cursorColInLine + 1
281150
+ // +2 accounts for the left box border (│ at col 1) and the column after it
281151
+ cursorCol: this.promptWidth + cursorColInLine + 2
281072
281152
  };
281073
281153
  }
281074
281154
  /** Set the DECSTBM scroll region to exclude the dynamic footer rows */
@@ -298170,12 +298250,15 @@ var init_stream_renderer = __esm({
298170
298250
  /** Track whether we've shown the thinking indicator */
298171
298251
  thinkingIndicatorShown = false;
298172
298252
  thinkingTokenCount = 0;
298253
+ thinkingCache = "";
298173
298254
  write(token, kind) {
298174
298255
  if (!this.enabled)
298175
298256
  return;
298176
298257
  this.tokenCount++;
298177
298258
  if (kind === "thinking") {
298178
298259
  this.thinkingTokenCount++;
298260
+ if (token)
298261
+ this.thinkingCache += token;
298179
298262
  if (this.showThinking) {
298180
298263
  for (const char of token) {
298181
298264
  this.lineBuffer += char;
@@ -298289,6 +298372,10 @@ var init_stream_renderer = __esm({
298289
298372
  const effectiveKind = this.inThinkBlock ? "thinking" : kind;
298290
298373
  this.writeHighlighted(line, effectiveKind);
298291
298374
  }
298375
+ /** Return accumulated thinking content so far */
298376
+ dumpThinkingCache() {
298377
+ return this.thinkingCache;
298378
+ }
298292
298379
  /**
298293
298380
  * Write a highlighted line/fragment to stdout.
298294
298381
  */
@@ -310434,9 +310521,25 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
310434
310521
  } else {
310435
310522
  const current = streamRenderer.getThinkingVisible?.() ?? false;
310436
310523
  streamRenderer.setThinkingVisible?.(!current);
310437
- if (statusBar.isActive && !statusBar.isStreaming) {
310524
+ if (statusBar.isActive) {
310438
310525
  statusBar.beginContentWrite();
310439
- renderInfo(`Thinking visibility: ${!current ? "shown" : "hidden"}`);
310526
+ if (!current) {
310527
+ const dump = streamRenderer.dumpThinkingCache?.() || "";
310528
+ if (dump.trim()) {
310529
+ process.stdout.write(`
310530
+ ${c3.dim(c3.italic("[expanded thinking]"))}
310531
+ `);
310532
+ for (const line of dump.split("\n")) {
310533
+ if (line.trim().length === 0)
310534
+ continue;
310535
+ process.stdout.write(" " + c3.dim(c3.italic(line)) + "\n");
310536
+ }
310537
+ } else {
310538
+ renderInfo("Thinking visibility: shown");
310539
+ }
310540
+ } else {
310541
+ renderInfo("Thinking visibility: hidden");
310542
+ }
310440
310543
  statusBar.endContentWrite();
310441
310544
  }
310442
310545
  }
@@ -313111,6 +313214,14 @@ ${c3.dim("(Use /quit to exit)")}
313111
313214
  showPrompt();
313112
313215
  });
313113
313216
  _escapeHandler = () => {
313217
+ if (!activeTask && statusBar.activeViewId !== "main") {
313218
+ statusBar.switchToView("main");
313219
+ statusBar.beginContentWrite();
313220
+ renderInfo("Returned to primary interface");
313221
+ statusBar.endContentWrite();
313222
+ showPrompt();
313223
+ return;
313224
+ }
313114
313225
  if (_recallText !== null) {
313115
313226
  const recalled = _recallText;
313116
313227
  _recallText = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.108",
3
+ "version": "0.187.109",
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",