@eliya-oss/agent-diff 0.1.0-alpha.125 → 0.1.0-alpha.127

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,17 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.127
4
+
5
+ ### Patch Changes
6
+
7
+ - The pinned scope keeps the innermost levels rather than the outermost. Deeply nested code pinned the four scopes furthest from the code — so at twelve levels of nesting you were told the class and never the function you were reading. It now pins the outermost one, for orientation, and the innermost ones, and marks the outermost with `⋯` when levels between were dropped.
8
+
9
+ ## 0.1.0-alpha.126
10
+
11
+ ### Patch Changes
12
+
13
+ - A layer's note about a changed line sits above the change, not inside it. When a line is replaced, git shows the old and the new one after the other, and the note was drawn between them — so four rows of prose split the one pairing a diff exists to show, on the first screen of the review.
14
+
3
15
  ## 0.1.0-alpha.125
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9710,7 +9710,7 @@ var init_parse$1 = __esmMin((() => {
9710
9710
  }));
9711
9711
  //#endregion
9712
9712
  //#region src/domain/patch/sticky.ts
9713
- var CLOSER, COMMENT, LOOKAHEAD, indentOf, pinnable, limitFrom, stickyChain;
9713
+ var CLOSER, COMMENT, LOOKAHEAD, indentOf, pinnable, limitFrom, stickyChain, kept$1;
9714
9714
  var init_sticky = __esmMin((() => {
9715
9715
  CLOSER = /^[)\]}>;,]/;
9716
9716
  COMMENT = /^(\/\/|\/\*|\*|#|<!--)/;
@@ -9741,7 +9741,13 @@ var init_sticky = __esmMin((() => {
9741
9741
  limit = indent;
9742
9742
  if (indent === 0) break;
9743
9743
  }
9744
- return chain.toReversed().slice(0, max);
9744
+ return kept$1(chain.toReversed(), max);
9745
+ };
9746
+ kept$1 = (chain, max) => {
9747
+ if (chain.length <= max || max < 2) return chain.slice(0, max);
9748
+ const outer = chain[0] ?? "";
9749
+ const inner = chain.slice(chain.length - (max - 1));
9750
+ return [`${outer} ⋯`, ...inner];
9745
9751
  };
9746
9752
  }));
9747
9753
  //#endregion
@@ -10977,7 +10983,7 @@ var init_pane = __esmMin((() => {
10977
10983
  init_drafts();
10978
10984
  init_init();
10979
10985
  init_pane();
10980
- var version$1 = "0.1.0-alpha.125";
10986
+ var version$1 = "0.1.0-alpha.127";
10981
10987
  //#endregion
10982
10988
  //#region src/cli/upgrade.ts
10983
10989
  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, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
@@ -15425,7 +15431,7 @@ var init_theme = __esmMin((() => {
15425
15431
  }));
15426
15432
  //#endregion
15427
15433
  //#region src/tui/diffview.ts
15428
- var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, freshLines, proseAt, notesAt, TRAILING, shownText, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
15434
+ var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, freshLines, proseAt, notesAt, TRAILING, shownText, codeRow, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
15429
15435
  var init_diffview = __esmMin((() => {
15430
15436
  init_dist();
15431
15437
  init_patch();
@@ -16050,13 +16056,30 @@ var init_diffview = __esmMin((() => {
16050
16056
  gap: plan.gaps.has(row.index),
16051
16057
  prose: false
16052
16058
  });
16053
- rowsFor = (plan, row) => [
16054
- ...proseAt(plan, row, false).flatMap((entry) => proseRows(entry, row.index, plan.room)),
16059
+ rowsFor = (plan, row, around) => [
16060
+ ...around.lead.flatMap((entry) => proseRows(entry, row.index, plan.room)),
16061
+ ...(around.own ? proseAt(plan, row, false) : []).flatMap((entry) => proseRows(entry, row.index, plan.room)),
16055
16062
  codeRow(plan, row),
16056
16063
  ...notesAt(plan, row),
16057
16064
  ...proseAt(plan, row, true).flatMap((entry) => proseRows(entry, row.index, plan.room))
16058
16065
  ];
16059
- layout = (plan) => plan.patch.rows.flatMap((row) => rowsFor(plan, row));
16066
+ replacedBy = (rows, at) => {
16067
+ const here = rows[at];
16068
+ const next = rows[at + 1];
16069
+ return here?.kind === "removed" && next?.kind === "added" ? next : void 0;
16070
+ };
16071
+ layout = (plan) => {
16072
+ const rows = plan.patch.rows;
16073
+ return rows.flatMap((row, at) => {
16074
+ const ahead = replacedBy(rows, at);
16075
+ const lead = ahead === void 0 ? [] : proseAt(plan, ahead, false);
16076
+ const own = replacedBy(rows, at - 1) === void 0;
16077
+ return rowsFor(plan, row, {
16078
+ lead,
16079
+ own
16080
+ });
16081
+ });
16082
+ };
16060
16083
  lineNumbers = (patch, display) => {
16061
16084
  const numbers = /* @__PURE__ */ new Map();
16062
16085
  const rows = new Map(patch.rows.map((row) => [row.index, row]));
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.125",
26
+ "version": "0.1.0-alpha.127",
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": {