nexrall-code 0.5.33 → 0.5.34

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 -19
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -24543,8 +24543,9 @@ async function updateCommand(opts) {
24543
24543
 
24544
24544
  // src/ui/screen.ts
24545
24545
  function enableAltScreen() {
24546
- if (process.stdout.isTTY)
24547
- process.stdout.write("\x1B[?1049h");
24546
+ if (!process.stdout.isTTY)
24547
+ return;
24548
+ process.stdout.write("\x1B[?1049h\x1B[2J\x1B[H");
24548
24549
  }
24549
24550
  function disableAltScreen() {
24550
24551
  if (process.stdout.isTTY)
@@ -24651,13 +24652,25 @@ function clearStatusFooter() {
24651
24652
  lastFooterText = "";
24652
24653
  }
24653
24654
  var splitScreenActive = false;
24654
- var RESERVED_ROWS = 2;
24655
+ var RESERVED_ROWS = 3;
24655
24656
  function contentBottomRow() {
24656
24657
  return Math.max(1, (process.stdout.rows || 24) - RESERVED_ROWS);
24657
24658
  }
24659
+ function separatorRow() {
24660
+ return Math.max(1, (process.stdout.rows || 24) - 2);
24661
+ }
24658
24662
  function inputRow() {
24659
24663
  return Math.max(1, (process.stdout.rows || 24) - 1);
24660
24664
  }
24665
+ function drawInputSeparator() {
24666
+ if (!process.stdout.isTTY || !process.stdout.rows)
24667
+ return;
24668
+ const row = separatorRow();
24669
+ const cols = process.stdout.columns || 80;
24670
+ process.stdout.write(
24671
+ `\x1B7\x1B[${row};1H\x1B[2K` + source_default.dim("\u2500".repeat(cols)) + "\x1B8"
24672
+ );
24673
+ }
24661
24674
  function enableSplitScreen() {
24662
24675
  if (!process.stdout.isTTY || !process.stdout.rows)
24663
24676
  return;
@@ -24667,6 +24680,7 @@ function enableSplitScreen() {
24667
24680
  `\x1B[1;${bottom}r\x1B[${bottom};1H`
24668
24681
  // park cursor at the bottom of that region
24669
24682
  );
24683
+ drawInputSeparator();
24670
24684
  }
24671
24685
  function disableSplitScreen() {
24672
24686
  if (!process.stdout.isTTY)
@@ -24684,24 +24698,23 @@ function drawInputLine(promptText, line, cursorPos) {
24684
24698
  return;
24685
24699
  const row = inputRow();
24686
24700
  const cols = process.stdout.columns || 80;
24687
- const full = promptText + line;
24688
24701
  const promptLen = visibleLen(promptText);
24689
- let caretIdx = promptLen + cursorPos;
24690
- let display = full;
24691
- if (visibleLen(full) >= cols) {
24692
- const overflow = visibleLen(full) - cols + 1;
24693
- const shift = Math.max(0, Math.min(overflow, caretIdx));
24694
- display = full.slice(shift);
24695
- caretIdx -= shift;
24696
- }
24697
- let rendered;
24698
- if (caretIdx >= 0 && caretIdx < display.length) {
24699
- rendered = display.slice(0, caretIdx) + source_default.inverse(display[caretIdx]) + display.slice(caretIdx + 1);
24702
+ const availableForLine = Math.max(1, cols - promptLen - 1);
24703
+ let visibleLine = line;
24704
+ let caretIdx = cursorPos;
24705
+ if (line.length > availableForLine) {
24706
+ const shift = Math.max(0, Math.min(line.length - availableForLine, cursorPos));
24707
+ visibleLine = line.slice(shift, shift + availableForLine);
24708
+ caretIdx = cursorPos - shift;
24709
+ }
24710
+ let renderedLine;
24711
+ if (caretIdx >= 0 && caretIdx < visibleLine.length) {
24712
+ renderedLine = visibleLine.slice(0, caretIdx) + source_default.inverse(visibleLine[caretIdx]) + visibleLine.slice(caretIdx + 1);
24700
24713
  } else {
24701
- rendered = display + source_default.inverse(" ");
24714
+ renderedLine = visibleLine + source_default.inverse(" ");
24702
24715
  }
24703
24716
  const out = `\x1B7\x1B[${row};1H\x1B[2K` + // clear it
24704
- rendered + "\x1B8";
24717
+ promptText + renderedLine + "\x1B8";
24705
24718
  process.stdout.write(out);
24706
24719
  }
24707
24720
  function clearInputLine() {
@@ -24751,7 +24764,7 @@ function createSilentOutput() {
24751
24764
  }
24752
24765
 
24753
24766
  // src/commands/chat.ts
24754
- var CLI_VERSION = "0.5.33";
24767
+ var CLI_VERSION = "0.5.34";
24755
24768
  var MODEL_LABELS = {
24756
24769
  turbo: "Nexrall Turbo",
24757
24770
  pro: "Nexrall Pro",
@@ -26204,7 +26217,7 @@ function pluginListCommand() {
26204
26217
 
26205
26218
  // src/index.ts
26206
26219
  var program2 = new Command();
26207
- program2.name("nex").description("Nexrall Code \u2014 AI coding assistant (powered by Nexrall)").version("0.5.33");
26220
+ program2.name("nex").description("Nexrall Code \u2014 AI coding assistant (powered by Nexrall)").version("0.5.34");
26208
26221
  program2.command("auth").description("Login to your Nexrall account").action(authCommand);
26209
26222
  program2.command("logout").description("Log out of your Nexrall account").action(logoutCommand);
26210
26223
  program2.command("update").description("Update nex to the latest version").option("-c, --check", "Check for updates without installing").option("-y, --yes", "Skip confirmation prompt").action(async (opts) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.33",
3
+ "version": "0.5.34",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",