open-agents-ai 0.104.10 → 0.104.12

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 +26 -14
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -34637,7 +34637,10 @@ async function startNeovimMode(opts) {
34637
34637
  });
34638
34638
  const stdin = process.stdin;
34639
34639
  if (opts.rl) {
34640
- opts.rl.pause();
34640
+ try {
34641
+ opts.rl.pause();
34642
+ } catch {
34643
+ }
34641
34644
  for (const event of ["keypress", "data"]) {
34642
34645
  const listeners = stdin.listeners(event);
34643
34646
  for (const fn of listeners) {
@@ -34773,11 +34776,19 @@ function toggleFocus(state) {
34773
34776
  const filtered = (...args) => {
34774
34777
  if (args[0] instanceof Buffer) {
34775
34778
  const raw = args[0].toString("utf8");
34779
+ if (raw === "") {
34780
+ toggleFocus(state);
34781
+ return;
34782
+ }
34776
34783
  const clean = raw.replace(STDIN_MOUSE_FOCUS_RE, "");
34777
34784
  if (!clean)
34778
34785
  return;
34779
34786
  fn(Buffer.from(clean));
34780
34787
  } else if (typeof args[0] === "string") {
34788
+ if (args[0] === "") {
34789
+ toggleFocus(state);
34790
+ return;
34791
+ }
34781
34792
  const clean = args[0].replace(STDIN_MOUSE_FOCUS_RE, "");
34782
34793
  if (!clean)
34783
34794
  return;
@@ -34794,26 +34805,24 @@ function toggleFocus(state) {
34794
34805
  }
34795
34806
  }
34796
34807
  if (state.opts.rl) {
34797
- state.opts.rl.resume();
34798
- state.opts.rl.prompt(false);
34808
+ try {
34809
+ state.opts.rl.resume();
34810
+ state.opts.rl.prompt(false);
34811
+ } catch {
34812
+ }
34799
34813
  }
34800
34814
  } else {
34801
34815
  state.focused = true;
34802
34816
  if (state.opts.rl) {
34803
- state.opts.rl.pause();
34817
+ try {
34818
+ state.opts.rl.pause();
34819
+ } catch {
34820
+ }
34804
34821
  }
34805
34822
  for (const { event, fn } of state.installedFilteredListeners) {
34806
34823
  stdin.removeListener(event, fn);
34807
34824
  }
34808
34825
  state.installedFilteredListeners = [];
34809
- state.savedRlListeners = [];
34810
- for (const event of ["keypress", "data"]) {
34811
- const listeners = stdin.listeners(event);
34812
- for (const fn of listeners) {
34813
- state.savedRlListeners.push({ event, fn });
34814
- stdin.removeListener(event, fn);
34815
- }
34816
- }
34817
34826
  if (typeof stdin.setRawMode === "function") {
34818
34827
  stdin.setRawMode(true);
34819
34828
  }
@@ -34869,8 +34878,11 @@ function doCleanup(state) {
34869
34878
  stdin.on(event, fn);
34870
34879
  }
34871
34880
  if (state.opts.rl) {
34872
- state.opts.rl.resume();
34873
- state.opts.rl.prompt(false);
34881
+ try {
34882
+ state.opts.rl.resume();
34883
+ state.opts.rl.prompt(false);
34884
+ } catch {
34885
+ }
34874
34886
  }
34875
34887
  _state = null;
34876
34888
  process.stdout.write("\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[H\x1B[J");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.104.10",
3
+ "version": "0.104.12",
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",