@ai-ecoverse/slicc-spectrum 1.67.1 → 1.68.1

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/slicc-ui.js CHANGED
@@ -11546,9 +11546,9 @@ var QrCode = class {
11546
11546
  }
11547
11547
  const result = [];
11548
11548
  for (let i26 = 0; i26 < blocks[0].length; i26++) {
11549
- blocks.forEach((block2, j5) => {
11549
+ blocks.forEach((block3, j5) => {
11550
11550
  if (i26 !== shortBlockLen - blockEccLen || j5 >= numShortBlocks)
11551
- result.push(block2[i26]);
11551
+ result.push(block3[i26]);
11552
11552
  });
11553
11553
  }
11554
11554
  return result;
@@ -11987,7 +11987,9 @@ function qrCode(text2, label) {
11987
11987
  }
11988
11988
 
11989
11989
  // src/app/reach.ts
11990
- var command = "npx @ai-ecoverse/slicc-node";
11990
+ var command = "curl -fsSL https://get.sliccy.ai/slicc | sh";
11991
+ var startCommand = "slicc";
11992
+ var nodeCommand = "npx sliccy@next";
11991
11993
  var reachStyles = i`
11992
11994
  .command {
11993
11995
  display: flex;
@@ -12000,22 +12002,48 @@ var reachStyles = i`
12000
12002
  code {
12001
12003
  flex: 1;
12002
12004
  min-width: 0;
12003
- overflow-wrap: anywhere;
12005
+ overflow-wrap: break-word;
12006
+ word-break: normal;
12004
12007
  font-family: var(--swc-code-font-family-stack);
12005
12008
  font-size: var(--swc-font-size-75);
12006
12009
  color: var(--swc-code-color);
12007
12010
  user-select: all;
12008
12011
  }
12012
+ .commands {
12013
+ display: grid;
12014
+ gap: var(--swc-spacing-100);
12015
+ }
12016
+ .commands p {
12017
+ margin: 0;
12018
+ font-size: var(--swc-font-size-75);
12019
+ color: var(--swc-neutral-subdued-content-color-default);
12020
+ }
12009
12021
  `;
12022
+ function block(text2, copied, copy, first2 = false) {
12023
+ const done2 = copied === text2;
12024
+ return b`<div class="command" data-command=${text2}>
12025
+ <code>${breakable(text2)}</code>
12026
+ <swc-action-button size="s" quiet data-action=${first2 ? "copy-command" : A} accessible-label=${done2 ? "Copied" : `Copy ${text2}`} @click=${() => copy(text2)}>
12027
+ <swc-icon-copy slot="icon"></swc-icon-copy>${done2 ? "Copied" : "Copy"}
12028
+ </swc-action-button>
12029
+ </div>`;
12030
+ }
12031
+ function breakable(text2) {
12032
+ return text2.split("/").map(
12033
+ (part2, index, parts2) => b`${part2}${index < parts2.length - 1 ? b`/<wbr />` : A}`
12034
+ );
12035
+ }
12010
12036
  function reach({ intro, extensionUrl, copied, uncopied, copy }) {
12011
12037
  return b`<p>${intro}</p>
12012
12038
  ${extensionUrl ? b`<p><a class="swc-Link" href=${extensionUrl} target="_blank" rel="noopener noreferrer" data-action="install-extension">Install the Chrome extension</a></p>` : A}
12013
- <p>To run slicc-node, enter this in a terminal:</p>
12014
- <div class="command">
12015
- <code>${command}</code>
12016
- <swc-action-button size="s" quiet data-action="copy-command" accessible-label=${copied ? "Copied" : "Copy command"} @click=${copy}>
12017
- <swc-icon-copy slot="icon"></swc-icon-copy>${copied ? "Copied" : "Copy"}
12018
- </swc-action-button>
12039
+ <p>To run slicc, enter this in a terminal:</p>
12040
+ <div class="commands">
12041
+ ${block(command, copied, copy, true)}
12042
+ ${block(startCommand, copied, copy)}
12043
+ </div>
12044
+ <div class="commands" data-commands="node">
12045
+ <p>With Node:</p>
12046
+ ${block(nodeCommand, copied, copy)}
12019
12047
  </div>
12020
12048
  ${uncopied ? b`<div class="error" role="alert" data-error="copy"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>Couldn’t copy. Select the command and copy it.</span></div>` : A}`;
12021
12049
  }
@@ -12167,7 +12195,8 @@ var networkHealth = {
12167
12195
  failing: ["negative", "Failing"]
12168
12196
  };
12169
12197
  var routes = {
12170
- proxy: "Through slicc-node, which reaches every site.",
12198
+ proxy: "Through slicc on this computer, which reaches every site.",
12199
+ link: "Through a linked device.",
12171
12200
  extension: "Through the SLICC Chrome extension, which reaches every site.",
12172
12201
  tailnet: "Through a Tailscale exit node, which reaches every site.",
12173
12202
  page: "Through this page\u2019s own fetch. Sites that block cross-origin requests are out of reach.",
@@ -12175,27 +12204,36 @@ var routes = {
12175
12204
  };
12176
12205
  var automation = {
12177
12206
  extension: "Browser automation: through the SLICC extension.",
12178
- proxy: "Browser automation: through slicc-node.",
12207
+ proxy: "Browser automation: through slicc on this computer.",
12179
12208
  link: "Browser automation: through a linked device.",
12180
- none: "Browser automation: not available. Install the extension, or run slicc-node or npx sliccy@next."
12209
+ none: "Browser automation: not available. Install the extension, or run slicc on this computer."
12181
12210
  };
12211
+ function exitDevice(status2) {
12212
+ const exit = status2.exit;
12213
+ return exit?.kind === "link" ? status2.links?.devices.find((device) => device.id === exit.id) : void 0;
12214
+ }
12215
+ function localExit(status2) {
12216
+ if (status2.exit?.kind === "link") return exitDevice(status2)?.mode === "local";
12217
+ return status2.route === "proxy";
12218
+ }
12182
12219
  function automationOf(browser) {
12183
12220
  return browser.via ?? "none";
12184
12221
  }
12185
- function browserLine(browser, links, route) {
12222
+ function browserLine(browser, status2) {
12186
12223
  const via = automationOf(browser);
12187
- if (via === "none" && route === "proxy")
12188
- return "Browser automation: slicc-node has no browser attached.";
12224
+ const local2 = localExit(status2);
12225
+ if (via === "none" && local2) return "slicc on this computer has no browser to control.";
12189
12226
  if (via !== "link") return automation[via];
12190
- const connected = (links?.devices ?? []).filter((device) => device.state === "connected");
12227
+ const connected = (status2.links?.devices ?? []).filter((device) => device.state === "connected");
12191
12228
  const found = connected.flatMap(
12192
- (device) => (device.browsers ?? []).map((item2) => ({ name: item2.name, device: device.name }))
12229
+ (device) => (device.browsers ?? []).map((item2) => ({ name: item2.name, device }))
12193
12230
  );
12231
+ if (found.length === 1 && found[0].device.mode === "local") return automation.proxy;
12194
12232
  if (found.length === 1)
12195
- return `Browser automation: through ${found[0].name} on the linked device ${found[0].device}.`;
12233
+ return `Browser automation: through ${found[0].name} on the linked device ${found[0].device.name}.`;
12196
12234
  if (found.length > 1)
12197
12235
  return `Browser automation: through ${found.length} browsers on linked devices.`;
12198
- return automation.link;
12236
+ return local2 ? automation.proxy : automation.link;
12199
12237
  }
12200
12238
  var tailnetStates = {
12201
12239
  off: ["neutral", "Off"],
@@ -12206,7 +12244,8 @@ var tailnetStates = {
12206
12244
  failed: ["negative", "Failed"]
12207
12245
  };
12208
12246
  var tailnetOnly = {
12209
- proxy: "Tailnet hosts only. Everything else goes through slicc-node.",
12247
+ proxy: "Tailnet hosts only. Everything else goes through slicc on this computer.",
12248
+ link: "Tailnet hosts only. Everything else goes through a linked device.",
12210
12249
  extension: "Tailnet hosts only. Everything else goes through the SLICC extension.",
12211
12250
  tailnet: "Everything goes through your tailnet.",
12212
12251
  page: "Tailnet hosts only. Everything else goes through this page\u2019s fetch.",
@@ -12215,6 +12254,13 @@ var tailnetOnly = {
12215
12254
  function tailnetAddress(addresses) {
12216
12255
  return addresses.find((address) => address.startsWith("100.")) ?? addresses[0];
12217
12256
  }
12257
+ function tailnetLine(status2) {
12258
+ const route = routeOf(status2) ?? "none";
12259
+ if (route !== "link") return tailnetOnly[route];
12260
+ if (localExit(status2)) return tailnetOnly.proxy;
12261
+ const device = exitDevice(status2);
12262
+ return device ? `Tailnet hosts only. Everything else goes through ${device.name}.` : tailnetOnly.link;
12263
+ }
12218
12264
  function exitNodeValue(tailnet) {
12219
12265
  if (tailnet.autoExitNode) return "auto";
12220
12266
  return tailnet.exitNodes?.find((node) => node.name === tailnet.exitNode)?.id ?? "none";
@@ -12360,14 +12406,15 @@ var wholeWeb = /* @__PURE__ */ new Set([
12360
12406
  function routeOf(status2) {
12361
12407
  return status2.exit?.kind === "link" ? "link" : status2.route;
12362
12408
  }
12363
- function linkLine(status2, id) {
12364
- const device = status2.links?.devices.find((item2) => item2.id === id);
12409
+ function linkLine(status2) {
12410
+ const device = exitDevice(status2);
12365
12411
  if (!device) return "Waiting for a linked device that isn\u2019t connected.";
12366
12412
  if (device.state !== "connected") return `Waiting for the linked device ${device.name}.`;
12413
+ if (device.mode === "local") return routes.proxy;
12367
12414
  return device.policy ? `Through the linked device ${device.name}, which reaches ${device.policy}.` : `Through the linked device ${device.name}.`;
12368
12415
  }
12369
12416
  function routeLine(status2) {
12370
- if (status2.exit?.kind === "link") return linkLine(status2, status2.exit.id);
12417
+ if (status2.exit?.kind === "link") return linkLine(status2);
12371
12418
  const node = status2.route === "tailnet" ? status2.tailnet?.exitNode : null;
12372
12419
  return node ? `Through the Tailscale exit node ${node}, which reaches every site.` : routes[status2.route ?? "none"];
12373
12420
  }
@@ -12427,7 +12474,7 @@ var SliccNetwork = class extends ModelElement {
12427
12474
  constructor() {
12428
12475
  super();
12429
12476
  this.checking = false;
12430
- this.copied = false;
12477
+ this.copied = null;
12431
12478
  this.uncopied = false;
12432
12479
  this.error = "";
12433
12480
  this.busy = "";
@@ -12794,9 +12841,9 @@ var SliccNetwork = class extends ModelElement {
12794
12841
  this.checking = false;
12795
12842
  }
12796
12843
  }
12797
- async copy() {
12798
- const done2 = await copyText(command);
12799
- this.copied = done2;
12844
+ async copy(text2 = command) {
12845
+ const done2 = await copyText(text2);
12846
+ this.copied = done2 ? text2 : null;
12800
12847
  this.uncopied = !done2;
12801
12848
  }
12802
12849
  async #act(action, run2, area) {
@@ -12905,7 +12952,7 @@ var SliccNetwork = class extends ModelElement {
12905
12952
  ${tailnet.exitNodes.map((node) => b`<sp-menu-item value=${node.id} ?disabled=${!node.online}>${node.name}${node.online ? A : b`<span slot="description">Offline</span>`}</sp-menu-item>`)}
12906
12953
  </sp-picker>
12907
12954
  </div>` : A}
12908
- <p data-exit=${tailnet.exitNode ? "node" : "none"}>${tailnet.exitNode ? `Internet through the exit node ${tailnet.exitNode}.` : tailnetOnly[status2.route ?? "none"]}</p>`;
12955
+ <p data-exit=${tailnet.exitNode ? "node" : "none"}>${tailnet.exitNode ? `Internet through the exit node ${tailnet.exitNode}.` : tailnetLine(status2)}</p>`;
12909
12956
  }
