open-agents-ai 0.187.228 → 0.187.229

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 +58 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -5867,8 +5867,10 @@ function _voiceEnsureWhisper() {
5867
5867
  _whisperPending = '';
5868
5868
  _whisperProc.stdout.on('data', function(chunk) {
5869
5869
  _whisperPending += chunk.toString('utf8');
5870
- var lines = _whisperPending.split('
5871
- ');
5870
+ // DAEMON_SCRIPT is an outer template literal — any escape sequence
5871
+ // in code we want to appear literally in the generated file must
5872
+ // be double-escaped so the outer template doesn't consume it.
5873
+ var lines = _whisperPending.split('\\n');
5872
5874
  _whisperPending = lines.pop() || '';
5873
5875
  for (var li = 0; li < lines.length; li++) {
5874
5876
  var ln = lines[li].trim();
@@ -289588,6 +289590,14 @@ var init_status_bar = __esm({
289588
289590
  _contentScrollOffset = 0;
289589
289591
  // 0 = live (bottom), >0 = scrolled back
289590
289592
  _contentMaxLines = 1e4;
289593
+ // Partial-line accumulator for the buffered-write layer. Stream output
289594
+ // arrives in chunks (one per syntax-highlighted token) and a single
289595
+ // logical line can span many writes. If we naively push each chunk to
289596
+ // _contentLines, scroll-back replay fragments the line across rows and
289597
+ // "injects" extra newlines between pieces. Instead, everything up to the
289598
+ // last \n goes into _contentLines (as complete lines), and the trailing
289599
+ // partial stays in _inProgressLine until the next \n arrives.
289600
+ _inProgressLine = "";
289591
289601
  /** Auto-scroll to live when new content arrives (disabled when user scrolls back) */
289592
289602
  _autoScroll = true;
289593
289603
  /** Cached click region for the spacer button */
@@ -290778,8 +290788,15 @@ var init_status_bar = __esm({
290778
290788
  const fh = this._currentFooterHeight;
290779
290789
  const footerStart = termRows() - fh + 1;
290780
290790
  if (row >= footerStart) return;
290781
- if (type === "press" || type === "drag") {
290782
- this.disableMouseTracking();
290791
+ if (type === "press") {
290792
+ this._textSelection.onMousePress(row, col);
290793
+ this.repaintContent();
290794
+ } else if (type === "drag") {
290795
+ this._textSelection.onMouseDrag(row, col);
290796
+ this.repaintContent();
290797
+ } else if (type === "release") {
290798
+ this._textSelection.onMouseRelease(row, col);
290799
+ this.repaintContent();
290783
290800
  }
290784
290801
  }
290785
290802
  /** Copy current selection to clipboard. Returns true if copied. */
@@ -291121,11 +291138,21 @@ var init_status_bar = __esm({
291121
291138
  if (typeof chunk === "string") text = chunk;
291122
291139
  else if (Buffer.isBuffer(chunk)) text = chunk.toString();
291123
291140
  else text = String(chunk);
291124
- const lines = text.split("\n");
291125
291141
  if (self2._bufferContent && !isOverlayActive()) {
291126
- for (const line of lines) {
291127
- const visible = line.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "");
291128
- if (visible.trim().length > 0) self2.bufferContentLine(line);
291142
+ const combined = self2._inProgressLine + text;
291143
+ const lastNl = combined.lastIndexOf("\n");
291144
+ if (lastNl < 0) {
291145
+ self2._inProgressLine = combined;
291146
+ } else {
291147
+ const completed = combined.slice(0, lastNl);
291148
+ self2._inProgressLine = combined.slice(lastNl + 1);
291149
+ const completeLines = completed.split("\n");
291150
+ for (const line of completeLines) {
291151
+ const visible = line.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "");
291152
+ if (line.length === 0 || visible.length > 0) {
291153
+ self2.bufferContentLine(line);
291154
+ }
291155
+ }
291129
291156
  }
291130
291157
  }
291131
291158
  if (typeof chunk === "string") {
@@ -291158,6 +291185,11 @@ ${CONTENT_BG_SEQ}`);
291158
291185
  if (!this.active) return;
291159
291186
  this.writeDepth = Math.max(0, this.writeDepth - 1);
291160
291187
  if (this.writeDepth === 0) {
291188
+ if (this._inProgressLine.length > 0) {
291189
+ const visible = this._inProgressLine.replace(/\x1B\[[0-9;]*[A-Za-z]/g, "");
291190
+ if (visible.length > 0) this.bufferContentLine(this._inProgressLine);
291191
+ this._inProgressLine = "";
291192
+ }
291161
291193
  this._bufferContent = false;
291162
291194
  if (this._origWrite) {
291163
291195
  try {
@@ -291314,12 +291346,19 @@ ${CONTENT_BG_SEQ}`);
291314
291346
  let buf = "\x1B[?2026h";
291315
291347
  buf += "\x1B7";
291316
291348
  buf += "\x1B[?25l";
291349
+ const selRanges = this._textSelection.hasSelection ? this._textSelection.getSelectedRanges() : [];
291350
+ const selByBufferIdx = /* @__PURE__ */ new Map();
291351
+ for (const r2 of selRanges) selByBufferIdx.set(r2.bufferIdx, { startCol: r2.startCol, endCol: r2.endCol });
291317
291352
  for (let row = 0; row < h; row++) {
291318
291353
  const lineIdx = startIdx + row;
291319
291354
  let line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
291320
291355
  const screenRow = this.scrollRegionTop + row;
291321
291356
  if (screenRow < headerSafeFloor) continue;
291322
291357
  line = line.replace(/\x1B\[0m/g, `\x1B[0m${CONTENT_BG_SEQ}`);
291358
+ const sel = selByBufferIdx.get(lineIdx);
291359
+ if (sel) {
291360
+ line = TextSelection.applyHighlight(line, sel.startCol, sel.endCol);
291361
+ }
291323
291362
  buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
291324
291363
  }
291325
291364
  const L = layout();
@@ -329157,7 +329196,17 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
329157
329196
  statusBar.setNexusStatus("disconnected");
329158
329197
  }
329159
329198
  };
329160
- _tryNexusConnect(1);
329199
+ _tryNexusConnect(1).catch((err) => {
329200
+ try {
329201
+ statusBar.setNexusStatus("disconnected");
329202
+ } catch {
329203
+ }
329204
+ try {
329205
+ const msg = err?.message || String(err);
329206
+ writeContent(() => renderWarning(`Nexus startup: ${msg.slice(0, 160)}`));
329207
+ } catch {
329208
+ }
329209
+ });
329161
329210
  } catch {
329162
329211
  }
329163
329212
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.187.228",
3
+ "version": "0.187.229",
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",