nexrall-code 0.5.83 → 0.5.85

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 +52 -31
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -55846,13 +55846,14 @@ function rowsOccupied(text, columns = process.stdout.columns || 80) {
55846
55846
  function padToBottom(rowsAlreadyPrinted, footerText2 = "") {
55847
55847
  const rows = process.stdout.rows;
55848
55848
  if (!process.stdout.isTTY || !rows)
55849
- return;
55849
+ return false;
55850
55850
  const chromeRows = bottomChromeRows({ footerText: footerText2, columns: process.stdout.columns ?? 80 });
55851
55851
  const filler = rows - rowsAlreadyPrinted - chromeRows - 2;
55852
55852
  const MIN_WORTHWHILE_FILLER = 3;
55853
55853
  if (filler < MIN_WORTHWHILE_FILLER)
55854
- return;
55854
+ return false;
55855
55855
  console.log("\n".repeat(filler - 1));
55856
+ return true;
55856
55857
  }
55857
55858
  var rowCounter = null;
55858
55859
  function startRowCount() {
@@ -55882,6 +55883,12 @@ function stopRowCount() {
55882
55883
  rowCounter = null;
55883
55884
  return rows;
55884
55885
  }
55886
+ function addRowCount(text) {
55887
+ if (!rowCounter)
55888
+ return;
55889
+ const columns = process.stdout.columns || 80;
55890
+ rowCounter.rows += rowsOccupied(text, columns);
55891
+ }
55885
55892
  var NEX_LOGO = [
55886
55893
  "\u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557 \u2588\u2588\u2557",
55887
55894
  "\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D\u255A\u2588\u2588\u2557\u2588\u2588\u2554\u255D",
@@ -65139,6 +65146,10 @@ var App2 = ({ onReady }) => {
65139
65146
  forceFullRedrawRef = null;
65140
65147
  };
65141
65148
  }, [forceFullRedraw]);
65149
+ const collapseStartupPadding = (0, import_react35.useCallback)(() => {
65150
+ process.stdout.write("\x1B[2J\x1B[H");
65151
+ setStaticKey((k) => k + 1);
65152
+ }, []);
65142
65153
  import_react35.default.useEffect(() => {
65143
65154
  onReady({
65144
65155
  print,
@@ -65151,7 +65162,8 @@ var App2 = ({ onReady }) => {
65151
65162
  onInterrupt,
65152
65163
  onExit,
65153
65164
  setBusy,
65154
- close: () => requestExit(false)
65165
+ close: () => requestExit(false),
65166
+ collapseStartupPadding
65155
65167
  });
65156
65168
  }, []);
65157
65169
  const slices = renderInputSlices(line, cursorPos);
@@ -65193,34 +65205,36 @@ function startInkTerminal() {
65193
65205
  }
65194
65206
  ),
65195
65207
  {
65196
- exitOnCtrlC: false,
65197
- // Opt into the Kitty keyboard protocol so `key.shift` is actually
65198
- // populated for Enter (see the Shift+Enter handling in useInput
65199
- // above) instead of always being false/undefined.
65208
+ exitOnCtrlC: false
65209
+ // `kittyKeyboard` is deliberately OMITTED no option object at all,
65210
+ // matching the real `claude` binary exactly (verified: capturing
65211
+ // claude's raw startup bytes in a pty shows no `\x1b[>1u` enable
65212
+ // sequence and no `\x1b[?u` query anywhere in its output; it relies
65213
+ // purely on ordinary UTF-8 keystrokes). Ink's own opt-in check
65214
+ // (`if (!this.options.kittyKeyboard) return;` in ink.js) then does
65215
+ // nothing at all: no enable sequence is ever written to the terminal.
65200
65216
  //
65201
- // MUST be 'enabled', not 'auto'. 'auto' has Ink send a CSI `?u` query
65202
- // to the terminal and then listen on `stdin`'s 'data' event for the
65203
- // reply (see ink/build/ink.js confirmKittySupport). That listener
65204
- // races Ink's own input pipeline, which reads stdin via 'readable' +
65205
- // `.read()` (paused mode) for its normal keystroke handling Node
65206
- // streams do not support mixing 'data' (flowing) and 'readable'
65207
- // (paused) consumers safely, and in practice the 'readable' consumer
65208
- // wins the terminal's query response. The reply itself (`\x1b[?1u`)
65209
- // then gets fed through Ink's normal key parser, which doesn't
65210
- // recognise it as any special key and inserts it as literal text —
65211
- // this is exactly the "[?1u" that appears in the input box right
65212
- // after Ink mounts (e.g. right after confirming the trust prompt).
65217
+ // This used to be `{ mode: 'enabled', flags: [...] }`, to populate
65218
+ // `key.shift` on Enter for Shift+Enter detection. That traded away
65219
+ // more than the tradeoff docs here previously accounted for: the
65220
+ // protocol doesn't just risk an inert unrecognised escape sequence on
65221
+ // unsupporting terminals on a REAL Mac Terminal.app with the
65222
+ // system's built-in Vietnamese Telex input source active, enabling it
65223
+ // broke typing accented characters entirely (reported: chào/việt
65224
+ // could be typed in `claude` but not in `nex`, same machine, same
65225
+ // input source, only the enable sequence differed between the two
65226
+ // binaries confirmed by pty-capturing both). The Kitty protocol
65227
+ // shifts key delivery from "already-composed UTF-8 text" to
65228
+ // raw keycodes, which is exactly the layer an IME's composition
65229
+ // depends on; some terminals that don't fully implement the protocol
65230
+ // still react to the enable sequence by changing how they hand off
65231
+ // composed IME text, rather than silently ignoring it as intended.
65213
65232
  //
65214
- // 'enabled' skips the query/response dance entirely: Ink just writes
65215
- // the enable sequence once (`\x1b[>1u`) and never listens for a
65216
- // reply, so there is nothing to leak into the input box. Terminals
65217
- // that don't support the protocol silently ignore the unrecognised
65218
- // escape sequence (the same way they ignore bracketed-paste mode),
65219
- // so Shift+Enter still safely falls back to the '\' continuation
65220
- // there — this trades "verify support first" for "assume support,
65221
- // no-op if absent", which is safe here because the only visible
65222
- // effect of enabling on an unsupporting terminal is nothing at all.
65223
- kittyKeyboard: { mode: "enabled", flags: ["disambiguateEscapeCodes"] }
65233
+ // Shift+Enter therefore no longer gets a distinguishable `key.shift`
65234
+ // on any terminal it always submits, same as plain Enter, exactly
65235
+ // matching claude's own behavior. The existing "\" continuation for
65236
+ // multi-line input (chat.ts) remains the way to enter a literal
65237
+ // newline, unchanged.
65224
65238
  }
65225
65239
  );
