open-agents-ai 0.138.29 → 0.138.30

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 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -52212,12 +52212,41 @@ ${CONTENT_BG_SEQ}`);
52212
52212
  let arrowBurst = 0;
52213
52213
  let arrowBurstDir = "";
52214
52214
  let arrowBurstTimer = null;
52215
+ let sawEscape = false;
52216
+ let sawEscapeTime = 0;
52215
52217
  rl._ttyWrite = function(s, key) {
52216
52218
  if (!self.active)
52217
52219
  return origTtyWrite(s, key);
52218
52220
  if (s && (/\x1B\[</.test(s) || /^\d+;\d+;\d*[Mm]/.test(s) || /^;\d+[Mm]/.test(s) || /\[<\d/.test(s))) {
52219
52221
  return;
52220
52222
  }
52223
+ if (key?.name === "escape" || s === "\x1B") {
52224
+ sawEscape = true;
52225
+ sawEscapeTime = Date.now();
52226
+ if (self.writeDepth > 0)
52227
+ return;
52228
+ return origTtyWrite(s, key);
52229
+ }
52230
+ if (sawEscape && Date.now() - sawEscapeTime < 100) {
52231
+ sawEscape = false;
52232
+ if (s === "[A" || s === "[B") {
52233
+ if (s === "[A")
52234
+ self.scrollContentUp(1);
52235
+ else
52236
+ self.scrollContentDown(1);
52237
+ return;
52238
+ }
52239
+ if (s === "[5~" || s === "[6~") {
52240
+ if (s === "[5~")
52241
+ self.pageUpContent();
52242
+ else
52243
+ self.pageDownContent();
52244
+ return;
52245
+ }
52246
+ if (s.startsWith("["))
52247
+ return;
52248
+ }
52249
+ sawEscape = false;
52221
52250
  if (key?.name === "up" || key?.name === "down") {
52222
52251
  const dir = key.name;
52223
52252
  if (dir === arrowBurstDir) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.29",
3
+ "version": "0.138.30",
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",