12910
12957
  #exitLine(port, status2) {
12911
12958
  const exit = status2.exit;
@@ -13165,7 +13212,7 @@ var SliccNetwork = class extends ModelElement {
13165
13212
  <p data-route=${routeOf(status2) ?? "none"}>${routeLine(status2)}</p>
13166
13213
  ${status2.detail ? b`<p class="detail">${status2.detail}</p>` : A}
13167
13214
  ${this.#exitPicker(port, status2)}
13168
- ${status2.browser ? b`<p data-browser=${automationOf(status2.browser)}>${browserLine(status2.browser, status2.links, status2.route)}${status2.browser.detail ? b` <span class="detail">${status2.browser.detail}</span>` : A}</p>` : A}
13215
+ ${status2.browser ? b`<p data-browser=${automationOf(status2.browser)}>${browserLine(status2.browser, status2)}${status2.browser.detail ? b` <span class="detail">${status2.browser.detail}</span>` : A}</p>` : A}
13169
13216
  ${port.check ? b`<div class="actions"><swc-button size="m" variant="secondary" data-action="check" ?pending=${this.checking} @click=${() => this.check()}>Check again</swc-button></div>` : A}
13170
13217
  ${this.error ? b`<div class="error" role="alert"><swc-icon-alert-triangle size="s" aria-hidden="true"></swc-icon-alert-triangle><span>${this.error}</span></div>` : A}
13171
13218
  </section>`;
@@ -13201,11 +13248,11 @@ var SliccNetwork = class extends ModelElement {
13201
13248
  }
13202
13249
  #ways(status2) {
13203
13250
  return reach({
13204
- intro: "Install the SLICC Chrome extension, or run slicc-node on this computer. Either one reaches every site.",
13251
+ intro: "Install the SLICC extension, or run slicc on this computer. Either one reaches every site.",
13205
13252
  extensionUrl: status2.extensionUrl,
13206
13253
  copied: this.copied,
13207
13254
  uncopied: this.uncopied,
13208
- copy: () => this.copy()
13255
+ copy: (text2) => this.copy(text2)
13209
13256
  });
13210
13257
  }
13211
13258
  #whole(status2) {
@@ -14351,22 +14398,8 @@ var SliccTerminalPanel = class extends ThemedElement {
14351
14398
  const host4 = this.getRootNode().host;
14352
14399
  const panel = host4?.localName === "slicc-dock" ? host4.api.getPanel(terminalPanel(id)) : void 0;
14353
14400
  if (!panel) return Promise.resolve(false);
14354
- if (!document.hidden) return this.#seen(panel, screen).then(() => false);
14355
- if (laid(screen.getBoundingClientRect())) return Promise.resolve(true);
14356
- return new Promise((resolve2) => {
14357
- const done2 = (hidden) => {
14358
- watch.dispose();
14359
- document.removeEventListener("visibilitychange", visible2);
14360
- resolve2(hidden);
14361
- };
14362
- const watch = panel.api.onDidDimensionsChange((size4) => {
14363
- if (laid(size4)) done2(true);
14364
- });
14365
- const visible2 = () => {
14366
- if (!document.hidden) done2(false);
14367
- };
14368
- document.addEventListener("visibilitychange", visible2);
14369
- }).then((hidden) => hidden || this.#seen(panel, screen).then(() => false));
14401
+ if (document.hidden) return Promise.resolve(true);
14402
+ return this.#seen(panel, screen).then(() => false);
14370
14403
  }
14371
14404
  #seen(panel, screen) {
14372
14405
  const sized = laid(panel.api) ? Promise.resolve() : new Promise((resolve2) => {
@@ -20303,7 +20336,7 @@ function list2(lines) {
20303
20336
  return { type: "list", ordered: ordered2, items };
20304
20337
  }
20305
20338
  var starts = /^(```|#{1,4}\s|\s*\||>\s?|---\s*$)/;
20306
- function block(lines, i26) {
20339
+ function block2(lines, i26) {
20307
20340
  const line = lines[i26];
20308
20341
  if (line.startsWith("```")) return fence(lines, i26);
20309
20342
  const heading = line.match(/^(#{1,4})\s+(.*)$/);
@@ -20341,7 +20374,7 @@ function parse2(text2) {
20341
20374
  const blocks = [];
20342
20375
  let i26 = 0;
20343
20376
  while (i26 < lines.length) {
20344
- const [next, end] = block(lines, i26);
20377
+ const [next, end] = block2(lines, i26);
20345
20378
  if (next) blocks.push(next);
20346
20379
  i26 = end;
20347
20380
  }
@@ -24548,7 +24581,7 @@ var SliccBrowser = class extends ModelElement {
24548
24581
  this.requestUpdate();
24549
24582
  }
24550
24583
  async #copyCommand(text2) {
24551
- this.#command = await copyText(text2);
24584
+ this.#command = await copyText(text2) && text2;
24552
24585
  this.requestUpdate();
24553
24586
  }
24554
24587
  #who(tab) {
@@ -24700,11 +24733,11 @@ var SliccBrowser = class extends ModelElement {
24700
24733
  <span slot="description">Agents can’t open or use browser tabs yet.</span>
24701
24734
  </swc-illustrated-message>
24702
24735
  <div class="reach">${reach({
24703
- intro: "Install the SLICC Chrome extension, or run slicc-node on this computer. Either one lets agents use this browser.",
24736
+ intro: "Install the SLICC extension, or run slicc on this computer.",
24704
24737
  extensionUrl: status2?.extensionUrl,
24705
- copied: this.#command === true,
24738
+ copied: this.#command || null,
24706
24739
  uncopied: this.#command === false,
24707
- copy: () => this.#copyCommand(command)
24740
+ copy: (text2) => this.#copyCommand(text2)
24708
24741
  })}</div>
24709
24742
  </div></div>`;
24710
24743
  }
@@ -24958,7 +24991,8 @@ var SliccChanges = class extends ModelElement {
24958
24991
  background: var(--swc-background-layer-1-color);
24959
24992
  }
24960
24993
  code {
24961
- overflow-wrap: anywhere;
24994
+ overflow-wrap: break-word;
24995
+ word-break: normal;
24962
24996
  font-family: var(--swc-code-font-family-stack);
24963
24997
  font-size: var(--swc-font-size-75);
24964
24998
  color: var(--swc-code-color);
@@ -25160,7 +25194,7 @@ var SliccChanges = class extends ModelElement {
25160
25194
  <p data-unavailable>${parts2.map((part2) => typeof part2 === "string" ? part2 : b`<code>${part2.code}</code>`)}</p>
25161
25195
  ${codes.map(
25162
25196
  (code2) => b`<div class="command" data-command=${code2}>
25163
- <code>${code2}</code>
25197
+ <code>${breakable(code2)}</code>
25164
25198
  <swc-action-button size="s" quiet data-action="copy-command" accessible-label=${this.copied === code2 ? "Copied" : `Copy ${code2}`} @click=${() => this.copy(code2)}>
25165
25199
  <swc-icon-copy slot="icon"></swc-icon-copy>${this.copied === code2 ? "Copied" : "Copy"}
25166
25200
  </swc-action-button>
@@ -50009,13 +50043,13 @@ function realignChangeContentBySimilarity(diff) {
50009
50043
  function slideBlankBoundaryBlocksUp(hunk, diff, resolveSlide) {
50010
50044
  const { hunkContent } = hunk;
50011
50045
  for (let index = 1; index < hunkContent.length; index++) {
50012
- const block2 = hunkContent[index];
50046
+ const block3 = hunkContent[index];
50013
50047
  const previous = hunkContent[index - 1];
50014
- if (block2.type !== "change" || block2.additions > 0 && block2.deletions > 0 || previous.type !== "context") continue;
50015
- const isInsert = block2.additions > 0;
50048
+ if (block3.type !== "change" || block3.additions > 0 && block3.deletions > 0 || previous.type !== "context") continue;
50049
+ const isInsert = block3.additions > 0;
50016
50050
  const lines = isInsert ? diff.additionLines : diff.deletionLines;
50017
- const blockStart = isInsert ? block2.additionLineIndex : block2.deletionLineIndex;
50018
- const blockLength = isInsert ? block2.additions : block2.deletions;
50051
+ const blockStart = isInsert ? block3.additionLineIndex : block3.deletionLineIndex;
50052
+ const blockLength = isInsert ? block3.additions : block3.deletions;
50019
50053
  const unit = lines[blockStart] ?? "";
50020
50054
  if (unit.trim() !== "") continue;
50021
50055
  let uniform = true;
@@ -50029,13 +50063,13 @@ function slideBlankBoundaryBlocksUp(hunk, diff, resolveSlide) {
50029
50063
  if (slide === 0) continue;
50030
50064
  if (index === 1 && slide === previous.lines) continue;
50031
50065
  if (resolveSlide != null) {
50032
- slide = resolveSlide(block2, slide);
50066
+ slide = resolveSlide(block3, slide);
50033
50067
  if (slide === 0) continue;
50034
50068
  }
50035
- block2.additionLineIndex -= slide;
50036
- block2.deletionLineIndex -= slide;
50037
- const blockAdditionEnd = block2.additionLineIndex + block2.additions;
50038
- const blockDeletionEnd = block2.deletionLineIndex + block2.deletions;
50069
+ block3.additionLineIndex -= slide;
50070
+ block3.deletionLineIndex -= slide;
50071
+ const blockAdditionEnd = block3.additionLineIndex + block3.additions;
50072
+ const blockDeletionEnd = block3.deletionLineIndex + block3.deletions;
50039
50073
  const next = hunkContent[index + 1];
50040
50074
  if (next?.type === "context") {
50041
50075
  next.lines += slide;
@@ -52888,13 +52922,13 @@ function parseSessionChangeBlocks(diff, parseDiffOptions, getPreviousAdditionLin
52888
52922
  lang: diff.lang
52889
52923
  }, parseDiffOptions);
52890
52924
  let previousBlocks;
52891
- const resolveSlide = (block2, maxSlide) => {
52925
+ const resolveSlide = (block3, maxSlide) => {
52892
52926
  previousBlocks ??= collectPureChangeBlocks(diff.hunks);
52893
52927
  for (let offset3 = 0; offset3 <= maxSlide; offset3++) {
52894
- const previous = previousBlocks.get(block2.deletionLineIndex - offset3);
52895
- if (previous == null || previous.additions !== block2.additions || previous.deletions !== block2.deletions) continue;
52896
- if (block2.additions > 0 && getPreviousAdditionLine != null) {
52897
- for (let line = 0; line < block2.additions; line++) if (getPreviousAdditionLine(previous.additionLineIndex + line) !== parsed.additionLines[block2.additionLineIndex + line]) return maxSlide;
52928
+ const previous = previousBlocks.get(block3.deletionLineIndex - offset3);
52929
+ if (previous == null || previous.additions !== block3.additions || previous.deletions !== block3.deletions) continue;
52930
+ if (block3.additions > 0 && getPreviousAdditionLine != null) {
52931
+ for (let line = 0; line < block3.additions; line++) if (getPreviousAdditionLine(previous.additionLineIndex + line) !== parsed.additionLines[block3.additionLineIndex + line]) return maxSlide;
52898
52932
  }
52899
52933
  return offset3;
52900
52934
  }
@@ -52914,12 +52948,12 @@ function parseSessionChangeBlocks(diff, parseDiffOptions, getPreviousAdditionLin
52914
52948
  coveredDeletions += content.lines;
52915
52949
  continue;
52916
52950
  }
52917
- const block2 = offsetHunkContent(content, 0, 0);
52918
- if (block2.additions === 0) block2.additionLineIndex = coveredAdditions;
52919
- if (block2.deletions === 0) block2.deletionLineIndex = coveredDeletions;
52920
- blocks.push(block2);
52921
- coveredAdditions += block2.additions;
52922
- coveredDeletions += block2.deletions;
52951
+ const block3 = offsetHunkContent(content, 0, 0);
52952
+ if (block3.additions === 0) block3.additionLineIndex = coveredAdditions;
52953
+ if (block3.deletions === 0) block3.deletionLineIndex = coveredDeletions;
52954
+ blocks.push(block3);
52955
+ coveredAdditions += block3.additions;
52956
+ coveredDeletions += block3.deletions;
52923
52957
  }
52924
52958
  }
52925
52959
  return blocks;
@@ -52944,9 +52978,9 @@ function buildRegionPlans(previousHunks, blocks, deletionLineCount) {
52944
52978
  });
52945
52979
  const plans = [];
52946
52980
  let previousIndex = 0;
52947
- for (const block2 of blocks) {
52948
- const blockStart = block2.deletionLineIndex;
52949
- const blockEnd = blockStart + block2.deletions;
52981
+ for (const block3 of blocks) {
52982
+ const blockStart = block3.deletionLineIndex;
52983
+ const blockEnd = blockStart + block3.deletions;
52950
52984
  while (previousIndex < previousPlans.length && previousPlans[previousIndex].deletionEnd < blockStart) {
52951
52985
  plans.push(previousPlans[previousIndex]);
52952
52986
  previousIndex++;
@@ -52959,7 +52993,7 @@ function buildRegionPlans(previousHunks, blocks, deletionLineCount) {
52959
52993
  if (plan == null) {
52960
52994
  let deletionStart = blockStart;
52961
52995
  let deletionEnd = blockEnd;
52962
- if ((block2.deletions === 0 || block2.additions === 0) && deletionLineCount > block2.deletions) {
52996
+ if ((block3.deletions === 0 || block3.additions === 0) && deletionLineCount > block3.deletions) {
52963
52997
  const previousEnd = plans[plans.length - 1]?.deletionEnd ?? 0;
52964
52998
  const nextStart = previousPlans[previousIndex]?.deletionStart ?? deletionLineCount;
52965
52999
  if (blockStart > previousEnd) deletionStart--;
@@ -52974,7 +53008,7 @@ function buildRegionPlans(previousHunks, blocks, deletionLineCount) {
52974
53008
  }
52975
53009
  plan.deletionStart = Math.min(plan.deletionStart, blockStart);
52976
53010
  plan.deletionEnd = Math.max(plan.deletionEnd, blockEnd);
52977
- plan.blocks.push(block2);
53011
+ plan.blocks.push(block3);
52978
53012
  plans.push(plan);
52979
53013
  }
52980
53014
  while (previousIndex < previousPlans.length) {