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.
- package/dist/index.js +52 -31
- 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
|
-
//
|
|
65198
|
-
//
|
|
65199
|
-
//
|
|
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
|
-
//
|
|
65202
|
-
//
|
|
65203
|
-
//
|
|
65204
|
-
//
|
|
65205
|
-
//
|
|
65206
|
-
//
|
|
65207
|
-
//
|
|
65208
|
-
//
|
|
65209
|
-
//
|
|
65210
|
-
//
|
|
65211
|
-
//
|
|
65212
|
-
//
|
|
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
|
-
//
|
|
65215
|
-
//
|
|
65216
|
-
//
|
|
65217
|
-
//
|
|
65218
|
-
//
|
|
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
|
-
|
|
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];
|