open-agents-ai 0.104.9 → 0.104.11

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 +30 -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) {
@@ -34671,17 +34674,20 @@ async function startNeovimMode(opts) {
34671
34674
  }
34672
34675
  function stopNeovimMode() {
34673
34676
  if (!_state || _state.cleanedUp)
34674
- return;
34677
+ return Promise.resolve();
34675
34678
  try {
34676
34679
  _state.pty?.write("\x1B:qa!\r");
34677
34680
  } catch {
34678
34681
  }
34679
34682
  const s = _state;
34680
- setTimeout(() => {
34681
- if (s && !s.cleanedUp) {
34682
- doCleanup(s);
34683
- }
34684
- }, 300);
34683
+ return new Promise((resolve32) => {
34684
+ setTimeout(() => {
34685
+ if (s && !s.cleanedUp) {
34686
+ doCleanup(s);
34687
+ }
34688
+ resolve32();
34689
+ }, 300);
34690
+ });
34685
34691
  }
34686
34692
  function writeToNeovimOutput(text) {
34687
34693
  if (!_state || _state.cleanedUp || !_state.nvim || !_state.outputChanId)
@@ -34791,13 +34797,19 @@ function toggleFocus(state) {
34791
34797
  }
34792
34798
  }
34793
34799
  if (state.opts.rl) {
34794
- state.opts.rl.resume();
34795
- state.opts.rl.prompt(false);
34800
+ try {
34801
+ state.opts.rl.resume();
34802
+ state.opts.rl.prompt(false);
34803
+ } catch {
34804
+ }
34796
34805
  }
34797
34806
  } else {
34798
34807
  state.focused = true;
34799
34808
  if (state.opts.rl) {
34800
- state.opts.rl.pause();
34809
+ try {
34810
+ state.opts.rl.pause();
34811
+ } catch {
34812
+ }
34801
34813
  }
34802
34814
  for (const { event, fn } of state.installedFilteredListeners) {
34803
34815
  stdin.removeListener(event, fn);
@@ -34866,8 +34878,11 @@ function doCleanup(state) {
34866
34878
  stdin.on(event, fn);
34867
34879
  }
34868
34880
  if (state.opts.rl) {
34869
- state.opts.rl.resume();
34870
- state.opts.rl.prompt(false);
34881
+ try {
34882
+ state.opts.rl.resume();
34883
+ state.opts.rl.prompt(false);
34884
+ } catch {
34885
+ }
34871
34886
  }
34872
34887
  _state = null;
34873
34888
  process.stdout.write("\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[H\x1B[J");
@@ -37961,8 +37976,9 @@ async function handleSlashCommand(input, ctx) {
37961
37976
  case "nvim":
37962
37977
  case "vim": {
37963
37978
  if (isNeovimActive()) {
37964
- stopNeovimMode();
37965
- renderInfo("Neovim mode stopped.");
37979
+ await stopNeovimMode();
37980
+ ctx.clearScreen();
37981
+ renderInfo("Neovim mode stopped. Main waterfall restored.");
37966
37982
  } else {
37967
37983
  const contentRows = ctx.availableContentRows?.() ?? Math.max(5, (process.stdout.rows ?? 24) - 6);
37968
37984
  const cols = process.stdout.columns ?? 80;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.104.9",
3
+ "version": "0.104.11",
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",