65226
65240
  });
@@ -66020,8 +66034,10 @@ Set ${TRUST_ENV_VAR}=1 to confirm non-interactively, or run \`nex\` interactivel
66020
66034
  tips
66021
66035
  };
66022
66036
  if (interactive) {
66023
- getInkTerminal().print(renderBanner({ ...bannerInfo, columns: process.stdout.columns ?? 80 }), { isBanner: true });
66037
+ const bannerCard = renderBanner({ ...bannerInfo, columns: process.stdout.columns ?? 80 });
66038
+ getInkTerminal().print(bannerCard, { isBanner: true });
66024
66039
  getInkTerminal().setBannerRegenerator((columns) => renderBanner({ ...bannerInfo, columns }));
66040
+ addRowCount(bannerCard);
66025
66041
  } else {
66026
66042
  console.log(renderBanner({ ...bannerInfo, columns: process.stdout.columns ?? 80 }));
66027
66043
  }
@@ -66174,9 +66190,10 @@ ${text}` : "");
66174
66190
  }
66175
66191
  console.log(source_default.dim(" Type a message, /help for commands, or Ctrl+C to exit."));
66176
66192
  console.log();
66193
+ let startupPadded = false;
66177
66194
  if (interactive) {
66178
66195
  await flushInkFrame();
66179
- padToBottom(stopRowCount(), footerText({ mode: agentMode, autoApprove: isYoloMode() }));
66196
+ startupPadded = padToBottom(stopRowCount(), footerText({ mode: agentMode, autoApprove: isYoloMode() }));
66180
66197
  }
66181
66198
  let agentRunning = false;
66182
66199
  const abortSignal = { aborted: false };
@@ -66224,6 +66241,10 @@ ${text}` : "");
66224
66241
  rl.prompt();
66225
66242
  return;
66226
66243
  }
66244
+ if (startupPadded) {
66245
+ startupPadded = false;
66246
+ getInkTerminal().collapseStartupPadding();
66247
+ }
66227
66248
  if (userInput.startsWith("/")) {
66228
66249
  const parts = userInput.split(/\s+/);
66229
66250
  const cmd = parts[0];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.83",
3
+ "version": "0.5.85",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",