open-agents-ai 0.138.94 → 0.138.95

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 +32 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -38556,8 +38556,14 @@ async function startNeovimMode(opts) {
38556
38556
  } catch {
38557
38557
  }
38558
38558
  const ptyCols = opts.cols;
38559
+ const topOffset = opts.topOffset ?? 0;
38559
38560
  const ptyRows = Math.max(5, opts.contentRows);
38560
- const initVimCmd = "let g:loaded_netrwPlugin=1 | let g:loaded_netrw=1 | set mouse= autoread updatetime=300 signcolumn=no noswapfile";
38561
+ if (topOffset > 0 && isTTY5) {
38562
+ const termRows = process.stdout.rows ?? 24;
38563
+ const bottomBound = Math.min(termRows, topOffset + ptyRows);
38564
+ process.stdout.write(`\x1B[${topOffset + 1};${bottomBound}r\x1B[${topOffset + 1};1H`);
38565
+ }
38566
+ const initVimCmd = "let g:loaded_netrwPlugin=1 | let g:loaded_netrw=1 | set mouse=a autoread updatetime=300 signcolumn=no noswapfile | hi WinSeparator guifg=#1c1c1c guibg=#1c1c1c ctermfg=234 ctermbg=234 | hi VertSplit guifg=#1c1c1c guibg=#1c1c1c ctermfg=234 ctermbg=234 | hi StatusLine guifg=#bcbcbc guibg=#1c1c1c ctermfg=250 ctermbg=234 | hi StatusLineNC guifg=#585858 guibg=#1c1c1c ctermfg=240 ctermbg=234 | hi NeoTreeWinSeparator guifg=#1c1c1c guibg=#1c1c1c ctermfg=234 ctermbg=234";
38561
38567
  const luaBootstrap = "lua " + [
38562
38568
  'local lp = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"',
38563
38569
  'if not vim.loop.fs_stat(lp) then pcall(vim.fn.system, {"git", "clone", "--filter=blob:none", "--depth=1", "https://github.com/folke/lazy.nvim.git", "--branch=stable", lp}) end',
@@ -38603,9 +38609,12 @@ async function startNeovimMode(opts) {
38603
38609
  nvimPty.onData((data) => {
38604
38610
  if (state.cleanedUp)
38605
38611
  return;
38606
- const filtered = data.replace(PTY_MODE_ENABLE_RE, "");
38612
+ let filtered = data.replace(PTY_MODE_ENABLE_RE, "");
38607
38613
  if (!filtered)
38608
38614
  return;
38615
+ if (topOffset > 0) {
38616
+ filtered = filtered.replace(/\x1B\[(\d+)(;\d+)?H/g, (_m, row, col) => `\x1B[${parseInt(row) + topOffset}${col ?? ""}H`);
38617
+ }
38609
38618
  if (!state.focused) {
38610
38619
  process.stdout.write("\x1B7" + filtered + "\x1B8");
38611
38620
  } else {
@@ -38644,8 +38653,22 @@ async function startNeovimMode(opts) {
38644
38653
  return;
38645
38654
  }
38646
38655
  if (state.focused) {
38647
- const normalized = seq.replace(/\x1BO([ABCD])/g, "\x1B[$1");
38648
- nvimPty.write(normalized);
38656
+ let normalized = seq.replace(/\x1BO([ABCD])/g, "\x1B[$1");
38657
+ if (topOffset > 0) {
38658
+ normalized = normalized.replace(/\x1B\[<(\d+);(\d+);(\d+)([Mm])/g, (_m, btn, col, row, suffix) => {
38659
+ const hostRow = parseInt(row);
38660
+ if (parseInt(btn) === 0 && suffix === "M" && hostRow > topOffset + ptyRows) {
38661
+ toggleFocus(state);
38662
+ return "";
38663
+ }
38664
+ if (hostRow <= topOffset)
38665
+ return "";
38666
+ const nvimRow = hostRow - topOffset;
38667
+ return `\x1B[<${btn};${col};${nvimRow}${suffix}`;
38668
+ });
38669
+ }
38670
+ if (normalized)
38671
+ nvimPty.write(normalized);
38649
38672
  }
38650
38673
  };
38651
38674
  stdin.on("data", state.stdinHandler);
@@ -38873,7 +38896,8 @@ function doCleanup(state) {
38873
38896
  }
38874
38897
  }
38875
38898
  _state = null;
38876
- process.stdout.write("\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[H\x1B[J");
38899
+ const termRows = process.stdout.rows ?? 24;
38900
+ process.stdout.write(`\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1015l\x1B[?1004l\x1B[?2004l\x1B[1;${termRows}r\x1B[H\x1B[J`);
38877
38901
  state.opts.onExit?.();
38878
38902
  }
38879
38903
  var isTTY5, PTY_MODE_ENABLE_RE, STDIN_MOUSE_FOCUS_RE, _state;
@@ -38882,7 +38906,7 @@ var init_neovim_mode = __esm({
38882
38906
  "use strict";
38883
38907
  init_setup();
38884
38908
  isTTY5 = process.stdout.isTTY ?? false;
38885
- PTY_MODE_ENABLE_RE = /\x1B\[\?(?:1000|1002|1003|1004|1005|1006|1015|2004)h/g;
38909
+ PTY_MODE_ENABLE_RE = /\x1B\[\?(?:1004|2004)h/g;
38886
38910
  STDIN_MOUSE_FOCUS_RE = /\x1B\[<[\d;]+[Mm]|\x1B\[M[\s\S]{3}|\x1B\[[IO]|\x1BO[ABCD]/g;
38887
38911
  _state = null;
38888
38912
  }
@@ -42203,6 +42227,8 @@ async function handleSlashCommand(input, ctx) {
42203
42227
  cwd: ctx.repoRoot,
42204
42228
  contentRows,
42205
42229
  cols,
42230
+ topOffset: 3,
42231
+ // start below 3-row banner
42206
42232
  rl: ctx.rl,
42207
42233
  initialFile: arg || void 0,
42208
42234
  onExit: () => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "open-agents-ai",
3
- "version": "0.138.94",
3
+ "version": "0.138.95",
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",