open-agents-ai 0.138.41 → 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 +32 -38
- 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;
|
|
@@ -54081,7 +54081,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54081
54081
|
history: savedHistory,
|
|
54082
54082
|
completer
|
|
54083
54083
|
});
|
|
54084
|
-
|
|
54084
|
+
let _escapeHandler = null;
|
|
54085
|
+
statusBar.hookReadlineScroll(rl, () => {
|
|
54086
|
+
_escapeHandler?.();
|
|
54087
|
+
});
|
|
54085
54088
|
rl.output = null;
|
|
54086
54089
|
function persistHistoryLine(line) {
|
|
54087
54090
|
if (!line.trim())
|
|
@@ -56214,42 +56217,33 @@ ${c2.dim("(Use /quit to exit)")}
|
|
|
56214
56217
|
}
|
|
56215
56218
|
showPrompt();
|
|
56216
56219
|
});
|
|
56217
|
-
|
|
56218
|
-
|
|
56219
|
-
|
|
56220
|
-
|
|
56221
|
-
|
|
56222
|
-
|
|
56223
|
-
|
|
56224
|
-
|
|
56225
|
-
|
|
56226
|
-
|
|
56227
|
-
|
|
56228
|
-
|
|
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")}
|
|
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")}
|
|
56232
56232
|
`));
|
|
56233
|
-
|
|
56234
|
-
|
|
56235
|
-
|
|
56236
|
-
|
|
56237
|
-
|
|
56238
|
-
lastSteeringRetracted = true;
|
|
56239
|
-
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")}
|
|
56240
56238
|
`));
|
|
56241
|
-
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
} else {
|
|
56246
|
-
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.")}
|
|
56247
56243
|
`));
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
});
|
|
56252
|
-
}
|
|
56244
|
+
}
|
|
56245
|
+
showPrompt();
|
|
56246
|
+
};
|
|
56253
56247
|
}
|
|
56254
56248
|
async function runWithTUI(task, config, repoPath) {
|
|
56255
56249
|
const repoRoot = resolve29(repoPath ?? cwd());
|
package/package.json
CHANGED