@eliya-oss/agent-diff 0.1.0-alpha.121 → 0.1.0-alpha.123

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,19 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.123
4
+
5
+ ### Patch Changes
6
+
7
+ - A change you can only see in the whitespace is now visible. Adding a trailing space or turning spaces into a tab showed a removed line and an added line that read identically, with nothing to tell them apart. Trailing spaces and tabs on a changed line are marked. Copying still takes the bytes that are in the file.
8
+
9
+ ## 0.1.0-alpha.122
10
+
11
+ ### Patch Changes
12
+
13
+ - A file with no newline at the end says so. git reports it and adiff dropped the line, so the change to a file's last byte showed as two lines that read identically with nothing to tell them apart.
14
+
15
+ The lock around a review's state is patient enough for a loaded machine. Four writers arriving at once on a busy box could exhaust its retries and lose a write.
16
+
3
17
  ## 0.1.0-alpha.121
4
18
 
5
19
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9417,9 +9417,9 @@ var init_service$1 = __esmMin((() => {
9417
9417
  })
9418
9418
  };
9419
9419
  };
9420
- LOCK_TRIES = 60;
9420
+ LOCK_TRIES = 240;
9421
9421
  LOCK_WAIT_MS = 25;
9422
- LOCK_STALE_MS = 5e3;
9422
+ LOCK_STALE_MS = 15e3;
9423
9423
  held$1 = (path) => tryPromise({
9424
9424
  try: () => writeFile(path, `${process.pid}`, { flag: "wx" }),
9425
9425
  catch: (cause) => new StoreUnwritable({
@@ -9552,12 +9552,14 @@ var init_anchor = __esmMin((() => {
9552
9552
  }));
9553
9553
  //#endregion
9554
9554
  //#region src/domain/patch/parse.ts
9555
- var FILE_MARKER, HUNK_MARKER, BINARY_MARKER, BINARY_SAID, BLOB_MARKER, OLD_PATH_MARKER, NEW_PATH_MARKER, HUNK_HEADER, FILE_HEADER, SIGNS$1, draftFrom, openHunk, appendRow, readBody, readBinary, readHeader, parsePatches;
9555
+ var FILE_MARKER, HUNK_MARKER, BINARY_MARKER, NO_NEWLINE_MARKER, NO_NEWLINE_SAID, BINARY_SAID, BLOB_MARKER, OLD_PATH_MARKER, NEW_PATH_MARKER, HUNK_HEADER, FILE_HEADER, SIGNS$1, draftFrom, openHunk, appendRow, appendMarker, readBody, readBinary, readHeader, parsePatches;
9556
9556
  var init_parse$1 = __esmMin((() => {
9557
9557
  init_dist();
9558
9558
  FILE_MARKER = "diff --git ";
9559
9559
  HUNK_MARKER = "@@";
9560
9560
  BINARY_MARKER = "Binary files ";
9561
+ NO_NEWLINE_MARKER = "\";
9562
+ NO_NEWLINE_SAID = "no newline at end of file";
9561
9563
  BINARY_SAID = "binary file, adiff cannot show what changed in it";
9562
9564
  BLOB_MARKER = "index ";
9563
9565
  OLD_PATH_MARKER = "--- ";
@@ -9613,7 +9615,22 @@ var init_parse$1 = __esmMin((() => {
9613
9615
  draft.rows.push(row);
9614
9616
  draft.hunks.at(-1)?.rows.push(row);
9615
9617
  };
9618
+ appendMarker = (draft, text) => {
9619
+ const row = {
9620
+ index: draft.rows.length,
9621
+ kind: "context",
9622
+ oldLine: none(),
9623
+ newLine: none(),
9624
+ text
9625
+ };
9626
+ draft.rows.push(row);
9627
+ draft.hunks.at(-1)?.rows.push(row);
9628
+ };
9616
9629
  readBody = (draft, line) => {
9630
+ if (line.startsWith(NO_NEWLINE_MARKER)) {
9631
+ appendMarker(draft, NO_NEWLINE_SAID);
9632
+ return;
9633
+ }
9617
9634
  const kind = SIGNS$1[line.slice(0, 1)];
9618
9635
  if (kind !== void 0) appendRow(draft, kind, line.slice(1));
9619
9636
  };
@@ -10912,7 +10929,7 @@ var init_pane = __esmMin((() => {
10912
10929
  init_drafts();
10913
10930
  init_init();
10914
10931
  init_pane();
10915
- var version$1 = "0.1.0-alpha.121";
10932
+ var version$1 = "0.1.0-alpha.123";
10916
10933
  //#endregion
10917
10934
  //#region src/cli/upgrade.ts
10918
10935
  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;
@@ -15183,7 +15200,9 @@ var init_marks = __esmMin((() => {
15183
15200
  reviewed: "✓",
15184
15201
  folder: "",
15185
15202
  folderOpen: "",
15186
- file: ""
15203
+ file: "",
15204
+ space: "·",
15205
+ tab: "→"
15187
15206
  };
15188
15207
  sets = {
15189
15208
  ring,
@@ -15196,7 +15215,9 @@ var init_marks = __esmMin((() => {
15196
15215
  reviewed: "✓",
15197
15216
  folder: "",
15198
15217
  folderOpen: "",
15199
- file: ""
15218
+ file: "",
15219
+ space: "·",
15220
+ tab: "→"
15200
15221
  },
15201
15222
  quote: {
15202
15223
  comment: "❞",
@@ -15207,7 +15228,9 @@ var init_marks = __esmMin((() => {
15207
15228
  reviewed: "✓",
15208
15229
  folder: "",
15209
15230
  folderOpen: "",
15210
- file: ""
15231
+ file: "",
15232
+ space: "·",
15233
+ tab: "→"
15211
15234
  },
15212
15235
  diamond: {
15213
15236
  comment: "◆",
@@ -15218,7 +15241,9 @@ var init_marks = __esmMin((() => {
15218
15241
  reviewed: "✓",
15219
15242
  folder: "",
15220
15243
  folderOpen: "",
15221
- file: ""
15244
+ file: "",
15245
+ space: "·",
15246
+ tab: "→"
15222
15247
  },
15223
15248
  dot: {
15224
15249
  comment: "●",
@@ -15229,7 +15254,9 @@ var init_marks = __esmMin((() => {
15229
15254
  reviewed: "✓",
15230
15255
  folder: "",
15231
15256
  folderOpen: "",
15232
- file: ""
15257
+ file: "",
15258
+ space: "·",
15259
+ tab: "→"
15233
15260
  },
15234
15261
  plain: {
15235
15262
  ...ring,
@@ -15327,7 +15354,7 @@ var init_theme = __esmMin((() => {
15327
15354
  }));
15328
15355
  //#endregion
15329
15356
  //#region src/tui/diffview.ts
15330
- 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, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
15357
+ 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;
15331
15358
  var init_diffview = __esmMin((() => {
15332
15359
  init_dist();
15333
15360
  init_patch();
@@ -15931,8 +15958,16 @@ var init_diffview = __esmMin((() => {
15931
15958
  return fresh !== void 0 ? wanted : wanted.filter(() => !plan.fresh.has(line));
15932
15959
  };
15933
15960
  notesAt = (plan, row) => plan.notes.filter((note) => sideLineOf(row, note.side) === note.line).flatMap((note, at) => noteRows(note, row.index, plan.room, at + 1));
15961
+ TRAILING = /[ \t]+$/;
15962
+ shownText = (row) => {
15963
+ if (row.kind === "context") return row.text;
15964
+ const tail = TRAILING.exec(row.text);
15965
+ if (tail === null) return row.text;
15966
+ const marked = tail[0].replaceAll(" ", marks().tab).replaceAll(" ", marks().space);
15967
+ return `${row.text.slice(0, tail.index)}${marked}`;
15968
+ };
15934
15969
  codeRow = (plan, row) => ({
15935
- text: row.text,
15970
+ text: shownText(row),
15936
15971
  row: row.index,
15937
15972
  stop: 0,
15938
15973
  comment: false,
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.121",
26
+ "version": "0.1.0-alpha.123",
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": {