open-agents-ai 0.140.3 → 0.140.4

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 +61 -9
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38052,7 +38052,7 @@ function tuiSelect(opts) {
38052
38052
  }
38053
38053
  stdin.resume();
38054
38054
  enterOverlay();
38055
- overlayWrite("\x1B[?1049h\x1B[48;5;234m\x1B[2J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
38055
+ overlayWrite("\x1B[?1049h\x1B[48;5;234m\x1B[2J\x1B[H\x1B[?25l\x1B[?1003h\x1B[?1006h");
38056
38056
  let listRowOffset = 0;
38057
38057
  function clampScroll(displayList) {
38058
38058
  const cursorPos = displayList.indexOf(cursor);
@@ -38155,7 +38155,7 @@ function tuiSelect(opts) {
38155
38155
  function cleanup() {
38156
38156
  stdin.removeListener("data", onData);
38157
38157
  process.stdout.removeListener("resize", onResize);
38158
- overlayWrite("\x1B[?1002l\x1B[?1006l\x1B[?1049l\x1B[?25h");
38158
+ overlayWrite("\x1B[?1003l\x1B[?1002l\x1B[?1006l\x1B[?1049l\x1B[?25h");
38159
38159
  leaveOverlay();
38160
38160
  if (typeof stdin.setRawMode === "function") {
38161
38161
  stdin.setRawMode(hadRawMode ?? false);
@@ -38169,12 +38169,16 @@ function tuiSelect(opts) {
38169
38169
  }
38170
38170
  }
38171
38171
  function onData(chunk) {
38172
- const seq = chunk.toString("utf8");
38173
- const mouseMatch = seq.match(/\x1B\[<(\d+);(\d+);(\d+)([Mm])/);
38174
- if (mouseMatch) {
38175
- const btn = parseInt(mouseMatch[1]);
38176
- const mRow = parseInt(mouseMatch[3]);
38177
- const suffix = mouseMatch[4];
38172
+ let seq = chunk.toString("utf8");
38173
+ const mouseRe = /\x1B\[<(\d+);(\d+);(\d+)([Mm])/g;
38174
+ let mouseProcessed = false;
38175
+ let mouseM;
38176
+ while ((mouseM = mouseRe.exec(seq)) !== null) {
38177
+ mouseProcessed = true;
38178
+ const btn = parseInt(mouseM[1]);
38179
+ const mCol = parseInt(mouseM[2]);
38180
+ const mRow = parseInt(mouseM[3]);
38181
+ const suffix = mouseM[4];
38178
38182
  if (btn === 0 && suffix === "M") {
38179
38183
  const listIdx = mRow - listRowOffset - 1;
38180
38184
  if (listIdx >= 0 && listIdx < maxVisible) {
@@ -38213,8 +38217,56 @@ function tuiSelect(opts) {
38213
38217
  }
38214
38218
  }
38215
38219
  }
38216
- return;
38220
+ if ((btn === 35 || btn === 32 || btn === 67) && suffix === "M") {
38221
+ const listIdx = mRow - listRowOffset - 1;
38222
+ if (listIdx >= 0 && listIdx < maxVisible) {
38223
+ let displayList;
38224
+ if (filter) {
38225
+ displayList = [];
38226
+ for (let i = 0; i < items.length; i++) {
38227
+ if (matchSet.has(i) || isSkippable(i))
38228
+ displayList.push(i);
38229
+ }
38230
+ displayList = displayList.filter((idx, pos) => {
38231
+ if (!isSkippable(idx))
38232
+ return true;
38233
+ for (let j = pos + 1; j < displayList.length; j++) {
38234
+ if (!isSkippable(displayList[j]))
38235
+ return true;
38236
+ break;
38237
+ }
38238
+ return false;
38239
+ });
38240
+ } else {
38241
+ displayList = items.map((_, i) => i);
38242
+ }
38243
+ const vi = scrollOffset + listIdx;
38244
+ if (vi < displayList.length) {
38245
+ const itemIdx = displayList[vi];
38246
+ if (!isSkippable(itemIdx) && itemIdx !== cursor) {
38247
+ cursor = itemIdx;
38248
+ render();
38249
+ }
38250
+ }
38251
+ }
38252
+ }
38253
+ if (btn === 64) {
38254
+ const next = findSelectable(cursor - 1, -1);
38255
+ if (next >= 0 && next !== cursor) {
38256
+ cursor = next;
38257
+ render();
38258
+ }
38259
+ } else if (btn === 65) {
38260
+ const next = findSelectable(cursor + 1, 1);
38261
+ if (next >= 0 && next !== cursor) {
38262
+ cursor = next;
38263
+ render();
38264
+ }
38265
+ }
38217
38266
  }
38267
+ seq = seq.replace(mouseRe, "");
38268
+ if (!seq && mouseProcessed)
38269
+ return;
38218
38270
  if (deleteConfirmIdx >= 0) {
38219
38271
  if (seq === "\x1B[D") {
38220
38272
  deleteConfirmSel = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.140.3",
3
+ "version": "0.140.4",
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",