open-agents-ai 0.138.7 → 0.138.8

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.
Files changed (2) hide show
  1. package/dist/index.js +29 -26
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38784,7 +38784,7 @@ var init_voice = __esm({
38784
38784
  return;
38785
38785
  const chunks = this.chunkText(text);
38786
38786
  if (this.speakQueue.length >= 30) {
38787
- this.speakQueue.length = 0;
38787
+ return;
38788
38788
  }
38789
38789
  for (const chunk of chunks) {
38790
38790
  this.speakQueue.push({ text: chunk, volume, pitchFactor, speedFactor, stereoDelayMs });
@@ -52209,30 +52209,47 @@ var init_status_bar = __esm({
52209
52209
  * cursor save/restore so the streaming position isn't disrupted.
52210
52210
  * When idle (writeDepth === 0), the full footer is redrawn.
52211
52211
  */
52212
- hookStdin() {
52213
- if (this.stdinHooked)
52212
+ /**
52213
+ * Hook into a readline instance to intercept scroll keys BEFORE readline
52214
+ * processes them. Monkey-patches readline._ttyWrite — the only way to
52215
+ * prevent Page Up/Down from becoming readline history navigation.
52216
+ *
52217
+ * Must be called after readline is created.
52218
+ */
52219
+ hookReadlineScroll(rl) {
52220
+ if (!rl || !rl._ttyWrite)
52214
52221
  return;
52215
- this.stdinHooked = true;
52216
- process.stdin.on("data", (chunk) => {
52222
+ const origTtyWrite = rl._ttyWrite.bind(rl);
52223
+ rl._ttyWrite = (s, key) => {
52217
52224
  if (!this.active)
52218
- return;
52219
- const seq = chunk.toString();
52220
- if (seq === "\x1B[5~" || seq === "\x1B[1;2A") {
52225
+ return origTtyWrite(s, key);
52226
+ const seq = s || "";
52227
+ if (key?.name === "pageup" || seq === "\x1B[5~") {
52221
52228
  this.pageUpContent();
52222
52229
  return;
52223
52230
  }
52224
- if (seq === "\x1B[6~" || seq === "\x1B[1;2B") {
52231
+ if (key?.name === "pagedown" || seq === "\x1B[6~") {
52225
52232
  this.pageDownContent();
52226
52233
  return;
52227
52234
  }
52228
- if (seq.startsWith("\x1B[<65;")) {
52235
+ if (key?.shift && key?.name === "up" || seq === "\x1B[1;2A") {
52229
52236
  this.scrollContentUp(3);
52230
52237
  return;
52231
52238
  }
52232
- if (seq.startsWith("\x1B[<64;")) {
52239
+ if (key?.shift && key?.name === "down" || seq === "\x1B[1;2B") {
52233
52240
  this.scrollContentDown(3);
52234
52241
  return;
52235
52242
  }
52243
+ return origTtyWrite(s, key);
52244
+ };
52245
+ }
52246
+ hookStdin() {
52247
+ if (this.stdinHooked)
52248
+ return;
52249
+ this.stdinHooked = true;
52250
+ process.stdin.on("data", () => {
52251
+ if (!this.active)
52252
+ return;
52236
52253
  setImmediate(() => {
52237
52254
  if (this.writeDepth > 0) {
52238
52255
  this.renderInputRowDuringStream();
@@ -53875,6 +53892,7 @@ Rationale: ${proposal.rationale}${provenanceNote}`;
53875
53892
  history: savedHistory,
53876
53893
  completer
53877
53894
  });
53895
+ statusBar.hookReadlineScroll(rl);
53878
53896
  function persistHistoryLine(line) {
53879
53897
  if (!line.trim())
53880
53898
  return;
@@ -56020,21 +56038,6 @@ ${c2.dim("(Use /quit to exit)")}
56020
56038
  process.stdin.on("keypress", (_str, key) => {
56021
56039
  if (!key)
56022
56040
  return;
56023
- if (key.name === "pageup" || key.sequence === "\x1B[5~" || key.shift && key.name === "up" || key.sequence === "\x1B[1;2A") {
56024
- statusBar.pageUpContent();
56025
- return;
56026
- }
56027
- if (key.name === "pagedown" || key.sequence === "\x1B[6~" || key.shift && key.name === "down" || key.sequence === "\x1B[1;2B") {
56028
- statusBar.pageDownContent();
56029
- return;
56030
- }
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);
56036
- return;
56037
- }
56038
56041
  if (key.name === "escape" && activeTask) {
56039
56042
  if (!activeTask.runner.isPaused) {
56040
56043
  activeTask.runner.pause();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.7",
3
+ "version": "0.138.8",
4
4
  "description": "AI coding agent powered by open-source models (Ollama/vLLM) — interactive TUI with agentic tool-calling loop",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",