open-agents-ai 0.138.11 → 0.138.13
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 +15 -62
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52088,74 +52088,38 @@ var init_status_bar = __esm({
|
|
|
52088
52088
|
* Must be called after readline is created.
|
|
52089
52089
|
*/
|
|
52090
52090
|
/**
|
|
52091
|
-
* Hook into readline to intercept
|
|
52092
|
-
*
|
|
52091
|
+
* Hook into readline to intercept Page Up/Down before readline uses them
|
|
52092
|
+
* for history navigation. Monkey-patches _ttyWrite — the only reliable
|
|
52093
|
+
* interception point in Node.js readline.
|
|
52093
52094
|
*
|
|
52094
|
-
*
|
|
52095
|
-
*
|
|
52096
|
-
*
|
|
52097
|
-
*
|
|
52098
|
-
* Mouse SGR sequences: \x1B[<N;X;YM / \x1B[<N;X;Ym
|
|
52099
|
-
* Readline splits these across multiple _ttyWrite calls, so we also
|
|
52100
|
-
* match partial fragments like ";25M" or "[<65;".
|
|
52095
|
+
* NO mouse reporting — SGR mouse sequences can't be reliably intercepted
|
|
52096
|
+
* before readline splits them into garbage text. Scroll wheel support
|
|
52097
|
+
* is keyboard-only (Page Up/Down, Shift+Up/Down).
|
|
52101
52098
|
*/
|
|
52102
52099
|
hookReadlineScroll(rl) {
|
|
52103
52100
|
if (!rl || !rl._ttyWrite)
|
|
52104
52101
|
return;
|
|
52105
52102
|
const self = this;
|
|
52106
52103
|
const origTtyWrite = rl._ttyWrite.bind(rl);
|
|
52107
|
-
let swallowingMouse = false;
|
|
52108
52104
|
rl._ttyWrite = function(s, key) {
|
|
52109
52105
|
if (!self.active)
|
|
52110
52106
|
return origTtyWrite(s, key);
|
|
52111
|
-
|
|
52112
|
-
const keySeq = key?.sequence || "";
|
|
52113
|
-
const fullMouse = /\x1B\[<(\d+);\d+;\d+[Mm]/.exec(seq) || /\x1B\[<(\d+);\d+;\d+[Mm]/.exec(keySeq);
|
|
52114
|
-
if (fullMouse) {
|
|
52115
|
-
const btn = parseInt(fullMouse[1]);
|
|
52116
|
-
if (btn === 64)
|
|
52117
|
-
self.scrollContentUp(3);
|
|
52118
|
-
else if (btn === 65)
|
|
52119
|
-
self.scrollContentDown(3);
|
|
52120
|
-
return;
|
|
52121
|
-
}
|
|
52122
|
-
if (seq.includes("\x1B[<") || seq.includes("[<")) {
|
|
52123
|
-
swallowingMouse = true;
|
|
52124
|
-
if (/[Mm]/.test(seq.slice(seq.indexOf("<")))) {
|
|
52125
|
-
const match = /(\d+)/.exec(seq.slice(seq.indexOf("<") + 1));
|
|
52126
|
-
if (match) {
|
|
52127
|
-
const btn = parseInt(match[1]);
|
|
52128
|
-
if (btn === 64)
|
|
52129
|
-
self.scrollContentUp(3);
|
|
52130
|
-
else if (btn === 65)
|
|
52131
|
-
self.scrollContentDown(3);
|
|
52132
|
-
}
|
|
52133
|
-
swallowingMouse = false;
|
|
52134
|
-
}
|
|
52135
|
-
return;
|
|
52136
|
-
}
|
|
52137
|
-
if (swallowingMouse) {
|
|
52138
|
-
if (/[Mm]/.test(seq)) {
|
|
52139
|
-
swallowingMouse = false;
|
|
52140
|
-
}
|
|
52141
|
-
return;
|
|
52142
|
-
}
|
|
52143
|
-
if (/^\d+;\d+;\d*[Mm]?$/.test(seq) || /^;\d+[Mm]$/.test(seq)) {
|
|
52107
|
+
if (s && (/\x1B\[</.test(s) || /^\d+;\d+;\d*[Mm]/.test(s) || /^;\d+[Mm]/.test(s) || /\[<\d/.test(s))) {
|
|
52144
52108
|
return;
|
|
52145
52109
|
}
|
|
52146
|
-
if (key?.name === "pageup" ||
|
|
52110
|
+
if (key?.name === "pageup" || s === "\x1B[5~") {
|
|
52147
52111
|
self.pageUpContent();
|
|
52148
52112
|
return;
|
|
52149
52113
|
}
|
|
52150
|
-
if (key?.name === "pagedown" ||
|
|
52114
|
+
if (key?.name === "pagedown" || s === "\x1B[6~") {
|
|
52151
52115
|
self.pageDownContent();
|
|
52152
52116
|
return;
|
|
52153
52117
|
}
|
|
52154
|
-
if (key?.shift && key?.name === "up" ||
|
|
52118
|
+
if (key?.shift && key?.name === "up" || s === "\x1B[1;2A") {
|
|
52155
52119
|
self.scrollContentUp(3);
|
|
52156
52120
|
return;
|
|
52157
52121
|
}
|
|
52158
|
-
if (key?.shift && key?.name === "down" ||
|
|
52122
|
+
if (key?.shift && key?.name === "down" || s === "\x1B[1;2B") {
|
|
52159
52123
|
self.scrollContentDown(3);
|
|
52160
52124
|
return;
|
|
52161
52125
|
}
|
|
@@ -53352,9 +53316,9 @@ async function startInteractive(config, repoPath) {
|
|
|
53352
53316
|
initOaDirectory(repoRoot);
|
|
53353
53317
|
const savedSettings = resolveSettings(repoRoot);
|
|
53354
53318
|
if (process.stdout.isTTY && !isResumed) {
|
|
53355
|
-
process.stdout.write("\x1B[?
|
|
53319
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53356
53320
|
const restoreScreen = () => {
|
|
53357
|
-
process.stdout.write("\x1B[?1006l\x1B[?
|
|
53321
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?25h\x1B[?1049l");
|
|
53358
53322
|
};
|
|
53359
53323
|
process.on("exit", restoreScreen);
|
|
53360
53324
|
process.on("SIGINT", () => {
|
|
@@ -53429,9 +53393,9 @@ async function startInteractive(config, repoPath) {
|
|
|
53429
53393
|
const version = getVersion3();
|
|
53430
53394
|
if (isResumed) {
|
|
53431
53395
|
if (process.stdout.isTTY) {
|
|
53432
|
-
process.stdout.write("\x1B[?
|
|
53396
|
+
process.stdout.write("\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1049h\x1B[2J\x1B[3J\x1B[H\x1B[?25l");
|
|
53433
53397
|
const restoreScreen = () => {
|
|
53434
|
-
process.stdout.write("\x1B[?
|
|
53398
|
+
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53435
53399
|
};
|
|
53436
53400
|
process.on("exit", restoreScreen);
|
|
53437
53401
|
process.on("SIGINT", () => {
|
|
@@ -54296,17 +54260,6 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54296
54260
|
cohereToggle() {
|
|
54297
54261
|
cohereEnabled = !cohereEnabled;
|
|
54298
54262
|
statusBar.setCohereActive(cohereEnabled);
|
|
54299
|
-
if (cohereEnabled) {
|
|
54300
|
-
banner.setDesign(createCohereBanner());
|
|
54301
|
-
const reserved = banner.start();
|
|
54302
|
-
if (statusBar.isActive && reserved > 0)
|
|
54303
|
-
statusBar.setScrollRegionTop(reserved + 1);
|
|
54304
|
-
} else {
|
|
54305
|
-
banner.setDesign(createDefaultBanner(version));
|
|
54306
|
-
const reserved = banner.start();
|
|
54307
|
-
if (statusBar.isActive && reserved > 0)
|
|
54308
|
-
statusBar.setScrollRegionTop(reserved + 1);
|
|
54309
|
-
}
|
|
54310
54263
|
return cohereEnabled;
|
|
54311
54264
|
},
|
|
54312
54265
|
isCohere() {
|
package/package.json
CHANGED