open-agents-ai 0.138.40 → 0.138.42
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 +44 -44
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -52216,7 +52216,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52216
52216
|
* before readline splits them into garbage text. Scroll wheel support
|
|
52217
52217
|
* is keyboard-only (Page Up/Down, Shift+Up/Down).
|
|
52218
52218
|
*/
|
|
52219
|
-
hookReadlineScroll(rl) {
|
|
52219
|
+
hookReadlineScroll(rl, onEscape) {
|
|
52220
52220
|
if (!rl || !rl._ttyWrite)
|
|
52221
52221
|
return;
|
|
52222
52222
|
const self = this;
|
|
@@ -52235,9 +52235,9 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52235
52235
|
if (key?.name === "escape" || s === "\x1B") {
|
|
52236
52236
|
sawEscape = true;
|
|
52237
52237
|
sawEscapeTime = Date.now();
|
|
52238
|
-
if (
|
|
52239
|
-
|
|
52240
|
-
return
|
|
52238
|
+
if (onEscape && s.length === 1)
|
|
52239
|
+
onEscape();
|
|
52240
|
+
return;
|
|
52241
52241
|
}
|
|
52242
52242
|
if (sawEscape && Date.now() - sawEscapeTime < 100) {
|
|
52243
52243
|
sawEscape = false;
|
|
@@ -53785,6 +53785,7 @@ async function startInteractive(config, repoPath) {
|
|
|
53785
53785
|
}
|
|
53786
53786
|
})).catch(() => {
|
|
53787
53787
|
});
|
|
53788
|
+
let updateNotified = false;
|
|
53788
53789
|
if (!isResumed) {
|
|
53789
53790
|
checkForUpdate(version).then((updateInfo) => {
|
|
53790
53791
|
if (updateInfo) {
|
|
@@ -53793,10 +53794,10 @@ async function startInteractive(config, repoPath) {
|
|
|
53793
53794
|
setTimeout(writeMsg, 3e3);
|
|
53794
53795
|
return;
|
|
53795
53796
|
}
|
|
53797
|
+
updateNotified = true;
|
|
53796
53798
|
if (statusBar?.isActive)
|
|
53797
53799
|
statusBar.beginContentWrite();
|
|
53798
|
-
|
|
53799
|
-
renderInfo(`Run /update to install.`);
|
|
53800
|
+
renderInfo(`Update available: v${updateInfo.currentVersion} \u2192 v${c2.bold(c2.green(updateInfo.latestVersion))}. Run /update to install.`);
|
|
53800
53801
|
if (statusBar?.isActive)
|
|
53801
53802
|
statusBar.endContentWrite();
|
|
53802
53803
|
};
|
|
@@ -53807,14 +53808,19 @@ async function startInteractive(config, repoPath) {
|
|
|
53807
53808
|
}
|
|
53808
53809
|
const AUTO_UPDATE_INTERVAL_MS = 30 * 60 * 1e3;
|
|
53809
53810
|
const autoUpdateTimer = setInterval(() => {
|
|
53811
|
+
if (updateNotified)
|
|
53812
|
+
return;
|
|
53810
53813
|
const updateMode = savedSettings.updateMode ?? "auto";
|
|
53811
53814
|
if (updateMode === "manual")
|
|
53812
53815
|
return;
|
|
53813
53816
|
checkForUpdate(version).then((updateInfo) => {
|
|
53814
|
-
if (updateInfo && statusBar?.isActive) {
|
|
53815
|
-
|
|
53816
|
-
|
|
53817
|
-
|
|
53817
|
+
if (updateInfo && statusBar?.isActive && !updateNotified) {
|
|
53818
|
+
updateNotified = true;
|
|
53819
|
+
if (!statusBar.isStreaming) {
|
|
53820
|
+
statusBar.beginContentWrite();
|
|
53821
|
+
renderInfo(`Update available: v${version} \u2192 v${updateInfo.latestVersion}. Run /update to install.`);
|
|
53822
|
+
statusBar.endContentWrite();
|
|
53823
|
+
}
|
|
53818
53824
|
}
|
|
53819
53825
|
}).catch(() => {
|
|
53820
53826
|
});
|
|
@@ -54075,7 +54081,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54075
54081
|
history: savedHistory,
|
|
54076
54082
|
completer
|
|
54077
54083
|
});
|
|
54078
|
-
|
|
54084
|
+
let _escapeHandler = null;
|
|
54085
|
+
statusBar.hookReadlineScroll(rl, () => {
|
|
54086
|
+
_escapeHandler?.();
|
|
54087
|
+
});
|
|
54079
54088
|
rl.output = null;
|
|
54080
54089
|
function persistHistoryLine(line) {
|
|
54081
54090
|
if (!line.trim())
|
|
@@ -56208,42 +56217,33 @@ ${c2.dim("(Use /quit to exit)")}
|
|
|
56208
56217
|
}
|
|
56209
56218
|
showPrompt();
|
|
56210
56219
|
});
|
|
56211
|
-
|
|
56212
|
-
|
|
56213
|
-
|
|
56214
|
-
|
|
56215
|
-
|
|
56216
|
-
|
|
56217
|
-
|
|
56218
|
-
|
|
56219
|
-
|
|
56220
|
-
|
|
56221
|
-
|
|
56222
|
-
|
|
56223
|
-
lastSteeringInput = retracted;
|
|
56224
|
-
lastSteeringRetracted = true;
|
|
56225
|
-
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("\x1B[9m" + retracted.slice(0, 120) + "\x1B[29m")} ${c2.dim("\u2190 retracted, edit below and press Enter")}
|
|
56220
|
+
_escapeHandler = () => {
|
|
56221
|
+
if (!activeTask)
|
|
56222
|
+
return;
|
|
56223
|
+
if (!activeTask.runner.isPaused) {
|
|
56224
|
+
activeTask.runner.pause();
|
|
56225
|
+
statusBar.setProcessing(false);
|
|
56226
|
+
}
|
|
56227
|
+
const retracted = activeTask.runner.retractLastPendingMessage();
|
|
56228
|
+
if (retracted) {
|
|
56229
|
+
lastSteeringInput = retracted;
|
|
56230
|
+
lastSteeringRetracted = true;
|
|
56231
|
+
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("\x1B[9m" + retracted.slice(0, 120) + "\x1B[29m")} ${c2.dim("\u2190 retracted, edit below and press Enter")}
|
|
56226
56232
|
`));
|
|
56227
|
-
|
|
56228
|
-
|
|
56229
|
-
|
|
56230
|
-
|
|
56231
|
-
|
|
56232
|
-
lastSteeringRetracted = true;
|
|
56233
|
-
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("\x1B[9m" + lastSteeringInput.slice(0, 120) + "\x1B[29m")} ${c2.dim("\u2190 already sent, re-type below to override")}
|
|
56233
|
+
rl.line = retracted;
|
|
56234
|
+
rl.cursor = retracted.length;
|
|
56235
|
+
} else if (lastSteeringInput) {
|
|
56236
|
+
lastSteeringRetracted = true;
|
|
56237
|
+
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("\x1B[9m" + lastSteeringInput.slice(0, 120) + "\x1B[29m")} ${c2.dim("\u2190 already sent, re-type below to override")}
|
|
56234
56238
|
`));
|
|
56235
|
-
|
|
56236
|
-
|
|
56237
|
-
|
|
56238
|
-
|
|
56239
|
-
} else {
|
|
56240
|
-
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("Paused. /resume to continue, /stop to kill.")}
|
|
56239
|
+
rl.line = lastSteeringInput;
|
|
56240
|
+
rl.cursor = lastSteeringInput.length;
|
|
56241
|
+
} else {
|
|
56242
|
+
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("Paused. /resume to continue, /stop to kill.")}
|
|
56241
56243
|
`));
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
});
|
|
56246
|
-
}
|
|
56244
|
+
}
|
|
56245
|
+
showPrompt();
|
|
56246
|
+
};
|
|
56247
56247
|
}
|
|
56248
56248
|
async function runWithTUI(task, config, repoPath) {
|
|
56249
56249
|
const repoRoot = resolve29(repoPath ?? cwd());
|
package/package.json
CHANGED