@eliya-oss/agent-diff 0.1.0-alpha.163 → 0.1.0-alpha.164

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/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.164
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(diff): A stretch of code takes the first colour the highlighter gives it, so a `.tsx` file no longer paints tag names and identifiers as numbers where the highlighter answered with a name, a type and a constant for the same range.
8
+
3
9
  ## 0.1.0-alpha.163
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -11343,7 +11343,7 @@ var init_pane = __esmMin((() => {
11343
11343
  //#region package.json
11344
11344
  init_drafts();
11345
11345
  init_pane();
11346
- var version$1 = "0.1.0-alpha.163";
11346
+ var version$1 = "0.1.0-alpha.164";
11347
11347
  //#endregion
11348
11348
  //#region src/cli/upgrade.ts
11349
11349
  var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, ROUTES, asRoute, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf$1, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, SAY_SKILL_TOO, upgradeReport;
@@ -17069,7 +17069,7 @@ var init_theme = __esmMin((() => {
17069
17069
  "note.label": { fg: "#7aa2f7" },
17070
17070
  default: { fg: ink }
17071
17071
  };
17072
- })), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, REMARK_MARK$1, remarkHead, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
17072
+ })), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, firstOfEach, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, REMARK_MARK$1, remarkHead, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
17073
17073
  var init_diffview = __esmMin((() => {
17074
17074
  init_dist();
17075
17075
  init_patch();
@@ -17591,14 +17591,25 @@ var init_diffview = __esmMin((() => {
17591
17591
  line += 1;
17592
17592
  }
17593
17593
  };
17594
+ firstOfEach = (found) => {
17595
+ const seen = /* @__PURE__ */ new Set();
17596
+ const kept = [];
17597
+ for (const [from, to, group] of found) {
17598
+ const range = `${from}:${to}`;
17599
+ if (seen.has(range)) continue;
17600
+ seen.add(range);
17601
+ kept.push([
17602
+ from,
17603
+ to,
17604
+ group
17605
+ ]);
17606
+ }
17607
+ return kept;
17608
+ };
17594
17609
  spansByLine = (lines, found) => {
17595
17610
  const starts = lineStarts(lines);
17596
17611
  const held = lines.map(() => []);
17597
- for (const [from, to, group] of found) acrossLines(lines, starts, held, [
17598
- from,
17599
- to,
17600
- group
17601
- ]);
17612
+ for (const span of firstOfEach(found)) acrossLines(lines, starts, held, span);
17602
17613
  return held;
17603
17614
  };
17604
17615
  textAt = (display, pan, covered = 0) => {
package/package.json CHANGED
@@ -23,7 +23,7 @@
23
23
  "bin": {
24
24
  "adiff": "./bin/adiff.js"
25
25
  },
26
- "version": "0.1.0-alpha.163",
26
+ "version": "0.1.0-alpha.164",
27
27
  "description": "Review the work an agent left you without losing the thread: comments live on the lines, the agent answers them, and each point stays open until you settle it.",
28
28
  "license": "MIT",
29
29
  "repository": {