open-agents-ai 0.138.41 → 0.138.43
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 -43
- 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;
|
|
@@ -52309,12 +52309,7 @@ ${CONTENT_BG_SEQ}`);
|
|
|
52309
52309
|
return;
|
|
52310
52310
|
if (key?.name === "escape")
|
|
52311
52311
|
return;
|
|
52312
|
-
const rows = process.stdout.rows ?? 24;
|
|
52313
|
-
const pos = self.rowPositions(rows);
|
|
52314
|
-
const writer = self._origWrite ?? process.stdout.write.bind(process.stdout);
|
|
52315
|
-
writer(`\x1B7\x1B[${pos.inputStartRow};1H`);
|
|
52316
52312
|
origTtyWrite(s, key);
|
|
52317
|
-
writer(`\x1B8`);
|
|
52318
52313
|
return;
|
|
52319
52314
|
}
|
|
52320
52315
|
if (self.inputStateProvider && (key?.name !== "return" && key?.name !== "enter" && key?.name !== "backspace")) {
|
|
@@ -54081,7 +54076,10 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
|
|
|
54081
54076
|
history: savedHistory,
|
|
54082
54077
|
completer
|
|
54083
54078
|
});
|
|
54084
|
-
|
|
54079
|
+
let _escapeHandler = null;
|
|
54080
|
+
statusBar.hookReadlineScroll(rl, () => {
|
|
54081
|
+
_escapeHandler?.();
|
|
54082
|
+
});
|
|
54085
54083
|
rl.output = null;
|
|
54086
54084
|
function persistHistoryLine(line) {
|
|
54087
54085
|
if (!line.trim())
|
|
@@ -56214,42 +56212,33 @@ ${c2.dim("(Use /quit to exit)")}
|
|
|
56214
56212
|
}
|
|
56215
56213
|
showPrompt();
|
|
56216
56214
|
});
|
|
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")}
|
|
56215
|
+
_escapeHandler = () => {
|
|
56216
|
+
if (!activeTask)
|
|
56217
|
+
return;
|
|
56218
|
+
if (!activeTask.runner.isPaused) {
|
|
56219
|
+
activeTask.runner.pause();
|
|
56220
|
+
statusBar.setProcessing(false);
|
|
56221
|
+
}
|
|
56222
|
+
const retracted = activeTask.runner.retractLastPendingMessage();
|
|
56223
|
+
if (retracted) {
|
|
56224
|
+
lastSteeringInput = retracted;
|
|
56225
|
+
lastSteeringRetracted = true;
|
|
56226
|
+
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
56227
|
`));
|
|
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")}
|
|
56228
|
+
rl.line = retracted;
|
|
56229
|
+
rl.cursor = retracted.length;
|
|
56230
|
+
} else if (lastSteeringInput) {
|
|
56231
|
+
lastSteeringRetracted = true;
|
|
56232
|
+
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
56233
|
`));
|
|
56241
|
-
|
|
56242
|
-
|
|
56243
|
-
|
|
56244
|
-
|
|
56245
|
-
} else {
|
|
56246
|
-
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("Paused. /resume to continue, /stop to kill.")}
|
|
56234
|
+
rl.line = lastSteeringInput;
|
|
56235
|
+
rl.cursor = lastSteeringInput.length;
|
|
56236
|
+
} else {
|
|
56237
|
+
writeContent(() => process.stdout.write(` ${c2.yellow("\u23F8")} ${c2.dim("Paused. /resume to continue, /stop to kill.")}
|
|
56247
56238
|
`));
|
|
56248
|
-
|
|
56249
|
-
|
|
56250
|
-
|
|
56251
|
-
});
|
|
56252
|
-
}
|
|
56239
|
+
}
|
|
56240
|
+
showPrompt();
|
|
56241
|
+
};
|
|
56253
56242
|
}
|
|
56254
56243
|
async function runWithTUI(task, config, repoPath) {
|
|
56255
56244
|
const repoRoot = resolve29(repoPath ?? cwd());
|
package/package.json
CHANGED