open-agents-ai 0.187.107 → 0.187.108

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 +85 -44
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -271407,7 +271407,7 @@ function layout() {
271407
271407
  const footerBoxBottom = footerMetrics - 1;
271408
271408
  const footerBoxTop = rows - fh + 1;
271409
271409
  const footerInput = footerBoxTop + 1;
271410
- const contentBottom = footerBoxTop - 1;
271410
+ const contentBottom = footerBoxTop - 1 - CONTENT_SPACER_ROWS;
271411
271411
  const contentHeight = Math.max(1, contentBottom - contentTop + 1);
271412
271412
  return {
271413
271413
  rows,
@@ -271447,12 +271447,13 @@ function termRows() {
271447
271447
  function termCols() {
271448
271448
  return _termCols;
271449
271449
  }
271450
- var HEADER_ROWS, FOOTER_MIN_ROWS, _termRows, _termCols, _footerHeight, _headerHeight;
271450
+ var HEADER_ROWS, FOOTER_MIN_ROWS, CONTENT_SPACER_ROWS, _termRows, _termCols, _footerHeight, _headerHeight;
271451
271451
  var init_layout2 = __esm({
271452
271452
  "packages/cli/dist/tui/layout.js"() {
271453
271453
  "use strict";
271454
271454
  HEADER_ROWS = 3;
271455
271455
  FOOTER_MIN_ROWS = 4;
271456
+ CONTENT_SPACER_ROWS = 1;
271456
271457
  _termRows = 24;
271457
271458
  _termCols = 80;
271458
271459
  _footerHeight = FOOTER_MIN_ROWS;
@@ -280181,7 +280182,9 @@ var init_status_bar = __esm({
280181
280182
  });
280182
280183
  if (this.active) {
280183
280184
  this.applyScrollRegion();
280185
+ this._rebuildHeaderPanels?.();
280184
280186
  this.renderFooterAndPositionInput();
280187
+ this.refreshHeaderContent();
280185
280188
  }
280186
280189
  }
280187
280190
  /** Remove a sub-agent view */
@@ -280191,7 +280194,9 @@ var init_status_bar = __esm({
280191
280194
  this.switchToView("main");
280192
280195
  if (this.active) {
280193
280196
  this.applyScrollRegion();
280197
+ this._rebuildHeaderPanels?.();
280194
280198
  this.renderFooterAndPositionInput();
280199
+ this.refreshHeaderContent();
280195
280200
  }
280196
280201
  }
280197
280202
  /** Update a sub-agent's status */
@@ -281117,6 +281122,10 @@ ${CONTENT_BG_SEQ}`);
281117
281122
  let buf = "\x1B[?7l";
281118
281123
  const boxInner = w - 2;
281119
281124
  buf += `\x1B[${pos.inputStartRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_TL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_TR}${RESET}`;
281125
+ const spacerRow = pos.inputStartRow - 1;
281126
+ if (spacerRow >= this.scrollRegionTop) {
281127
+ buf += `\x1B[${spacerRow};1H${PANEL_BG_SEQ}\x1B[2K${RESET}`;
281128
+ }
281120
281129
  for (let i2 = 0; i2 < inputWrap.lines.length; i2++) {
281121
281130
  const row = pos.inputStartRow + 1 + i2;
281122
281131
  const prefix = i2 === 0 ? this.promptText : " ".repeat(this.promptWidth);
@@ -281147,7 +281156,10 @@ ${CONTENT_BG_SEQ}`);
281147
281156
  buf += `\x1B[${pos.bufferRow};1H${PANEL_BG_SEQ}\x1B[2K${BOX_FG}${BOX_BL}${BOX_H.repeat(Math.max(0, boxInner))}${BOX_BR}${RESET}`;
281148
281157
  }
281149
281158
  buf += `\x1B[${pos.metricsRow};1H${PANEL_BG_SEQ}\x1B[2K${this.buildMetricsLine()}${RESET}`;
281150
- buf += `\x1B[?7h\x1B[${cursorTermRow};${inputWrap.cursorCol}H\x1B[?25h`;
281159
+ buf += "\x1B[?7h";
281160
+ if (this.writeDepth === 0) {
281161
+ buf += `\x1B[${cursorTermRow};${inputWrap.cursorCol}H\x1B[?25h`;
281162
+ }
281151
281163
  this.termWrite(buf);
281152
281164
  }
281153
281165
  /**
@@ -298126,6 +298138,8 @@ var init_stream_renderer = __esm({
298126
298138
  startTime = 0;
298127
298139
  /** Track if we're mid-tool-arg display */
298128
298140
  inToolArgs = false;
298141
+ /** Whether to show full thinking content instead of a compact indicator */
298142
+ showThinking = false;
298129
298143
  /** Optional callback to capture rendered lines for scrollback buffer */
298130
298144
  onRenderedLine = null;
298131
298145
  /**
@@ -298162,21 +298176,30 @@ var init_stream_renderer = __esm({
298162
298176
  this.tokenCount++;
298163
298177
  if (kind === "thinking") {
298164
298178
  this.thinkingTokenCount++;
298165
- if (!this.thinkingIndicatorShown) {
298166
- this.thinkingIndicatorShown = true;
298167
- this.writeRaw(dimText(" \u23BF ") + dimItalic("thinking...") + "\n");
298168
- this.lineStarted = false;
298169
- }
298170
- if (this.thinkingTokenCount % 50 === 0) {
298171
- this.writeRaw(`\x1B[1A\x1B[49m\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thinking... (${this.thinkingTokenCount} tokens)`)}
298172
- `);
298179
+ if (this.showThinking) {
298180
+ for (const char of token) {
298181
+ this.lineBuffer += char;
298182
+ if (char === "\n")
298183
+ this.flushLine("thinking");
298184
+ }
298185
+ this.scheduleFlush("thinking");
298186
+ return;
298187
+ } else {
298188
+ if (!this.thinkingIndicatorShown) {
298189
+ this.thinkingIndicatorShown = true;
298190
+ this.writeRaw(dimText(" \u23BF ") + dimItalic("thinking...") + "\n");
298191
+ this.lineStarted = false;
298192
+ }
298193
+ if (this.thinkingTokenCount % 50 === 0) {
298194
+ this.writeRaw(dimText(" \u23BF ") + dimItalic(`thinking... (${this.thinkingTokenCount} tokens)`) + "\n");
298195
+ this.lineStarted = false;
298196
+ }
298197
+ return;
298173
298198
  }
298174
- return;
298175
298199
  }
298176
298200
  if (this.thinkingIndicatorShown && kind === "content") {
298177
298201
  this.thinkingIndicatorShown = false;
298178
- this.writeRaw(`\x1B[1A\x1B[49m\x1B[2K${dimText(" \u23BF ")}${dimItalic(`thought for ${this.thinkingTokenCount} tokens`)}
298179
- `);
298202
+ this.writeRaw(dimText(" \u23BF ") + dimItalic(`thought for ${this.thinkingTokenCount} tokens`) + "\n");
298180
298203
  this.thinkingTokenCount = 0;
298181
298204
  this.lineStarted = false;
298182
298205
  }
@@ -298237,17 +298260,15 @@ var init_stream_renderer = __esm({
298237
298260
  if (line.includes("<think>")) {
298238
298261
  this.inThinkBlock = true;
298239
298262
  const after = line.replace(/<think>/g, "");
298240
- if (after.trim()) {
298241
- this.writeHighlighted(after, "thinking");
298242
- }
298263
+ if (after.trim())
298264
+ this.writeHighlighted(after, this.showThinking ? "thinking" : "content");
298243
298265
  return;
298244
298266
  }
298245
298267
  if (line.includes("</think>")) {
298246
298268
  this.inThinkBlock = false;
298247
298269
  const after = line.replace(/<\/think>/g, "");
298248
- if (after.trim()) {
298270
+ if (after.trim())
298249
298271
  this.writeHighlighted(after, "content");
298250
- }
298251
298272
  return;
298252
298273
  }
298253
298274
  const trimmedLine = line.replace(/\n$/, "");
@@ -298303,40 +298324,52 @@ var init_stream_renderer = __esm({
298303
298324
  case "tool_args":
298304
298325
  rendered = this.highlightJson(raw, true);
298305
298326
  break;
298306
- case "content": {
298307
- const maxW = termCols() - 6;
298308
- if (this.inCodeBlock) {
298309
- const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
298310
- if (this.codeLang === "diff" || this.codeLang === "patch") {
298311
- rendered = this.highlightDiff(cropped);
298312
- } else if (this.codeLang === "bash" || this.codeLang === "sh" || this.codeLang === "shell" || this.codeLang === "zsh") {
298313
- rendered = this.highlightShell(cropped);
298327
+ case "content":
298328
+ {
298329
+ const maxW = termCols() - 6;
298330
+ if (this.inCodeBlock) {
298331
+ const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
298332
+ if (this.codeLang === "diff" || this.codeLang === "patch") {
298333
+ rendered = this.highlightDiff(cropped);
298334
+ } else if (this.codeLang === "bash" || this.codeLang === "sh" || this.codeLang === "shell" || this.codeLang === "zsh") {
298335
+ rendered = this.highlightShell(cropped);
298336
+ } else {
298337
+ rendered = this.highlightCode(cropped);
298338
+ }
298339
+ } else if (this.looksLikeJson(raw)) {
298340
+ const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
298341
+ rendered = this.highlightJson(cropped, false);
298314
298342
  } else {
298315
- rendered = this.highlightCode(cropped);
298316
- }
298317
- } else if (this.looksLikeJson(raw)) {
298318
- const cropped = raw.length > maxW ? raw.slice(0, maxW - 3) + "..." : raw;
298319
- rendered = this.highlightJson(cropped, false);
298320
- } else {
298321
- if (hasNewline && raw.length > maxW) {
298322
- const wrapped = this.wordWrap(raw, maxW);
298323
- for (let i2 = 0; i2 < wrapped.length; i2++) {
298324
- const lp = i2 === 0 ? prefix : " ";
298325
- const isLast = i2 === wrapped.length - 1;
298326
- this.writeRaw(dimText(lp) + this.highlightMarkdown(wrapped[i2]) + (isLast ? "\n" : "\n"));
298343
+ if (hasNewline && raw.length > maxW) {
298344
+ const wrapped = this.wordWrap(raw, maxW);
298345
+ for (let i2 = 0; i2 < wrapped.length; i2++) {
298346
+ const lp = i2 === 0 ? prefix : " ";
298347
+ const isLast = i2 === wrapped.length - 1;
298348
+ this.writeRaw(dimText(lp) + this.highlightMarkdown(wrapped[i2]) + (isLast ? "\n" : "\n"));
298349
+ }
298350
+ this.lineStarted = false;
298351
+ return;
298327
298352
  }
298328
- this.lineStarted = false;
298329
- return;
298353
+ const cropped = raw.length > maxW ? raw.slice(0, maxW) : raw;
298354
+ rendered = this.highlightMarkdown(cropped);
298330
298355
  }
298331
- const cropped = raw.length > maxW ? raw.slice(0, maxW) : raw;
298332
- rendered = this.highlightMarkdown(cropped);
298356
+ break;
298333
298357
  }
298334
298358
  break;
298335
- }
298359
+ case "thinking":
298360
+ rendered = dimItalic(raw);
298361
+ break;
298336
298362
  }
298337
298363
  this.writeRaw(dimText(prefix) + rendered + (hasNewline ? "\n" : ""));
298338
298364
  this.lineStarted = !hasNewline;
298339
298365
  }
298366
+ /** Toggle visibility of full thinking content */
298367
+ setThinkingVisible(visible) {
298368
+ this.showThinking = visible;
298369
+ }
298370
+ getThinkingVisible() {
298371
+ return this.showThinking;
298372
+ }
298340
298373
  /** Write raw ANSI text to stdout and capture for scrollback.
298341
298374
  * Wraps each write in autowrap-disable (DECAWM off) to prevent the terminal
298342
298375
  * from injecting line breaks when a token fragment reaches the right edge. */
@@ -310398,6 +310431,14 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
310398
310431
  passwordShowPlain = !passwordShowPlain;
310399
310432
  if (statusBar.isActive)
310400
310433
  statusBar.handleResize();
310434
+ } else {
310435
+ const current = streamRenderer.getThinkingVisible?.() ?? false;
310436
+ streamRenderer.setThinkingVisible?.(!current);
310437
+ if (statusBar.isActive && !statusBar.isStreaming) {
310438
+ statusBar.beginContentWrite();
310439
+ renderInfo(`Thinking visibility: ${!current ? "shown" : "hidden"}`);
310440
+ statusBar.endContentWrite();
310441
+ }
310401
310442
  }
310402
310443
  });
310403
310444
  let commandCtxRef = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.107",
3
+ "version": "0.187.108",
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",