open-agents-ai 0.138.14 → 0.138.15
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.
- package/dist/index.js +94 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51331,9 +51331,7 @@ var init_status_bar = __esm({
|
|
|
51331
51331
|
const pos = this.rowPositions(rows);
|
|
51332
51332
|
const w = getTermWidth();
|
|
51333
51333
|
const sep = `\x1B[38;5;236m${"\u2500".repeat(w)}\x1B[0m`;
|
|
51334
|
-
const
|
|
51335
|
-
const wrapOverhead = Math.max(0, this._currentFooterHeight * (wrapFactor - 1));
|
|
51336
|
-
const clearStart = Math.max(1, pos.bufferRow - wrapOverhead);
|
|
51334
|
+
const clearStart = Math.max(this.scrollRegionTop + 1, pos.scrollEnd + 1);
|
|
51337
51335
|
if (this.writeDepth > 0) {
|
|
51338
51336
|
const inputWrap = this.wrapInput(w);
|
|
51339
51337
|
let buf = `\x1B[${this.scrollRegionTop};${pos.scrollEnd}r\x1B[?25l\x1B[?7l`;
|
|
@@ -52146,6 +52144,88 @@ var init_status_bar = __esm({
|
|
|
52146
52144
|
}
|
|
52147
52145
|
});
|
|
52148
52146
|
|
|
52147
|
+
// packages/cli/dist/tui/mouse-filter.js
|
|
52148
|
+
var mouse_filter_exports = {};
|
|
52149
|
+
__export(mouse_filter_exports, {
|
|
52150
|
+
MouseFilterStream: () => MouseFilterStream
|
|
52151
|
+
});
|
|
52152
|
+
import { Transform } from "node:stream";
|
|
52153
|
+
var MouseFilterStream;
|
|
52154
|
+
var init_mouse_filter = __esm({
|
|
52155
|
+
"packages/cli/dist/tui/mouse-filter.js"() {
|
|
52156
|
+
"use strict";
|
|
52157
|
+
MouseFilterStream = class extends Transform {
|
|
52158
|
+
buffer = "";
|
|
52159
|
+
onScroll = null;
|
|
52160
|
+
flushTimer = null;
|
|
52161
|
+
constructor(scrollHandler) {
|
|
52162
|
+
super();
|
|
52163
|
+
this.onScroll = scrollHandler;
|
|
52164
|
+
}
|
|
52165
|
+
_transform(chunk, _encoding, callback) {
|
|
52166
|
+
this.buffer += chunk.toString();
|
|
52167
|
+
this.processBuffer(callback);
|
|
52168
|
+
}
|
|
52169
|
+
processBuffer(callback) {
|
|
52170
|
+
let output = "";
|
|
52171
|
+
let i = 0;
|
|
52172
|
+
while (i < this.buffer.length) {
|
|
52173
|
+
if (this.buffer[i] === "\x1B") {
|
|
52174
|
+
const remaining = this.buffer.slice(i);
|
|
52175
|
+
const mouseMatch = remaining.match(/^\x1B\[<(\d+);(\d+);(\d+)([Mm])/);
|
|
52176
|
+
if (mouseMatch) {
|
|
52177
|
+
const btn = parseInt(mouseMatch[1]);
|
|
52178
|
+
if (btn === 64 && this.onScroll)
|
|
52179
|
+
this.onScroll("up", 3);
|
|
52180
|
+
else if (btn === 65 && this.onScroll)
|
|
52181
|
+
this.onScroll("down", 3);
|
|
52182
|
+
i += mouseMatch[0].length;
|
|
52183
|
+
continue;
|
|
52184
|
+
}
|
|
52185
|
+
if (remaining.startsWith("\x1B[<") && remaining.length < 15) {
|
|
52186
|
+
break;
|
|
52187
|
+
}
|
|
52188
|
+
if (remaining.startsWith("\x1B[") && remaining.length === 2) {
|
|
52189
|
+
break;
|
|
52190
|
+
}
|
|
52191
|
+
if (remaining.length === 1) {
|
|
52192
|
+
break;
|
|
52193
|
+
}
|
|
52194
|
+
}
|
|
52195
|
+
output += this.buffer[i];
|
|
52196
|
+
i++;
|
|
52197
|
+
}
|
|
52198
|
+
this.buffer = this.buffer.slice(i);
|
|
52199
|
+
if (output.length > 0) {
|
|
52200
|
+
this.push(output);
|
|
52201
|
+
}
|
|
52202
|
+
if (this.buffer.length > 0) {
|
|
52203
|
+
if (this.flushTimer)
|
|
52204
|
+
clearTimeout(this.flushTimer);
|
|
52205
|
+
this.flushTimer = setTimeout(() => {
|
|
52206
|
+
if (this.buffer.length > 0) {
|
|
52207
|
+
this.push(this.buffer);
|
|
52208
|
+
this.buffer = "";
|
|
52209
|
+
}
|
|
52210
|
+
}, 50);
|
|
52211
|
+
}
|
|
52212
|
+
callback();
|
|
52213
|
+
}
|
|
52214
|
+
_flush(callback) {
|
|
52215
|
+
if (this.flushTimer) {
|
|
52216
|
+
clearTimeout(this.flushTimer);
|
|
52217
|
+
this.flushTimer = null;
|
|
52218
|
+
}
|
|
52219
|
+
if (this.buffer.length > 0) {
|
|
52220
|
+
this.push(this.buffer);
|
|
52221
|
+
this.buffer = "";
|
|
52222
|
+
}
|
|
52223
|
+
callback();
|
|
52224
|
+
}
|
|
52225
|
+
};
|
|
52226
|
+
}
|
|
52227
|
+
});
|
|
52228
|
+
|
|
52149
52229
|
// packages/cli/dist/tui/interactive.js
|
|
52150
52230
|
import * as readline2 from "node:readline";
|
|
52151
52231
|
import { Writable } from "node:stream";
|
|
@@ -53314,7 +53394,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53314
53394
|
initOaDirectory(repoRoot);
|
|
53315
53395
|
const savedSettings = resolveSettings(repoRoot);
|
|
53316
53396
|
if (process.stdout.isTTY) {
|
|
53317
|
-
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53397
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l\x1B[?1002h\x1B[?1006h");
|
|
53318
53398
|
const restoreScreen = () => {
|
|
53319
53399
|
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l");
|
|
53320
53400
|
};
|
|
@@ -53742,8 +53822,17 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
53742
53822
|
}
|
|
53743
53823
|
} catch {
|
|
53744
53824
|
}
|
|
53825
|
+
const { MouseFilterStream: MouseFilterStream2 } = await Promise.resolve().then(() => (init_mouse_filter(), mouse_filter_exports));
|
|
53826
|
+
const mouseFilter = new MouseFilterStream2((direction, lines) => {
|
|
53827
|
+
if (direction === "up")
|
|
53828
|
+
statusBar.scrollContentUp(lines);
|
|
53829
|
+
else
|
|
53830
|
+
statusBar.scrollContentDown(lines);
|
|
53831
|
+
});
|
|
53832
|
+
process.stdin.pipe(mouseFilter);
|
|
53745
53833
|
const rl = readline2.createInterface({
|
|
53746
|
-
input:
|
|
53834
|
+
input: mouseFilter,
|
|
53835
|
+
// filtered stream, NOT raw stdin
|
|
53747
53836
|
output: process.stdout,
|
|
53748
53837
|
prompt: idlePrompt,
|
|
53749
53838
|
terminal: true,
|
package/package.json
CHANGED