nexrall-code 0.5.80 → 0.5.81

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 +57 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -64824,6 +64824,36 @@ function askForTrust(workDir, signals) {
64824
64824
 
64825
64825
  // src/ui/inkTerminal.tsx
64826
64826
  var import_react35 = __toESM(require_react(), 1);
64827
+
64828
+ // src/ui/resizeRepaint.ts
64829
+ var defaultDeps = {
64830
+ setTimeout: (fn, ms) => setTimeout(fn, ms),
64831
+ clearTimeout: (handle2) => clearTimeout(handle2)
64832
+ };
64833
+ function createResizeDebouncer(settleMs, onSettle, deps = defaultDeps) {
64834
+ let timer = null;
64835
+ let disposed = false;
64836
+ const notify = () => {
64837
+ if (disposed)
64838
+ return;
64839
+ if (timer !== null)
64840
+ deps.clearTimeout(timer);
64841
+ timer = deps.setTimeout(() => {
64842
+ timer = null;
64843
+ onSettle();
64844
+ }, settleMs);
64845
+ };
64846
+ const dispose = () => {
64847
+ disposed = true;
64848
+ if (timer !== null) {
64849
+ deps.clearTimeout(timer);
64850
+ timer = null;
64851
+ }
64852
+ };
64853
+ return { notify, dispose };
64854
+ }
64855
+
64856
+ // src/ui/inkTerminal.tsx
64827
64857
  function footerText(info) {
64828
64858
  const modeLabel = info.autoApprove ? "yolo mode on" : info.mode === "plan" ? "plan mode on" : info.mode === "edit" ? "edit mode on" : info.mode === "ask" ? "ask mode on" : "auto mode on";
64829
64859
  return `${modeLabel} \xB7 /help for shortcuts \xB7 /agents for agents`;
@@ -64898,6 +64928,19 @@ function decideCtrlC(state) {
64898
64928
  var handle = null;
64899
64929
  var inkInstance = null;
64900
64930
  var idCounter = 0;
64931
+ var resizeDebouncer = null;
64932
+ var resizeListenerAttached = false;
64933
+ var RESIZE_SETTLE_MS = 120;
64934
+ function repaintAfterResizeSettle() {
64935
+ const instance = inkInstance;
64936
+ if (!instance || !process.stdout.isTTY)
64937
+ return;
64938
+ void instance.waitUntilRenderFlush().then(() => {
64939
+ if (inkInstance !== instance)
64940
+ return;
64941
+ process.stdout.write("\x1B[0J");
64942
+ });
64943
+ }
64901
64944
  var DEFAULT_PROMPT = colors.primary.bold("> ");
64902
64945
  var App2 = ({ onReady }) => {
64903
64946
  const [items, setItems] = (0, import_react35.useState)([]);
@@ -65113,6 +65156,7 @@ function startInkTerminal() {
65113
65156
  {
65114
65157
  onReady: (h2) => {
65115
65158
  handle = h2;
65159
+ attachResizeCleanup();
65116
65160
  resolve3(h2);
65117
65161
  }
65118
65162
  }
@@ -65150,7 +65194,20 @@ function startInkTerminal() {
65150
65194
  );
65151
65195
  });
65152
65196
  }
65197
+ function attachResizeCleanup() {
65198
+ if (resizeListenerAttached || !process.stdout.isTTY)
65199
+ return;
65200
+ resizeListenerAttached = true;
65201
+ resizeDebouncer = createResizeDebouncer(RESIZE_SETTLE_MS, repaintAfterResizeSettle);
65202
+ process.stdout.on("resize", resizeDebouncer.notify);
65203
+ }
65153
65204
  function stopInkTerminal() {
65205
+ if (resizeDebouncer) {
65206
+ process.stdout.off("resize", resizeDebouncer.notify);
65207
+ resizeDebouncer.dispose();
65208
+ resizeDebouncer = null;
65209
+ }
65210
+ resizeListenerAttached = false;
65154
65211
  inkInstance?.unmount();
65155
65212
  inkInstance = null;
65156
65213
  handle = null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.80",
3
+ "version": "0.5.81",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",