nexrall-code 0.5.106 → 0.5.107

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 +38 -34
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -3102,6 +3102,34 @@ var require_types = __commonJS({
3102
3102
  }
3103
3103
  });
3104
3104
 
3105
+ // ../core/dist/util/safeSlice.js
3106
+ var require_safeSlice = __commonJS({
3107
+ "../core/dist/util/safeSlice.js"(exports2) {
3108
+ "use strict";
3109
+ Object.defineProperty(exports2, "__esModule", { value: true });
3110
+ exports2.sliceSafeEnd = sliceSafeEnd;
3111
+ exports2.sliceSafeStart = sliceSafeStart;
3112
+ function sliceSafeEnd(s2, max) {
3113
+ if (s2.length <= max)
3114
+ return s2;
3115
+ let end = max;
3116
+ const code = s2.charCodeAt(end - 1);
3117
+ if (code >= 55296 && code <= 56319)
3118
+ end--;
3119
+ return s2.slice(0, end);
3120
+ }
3121
+ function sliceSafeStart(s2, from) {
3122
+ if (from <= 0)
3123
+ return s2;
3124
+ let start = from;
3125
+ const code = s2.charCodeAt(start);
3126
+ if (code >= 56320 && code <= 57343)
3127
+ start++;
3128
+ return s2.slice(start);
3129
+ }
3130
+ }
3131
+ });
3132
+
3105
3133
  // ../core/dist/auth/index.js
3106
3134
  var require_auth = __commonJS({
3107
3135
  "../core/dist/auth/index.js"(exports2) {
@@ -13701,34 +13729,6 @@ ${doc}` : sig || "No type information." };
13701
13729
  }
13702
13730
  });
13703
13731
 
13704
- // ../core/dist/util/safeSlice.js
13705
- var require_safeSlice = __commonJS({
13706
- "../core/dist/util/safeSlice.js"(exports2) {
13707
- "use strict";
13708
- Object.defineProperty(exports2, "__esModule", { value: true });
13709
- exports2.sliceSafeEnd = sliceSafeEnd;
13710
- exports2.sliceSafeStart = sliceSafeStart;
13711
- function sliceSafeEnd(s2, max) {
13712
- if (s2.length <= max)
13713
- return s2;
13714
- let end = max;
13715
- const code = s2.charCodeAt(end - 1);
13716
- if (code >= 55296 && code <= 56319)
13717
- end--;
13718
- return s2.slice(0, end);
13719
- }
13720
- function sliceSafeStart(s2, from) {
13721
- if (from <= 0)
13722
- return s2;
13723
- let start = from;
13724
- const code = s2.charCodeAt(start);
13725
- if (code >= 56320 && code <= 57343)
13726
- start++;
13727
- return s2.slice(start);
13728
- }
13729
- }
13730
- });
13731
-
13732
13732
  // ../../node_modules/.pnpm/docx@9.7.1/node_modules/docx/dist/index.cjs
13733
13733
  var require_dist2 = __commonJS({
13734
13734
  "../../node_modules/.pnpm/docx@9.7.1/node_modules/docx/dist/index.cjs"(exports2) {
@@ -100745,8 +100745,10 @@ Resolve the conflict (remove <<<<<<< / ======= / >>>>>>> markers and keep the in
100745
100745
  shell.output += chunk;
100746
100746
  if (shell.output.length > MAX_OUTPUT_CHARS) {
100747
100747
  const overflow = shell.output.length - MAX_OUTPUT_CHARS;
100748
- shell.output = shell.output.slice(overflow);
100749
- shell.readCursor = Math.max(0, shell.readCursor - overflow);
100748
+ const beforeLen = shell.output.length;
100749
+ shell.output = (0, safeSlice_1.sliceSafeStart)(shell.output, overflow);
100750
+ const actualDropped = beforeLen - shell.output.length;
100751
+ shell.readCursor = Math.max(0, shell.readCursor - actualDropped);
100750
100752
  shell.truncated = true;
100751
100753
  }
100752
100754
  };
@@ -100937,14 +100939,15 @@ ${r2.output}`;
100937
100939
  }
100938
100940
  if (head.length < HEAD_CHARS) {
100939
100941
  const room = HEAD_CHARS - head.length;
100940
- head += chunk.slice(0, room);
100941
- chunk = chunk.slice(room);
100942
+ const taken = (0, safeSlice_1.sliceSafeEnd)(chunk, room);
100943
+ head += taken;
100944
+ chunk = chunk.slice(taken.length);
100942
100945
  if (!chunk)
100943
100946
  return;
100944
100947
  }
100945
100948
  tail += chunk;
100946
100949
  if (tail.length > TAIL_CHARS) {
100947
- tail = tail.slice(tail.length - TAIL_CHARS);
100950
+ tail = (0, safeSlice_1.sliceSafeStart)(tail, tail.length - TAIL_CHARS);
100948
100951
  truncated = true;
100949
100952
  }
100950
100953
  };
@@ -104530,7 +104533,7 @@ ${tail}`;
104530
104533
  continue;
104531
104534
  if (text.length <= PRUNE_STUB_KEEP_CHARS + 80)
104532
104535
  continue;
104533
- const head = text.slice(0, PRUNE_STUB_KEEP_CHARS);
104536
+ const head = (0, safeSlice_1.sliceSafeEnd)(text, PRUNE_STUB_KEEP_CHARS);
104534
104537
  const omitted = text.length - head.length;
104535
104538
  targets.push({ block: b, head, omitted });
104536
104539
  total += omitted;
@@ -107462,6 +107465,7 @@ var require_dist3 = __commonJS({
107462
107465
  };
107463
107466
  Object.defineProperty(exports2, "__esModule", { value: true });
107464
107467
  __exportStar(require_types(), exports2);
107468
+ __exportStar(require_safeSlice(), exports2);
107465
107469
  __exportStar(require_auth(), exports2);
107466
107470
  __exportStar(require_client(), exports2);
107467
107471
  __exportStar(require_executor(), exports2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nexrall-code",
3
- "version": "0.5.106",
3
+ "version": "0.5.107",
4
4
  "description": "Nexrall Code — AI coding assistant for your terminal (headless agent for scripts, CI and automation)",
5
5
  "keywords": [
6
6
  "ai",