open-agents-ai 0.138.5 → 0.138.7
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 +72 -29
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -51583,13 +51583,23 @@ var init_status_bar = __esm({
|
|
|
51583
51583
|
this._contentScrollOffset = 0;
|
|
51584
51584
|
this.repaintContent();
|
|
51585
51585
|
}
|
|
51586
|
-
/**
|
|
51587
|
-
*
|
|
51586
|
+
/**
|
|
51587
|
+
* Repaint content area from buffer at current scroll position.
|
|
51588
|
+
*
|
|
51589
|
+
* btop-style: every line is positioned with Mv::to(row, col) — no DECSTBM.
|
|
51590
|
+
* Wrapped in synchronized output (?2026h/?2026l) to prevent flicker.
|
|
51591
|
+
* Single atomic process.stdout.write() call for the entire frame.
|
|
51592
|
+
*
|
|
51593
|
+
* Reference: btop_draw.cpp lines 2080-2102 — process list rendering.
|
|
51594
|
+
*/
|
|
51588
51595
|
repaintContent() {
|
|
51589
51596
|
const h = this.contentHeight;
|
|
51590
51597
|
const totalLines = this._contentLines.length;
|
|
51591
51598
|
const startIdx = Math.max(0, totalLines - h - this._contentScrollOffset);
|
|
51592
|
-
|
|
51599
|
+
const w = process.stdout.columns ?? 80;
|
|
51600
|
+
let buf = "\x1B[?2026h";
|
|
51601
|
+
buf += "\x1B7";
|
|
51602
|
+
buf += "\x1B[?25l";
|
|
51593
51603
|
for (let row = 0; row < h; row++) {
|
|
51594
51604
|
const lineIdx = startIdx + row;
|
|
51595
51605
|
const line = lineIdx < totalLines ? this._contentLines[lineIdx] : "";
|
|
@@ -51597,10 +51607,15 @@ var init_status_bar = __esm({
|
|
|
51597
51607
|
buf += `\x1B[${screenRow};1H\x1B[2K${line}`;
|
|
51598
51608
|
}
|
|
51599
51609
|
if (this._contentScrollOffset > 0) {
|
|
51600
|
-
const linesAbove =
|
|
51601
|
-
|
|
51610
|
+
const linesAbove = startIdx;
|
|
51611
|
+
const pct = totalLines > 0 ? Math.round((startIdx + h) / totalLines * 100) : 100;
|
|
51612
|
+
const indicator = ` \u2191 ${linesAbove} lines above \xB7 ${pct}% \xB7 PgDn/End to return `;
|
|
51613
|
+
const pad = Math.max(0, w - indicator.length);
|
|
51614
|
+
buf += `\x1B[${this.scrollRegionTop};1H\x1B[7m${indicator}${" ".repeat(pad)}\x1B[0m`;
|
|
51602
51615
|
}
|
|
51603
|
-
buf += "\x1B8
|
|
51616
|
+
buf += "\x1B8";
|
|
51617
|
+
buf += "\x1B[?25h";
|
|
51618
|
+
buf += "\x1B[?2026l";
|
|
51604
51619
|
process.stdout.write(buf);
|
|
51605
51620
|
}
|
|
51606
51621
|
/**
|
|
@@ -52198,9 +52213,26 @@ var init_status_bar = __esm({
|
|
|
52198
52213
|
if (this.stdinHooked)
|
|
52199
52214
|
return;
|
|
52200
52215
|
this.stdinHooked = true;
|
|
52201
|
-
process.stdin.on("data", () => {
|
|
52216
|
+
process.stdin.on("data", (chunk) => {
|
|
52202
52217
|
if (!this.active)
|
|
52203
52218
|
return;
|
|
52219
|
+
const seq = chunk.toString();
|
|
52220
|
+
if (seq === "\x1B[5~" || seq === "\x1B[1;2A") {
|
|
52221
|
+
this.pageUpContent();
|
|
52222
|
+
return;
|
|
52223
|
+
}
|
|
52224
|
+
if (seq === "\x1B[6~" || seq === "\x1B[1;2B") {
|
|
52225
|
+
this.pageDownContent();
|
|
52226
|
+
return;
|
|
52227
|
+
}
|
|
52228
|
+
if (seq.startsWith("\x1B[<65;")) {
|
|
52229
|
+
this.scrollContentUp(3);
|
|
52230
|
+
return;
|
|
52231
|
+
}
|
|
52232
|
+
if (seq.startsWith("\x1B[<64;")) {
|
|
52233
|
+
this.scrollContentDown(3);
|
|
52234
|
+
return;
|
|
52235
|
+
}
|
|
52204
52236
|
setImmediate(() => {
|
|
52205
52237
|
if (this.writeDepth > 0) {
|
|
52206
52238
|
this.renderInputRowDuringStream();
|
|
@@ -53465,10 +53497,24 @@ async function startInteractive(config, repoPath) {
|
|
|
53465
53497
|
let carouselLines = 0;
|
|
53466
53498
|
const version = getVersion3();
|
|
53467
53499
|
if (isResumed) {
|
|
53468
|
-
process.stdout.
|
|
53469
|
-
|
|
53470
|
-
|
|
53471
|
-
|
|
53500
|
+
if (process.stdout.isTTY) {
|
|
53501
|
+
process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
|
|
53502
|
+
const restoreScreen = () => {
|
|
53503
|
+
process.stdout.write("\x1B[?25h\x1B[?1049l");
|
|
53504
|
+
};
|
|
53505
|
+
process.on("exit", restoreScreen);
|
|
53506
|
+
process.on("SIGINT", () => {
|
|
53507
|
+
restoreScreen();
|
|
53508
|
+
process.exit(130);
|
|
53509
|
+
});
|
|
53510
|
+
process.on("SIGTERM", () => {
|
|
53511
|
+
restoreScreen();
|
|
53512
|
+
process.exit(143);
|
|
53513
|
+
});
|
|
53514
|
+
}
|
|
53515
|
+
banner.setDesign(createDefaultBanner(version));
|
|
53516
|
+
carouselLines = banner.start();
|
|
53517
|
+
const resumeMsg = hasTaskToResume ? `Updated to v${version} \u2014 picking up where you left off.` : `Updated to v${version}.`;
|
|
53472
53518
|
renderInfo(resumeMsg);
|
|
53473
53519
|
} else {
|
|
53474
53520
|
process.stdout.write("\x1B[H");
|
|
@@ -55185,8 +55231,10 @@ Respond concisely and safely. Remember: you are talking to the general public.`;
|
|
|
55185
55231
|
if (!carouselRetired && carousel.isRunning) {
|
|
55186
55232
|
carousel.stop();
|
|
55187
55233
|
carouselRetired = true;
|
|
55188
|
-
|
|
55189
|
-
|
|
55234
|
+
const bannerActive = banner.getDesign() !== null;
|
|
55235
|
+
if (statusBar.isActive) {
|
|
55236
|
+
statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
|
|
55237
|
+
}
|
|
55190
55238
|
}
|
|
55191
55239
|
},
|
|
55192
55240
|
destroyProject() {
|
|
@@ -55499,8 +55547,9 @@ Execute this skill now. Follow the behavioral guidance above.`;
|
|
|
55499
55547
|
if (!carouselRetired && carousel.isRunning) {
|
|
55500
55548
|
carousel.stop();
|
|
55501
55549
|
carouselRetired = true;
|
|
55550
|
+
const bannerActive = banner.getDesign() !== null;
|
|
55502
55551
|
if (statusBar.isActive)
|
|
55503
|
-
statusBar.setScrollRegionTop(1);
|
|
55552
|
+
statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
|
|
55504
55553
|
}
|
|
55505
55554
|
writeContent(() => renderUserMessage(`/${cmdResult.name}${cmdResult.args ? " " + cmdResult.args : ""}`));
|
|
55506
55555
|
lastSubmittedPrompt = skillPrompt;
|
|
@@ -55728,8 +55777,9 @@ Summarize or analyze this transcription as appropriate.`;
|
|
|
55728
55777
|
if (!carouselRetired && carousel.isRunning) {
|
|
55729
55778
|
carousel.stop();
|
|
55730
55779
|
carouselRetired = true;
|
|
55780
|
+
const bannerActive = banner.getDesign() !== null;
|
|
55731
55781
|
if (statusBar.isActive)
|
|
55732
|
-
statusBar.setScrollRegionTop(1);
|
|
55782
|
+
statusBar.setScrollRegionTop(bannerActive ? 5 : 1);
|
|
55733
55783
|
}
|
|
55734
55784
|
const inputLineCount = fullInput.split("\n").length;
|
|
55735
55785
|
const displayText = isImage ? `[Image: ${cleanPath}]` : inputLineCount > 1 ? `[pasted ${inputLineCount} lines]` : fullInput;
|
|
@@ -55970,28 +56020,21 @@ ${c2.dim("(Use /quit to exit)")}
|
|
|
55970
56020
|
process.stdin.on("keypress", (_str, key) => {
|
|
55971
56021
|
if (!key)
|
|
55972
56022
|
return;
|
|
55973
|
-
if (key.name === "pageup" || key.shift && key.name === "up") {
|
|
56023
|
+
if (key.name === "pageup" || key.sequence === "\x1B[5~" || key.shift && key.name === "up" || key.sequence === "\x1B[1;2A") {
|
|
55974
56024
|
statusBar.pageUpContent();
|
|
55975
56025
|
return;
|
|
55976
56026
|
}
|
|
55977
|
-
if (key.name === "pagedown" || key.shift && key.name === "down") {
|
|
56027
|
+
if (key.name === "pagedown" || key.sequence === "\x1B[6~" || key.shift && key.name === "down" || key.sequence === "\x1B[1;2B") {
|
|
55978
56028
|
statusBar.pageDownContent();
|
|
55979
56029
|
return;
|
|
55980
56030
|
}
|
|
55981
|
-
if (key.name === "end" && key.ctrl) {
|
|
55982
|
-
|
|
56031
|
+
if (key.name === "end" && key.ctrl || key.name === "home" && key.ctrl) {
|
|
56032
|
+
if (key.name === "end")
|
|
56033
|
+
statusBar.jumpToLive();
|
|
56034
|
+
else
|
|
56035
|
+
statusBar.scrollContentUp(99999);
|
|
55983
56036
|
return;
|
|
55984
56037
|
}
|
|
55985
|
-
if (key.sequence) {
|
|
55986
|
-
if (key.sequence.includes("[<65;") || key.sequence === "\x1B[A" && key.shift) {
|
|
55987
|
-
statusBar.scrollContentUp(3);
|
|
55988
|
-
return;
|
|
55989
|
-
}
|
|
55990
|
-
if (key.sequence.includes("[<64;") || key.sequence === "\x1B[B" && key.shift) {
|
|
55991
|
-
statusBar.scrollContentDown(3);
|
|
55992
|
-
return;
|
|
55993
|
-
}
|
|
55994
|
-
}
|
|
55995
56038
|
if (key.name === "escape" && activeTask) {
|
|
55996
56039
|
if (!activeTask.runner.isPaused) {
|
|
55997
56040
|
activeTask.runner.pause();
|
package/package.json
CHANGED