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

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.126
4
+
5
+ ### Patch Changes
6
+
7
+ - 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.
8
+
3
9
  ## 0.1.0-alpha.125
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -10977,7 +10977,7 @@ var init_pane = __esmMin((() => {
10977
10977
  init_drafts();
10978
10978
  init_init();
10979
10979
  init_pane();
10980
- var version$1 = "0.1.0-alpha.125";
10980
+ var version$1 = "0.1.0-alpha.126";
10981
10981
  //#endregion
10982
10982
  //#region src/cli/upgrade.ts
10983
10983
  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 +15425,7 @@ var init_theme = __esmMin((() => {
15425
15425
  }));
15426
15426
  //#endregion
15427
15427
  //#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;
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, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
15429
15429
  var init_diffview = __esmMin((() => {
15430
15430
  init_dist();
15431
15431
  init_patch();
@@ -16050,13 +16050,30 @@ var init_diffview = __esmMin((() => {
16050
16050
  gap: plan.gaps.has(row.index),
16051
16051
  prose: false
16052
16052
  });
16053
- rowsFor = (plan, row) => [
16054
- ...proseAt(plan, row, false).flatMap((entry) => proseRows(entry, row.index, plan.room)),
16053
+ rowsFor = (plan, row, around) => [
16054
+ ...around.lead.flatMap((entry) => proseRows(entry, row.index, plan.room)),
16055
+ ...(around.own ? proseAt(plan, row, false) : []).flatMap((entry) => proseRows(entry, row.index, plan.room)),
16055
16056
  codeRow(plan, row),
16056
16057
  ...notesAt(plan, row),
16057
16058
  ...proseAt(plan, row, true).flatMap((entry) => proseRows(entry, row.index, plan.room))
16058
16059
  ];
16059
- layout = (plan) => plan.patch.rows.flatMap((row) => rowsFor(plan, row));
16060
+ replacedBy = (rows, at) => {
16061
+ const here = rows[at];
16062
+ const next = rows[at + 1];
16063
+ return here?.kind === "removed" && next?.kind === "added" ? next : void 0;
16064
+ };
16065
+ layout = (plan) => {
16066
+ const rows = plan.patch.rows;
16067
+ return rows.flatMap((row, at) => {
16068
+ const ahead = replacedBy(rows, at);
16069
+ const lead = ahead === void 0 ? [] : proseAt(plan, ahead, false);
16070
+ const own = replacedBy(rows, at - 1) === void 0;
16071
+ return rowsFor(plan, row, {
16072
+ lead,
16073
+ own
16074
+ });
16075
+ });
16076
+ };
16060
16077
  lineNumbers = (patch, display) => {
16061
16078
  const numbers = /* @__PURE__ */ new Map();
16062
16079
  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.126",
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": {