open-agents-ai 0.138.44 → 0.138.46

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 +30 -10
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -51435,7 +51435,7 @@ var init_status_bar = __esm({
51435
51435
  } else {
51436
51436
  this.applyScrollRegion();
51437
51437
  let clearBuf = "\x1B[?7l";
51438
- for (let row = clearStart; row <= rows; row++) {
51438
+ for (let row = pos.scrollEnd + 1; row <= rows; row++) {
51439
51439
  clearBuf += `\x1B[${row};1H\x1B[2K`;
51440
51440
  }
51441
51441
  clearBuf += "\x1B[?7h";
@@ -51586,7 +51586,7 @@ ${CONTENT_BG_SEQ}`);
51586
51586
  const lineIdx = startIdx + row;
51587
51587
  const line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
51588
51588
  const screenRow = this.scrollRegionTop + row;
51589
- buf += `\x1B[${screenRow};1H\x1B[2K${line}`;
51589
+ buf += `\x1B[${screenRow};1H${CONTENT_BG_SEQ}\x1B[2K${line}`;
51590
51590
  }
51591
51591
  if (this._contentScrollOffset > 0) {
51592
51592
  const linesAbove = startIdx;
@@ -52228,6 +52228,11 @@ ${CONTENT_BG_SEQ}`);
52228
52228
  rl._ttyWrite = function(s, key) {
52229
52229
  if (!self.active)
52230
52230
  return origTtyWrite(s, key);
52231
+ if (key?.name === "backspace" && self.inputStateProvider) {
52232
+ const { cursor } = self.inputStateProvider();
52233
+ if (cursor <= 0)
52234
+ return;
52235
+ }
52231
52236
  if (s && (/\x1B\[</.test(s) || /^\d+;\d+;\d*[Mm]/.test(s) || /^;\d+[Mm]/.test(s) || /\[<\d/.test(s))) {
52232
52237
  return;
52233
52238
  }
@@ -52380,10 +52385,11 @@ var init_mouse_filter = __esm({
52380
52385
  const mouseMatch = remaining.match(/^\x1B\[<(\d+);(\d+);(\d+)([Mm])/);
52381
52386
  if (mouseMatch) {
52382
52387
  const btn = parseInt(mouseMatch[1]);
52388
+ const row = parseInt(mouseMatch[3]);
52383
52389
  if (btn === 64 && this.onScroll)
52384
- this.onScroll("up", 3);
52390
+ this.onScroll("up", 3, row);
52385
52391
  else if (btn === 65 && this.onScroll)
52386
- this.onScroll("down", 3);
52392
+ this.onScroll("down", 3, row);
52387
52393
  i += mouseMatch[0].length;
52388
52394
  continue;
52389
52395
  }
@@ -53601,7 +53607,7 @@ async function startInteractive(config, repoPath) {
53601
53607
  initOaDirectory(repoRoot);
53602
53608
  const savedSettings = resolveSettings(repoRoot);
53603
53609
  if (process.stdout.isTTY) {
53604
- process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[48;5;233m\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
53610
+ process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[48;5;233m\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
53605
53611
  const restoreScreen = () => {
53606
53612
  process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l");
53607
53613
  };
@@ -54059,11 +54065,22 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
54059
54065
  } catch {
54060
54066
  }
54061
54067
  const { MouseFilterStream: MouseFilterStream2 } = await Promise.resolve().then(() => (init_mouse_filter(), mouse_filter_exports));
54062
- const mouseFilter = new MouseFilterStream2((direction, lines) => {
54063
- if (direction === "up")
54064
- statusBar.scrollContentUp(lines);
54065
- else
54066
- statusBar.scrollContentDown(lines);
54068
+ const mouseFilter = new MouseFilterStream2((direction, lines, row) => {
54069
+ const rows = process.stdout.rows ?? 24;
54070
+ const fh = statusBar._currentFooterHeight ?? 3;
54071
+ const footerStart = rows - fh + 1;
54072
+ if (row >= footerStart) {
54073
+ if (direction === "up") {
54074
+ rl._ttyWrite?.("\x1B[A", { name: "up" });
54075
+ } else {
54076
+ rl._ttyWrite?.("\x1B[B", { name: "down" });
54077
+ }
54078
+ } else {
54079
+ if (direction === "up")
54080
+ statusBar.scrollContentUp(lines);
54081
+ else
54082
+ statusBar.scrollContentDown(lines);
54083
+ }
54067
54084
  });
54068
54085
  process.stdin.pipe(mouseFilter);
54069
54086
  const rl = readline2.createInterface({
@@ -54080,6 +54097,9 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
54080
54097
  _escapeHandler?.();
54081
54098
  });
54082
54099
  rl.output = null;
54100
+ if (process.stdin.isTTY && typeof process.stdin.setRawMode === "function") {
54101
+ process.stdin.setRawMode(true);
54102
+ }
54083
54103
  function persistHistoryLine(line) {
54084
54104
  if (!line.trim())
54085
54105
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.44",
3
+ "version": "0.138.46",
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",