@eliya-oss/agent-diff 0.1.0-alpha.200 → 0.1.0-alpha.202

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.
@@ -19,8 +19,10 @@ pnpm record
19
19
 
20
20
  It reads the test files this branch changed against `origin/main`, runs them with tracing on, and for
21
21
  each test builds its world into a real repository, boots adiff in a real terminal, replays the keys
22
- the test pressed, encodes an mp4 and uploads it. It prints a finished `## Recorded tests` section.
23
- Paste that under the body.
22
+ the test pressed, and encodes an mp4 into `shots/`. It uploads nothing. It prints a finished
23
+ `## Recorded tests` section whose films point at their local paths, and the `--attach` flags that
24
+ upload them. Paste the section under the body and pass the flags to `gh pr create` or `gh pr edit`
25
+ (see **Upload**).
24
26
 
25
27
  `pnpm record --test <path>` records one file instead of the whole branch. `pnpm record --base
26
28
  <branch>` reads the branch against something other than `origin/main`, which is what a PR stacked on
@@ -70,9 +72,8 @@ So a test that needs one of those things has two honest endings, and no third:
70
72
  pnpm shot --trace <trace.jsonl> --test-name "<when> > <then>" --local
71
73
  ```
72
74
 
73
- `--local` writes the frame to `shots/` and uploads nothing, so reading it first publishes nothing.
74
- Leave `--local` off once the frame is the one you meant, and the capture uploads and prints the
75
- markdown to paste.
75
+ `--local` writes the frame to `shots/` and prints its path. Nothing a capture makes is published
76
+ until `gh --attach` uploads it, so read every still and film before it goes on a pull request.
76
77
 
77
78
  The still is the last frame of the film. If it does not show the behavior the test names, the film
78
79
  does not either — and a film that shows the wrong screen is worse than no film, because a reviewer
@@ -81,7 +82,7 @@ output; to keep one, run the tests yourself with `ADIFF_TRACE=<path>` set.
81
82
 
82
83
  A run appends to that file rather than replacing it, so running the same test into it twice leaves
83
84
  two traces under one name. The capture takes the newest, so a re-run shows the re-run. A trace the
84
- test marked unreplayable is refused, naming the route the test took, so nothing is uploaded from it.
85
+ test marked unreplayable is refused, naming the route the test took, so nothing is made from it.
85
86
 
86
87
  ## What gets recorded
87
88
 
@@ -101,18 +102,39 @@ test. Do not invent keystrokes to make one.
101
102
  <details>
102
103
  <summary><code>then the keys are already on the comments</code></summary>
103
104
 
104
- <bare user-attachments URL>
105
+ ![then the keys are already on the comments](./shots/when-the-review-panel-is-opened-then-the-keys-are-already-on-the-comments.mp4)
105
106
 
106
107
  </details>
107
108
  ```
108
109
 
109
110
  The `describe` is the plain-text list item and the `test` is the summary of a `<details>` nested
110
111
  under it, indented two spaces so it stays inside the item. Two tests under one `when` share the list
111
- item.
112
+ item. The summary is the test title only — no duration, no dimensions, no file size.
112
113
 
113
- Leave the URL bare. GitHub wraps a player around a user-attachments URL on its own line; image
114
- markdown (`![…](…)`) around a video renders nothing. The summary is the test title only — no
115
- duration, no dimensions, no file size.
114
+ ## Upload
115
+
116
+ gh uploads the films itself, with its own sign-in: no extension and no browser cookie. From the
117
+ repository root, so the paths in the body and in the flags match:
118
+
119
+ ```bash
120
+ gh pr create --base main --title "…" --body-file body.md \
121
+ --attach ./shots/<one>.mp4 --attach ./shots/<two>.mp4
122
+ gh pr edit <n> --body-file body.md --attach ./shots/<one>.mp4 # a PR that already exists
123
+ ```
124
+
125
+ gh uploads each file and rewrites its `![…](./shots/…)` reference in place. A film becomes the bare
126
+ user-attachments URL on its own line, which GitHub wraps in a player; an image stays an image. A file
127
+ named in `--attach` that the body never references is appended to the end instead. Pass one
128
+ `--attach` per file, each its own word: zsh does not split an unquoted variable, so flags built into
129
+ one string reach gh as one bad argument.
130
+
131
+ Check the render rather than the markdown, since nesting inside a list is where the player is lost:
132
+
133
+ ```bash
134
+ gh api repos/Newbie012/agent-diff/pulls/<n> -H "Accept: application/vnd.github.html+json" --jq .body_html | grep -c "<video"
135
+ ```
136
+
137
+ The count must equal the number of films.
116
138
 
117
139
  ## Where it goes
118
140
 
@@ -158,7 +180,7 @@ An attachment cannot be deleted once uploaded.
158
180
 
159
181
  ```bash
160
182
  cargo install --locked terminal-control # once
161
- gh extension install drogers0/gh-image # once, then `gh image check-token`
183
+ gh --version # 2.99 or later, for --attach
162
184
  ```
163
185
 
164
186
  `termctrl` lives in `~/.cargo/bin`, which is not always on the PATH of a non-interactive shell.
@@ -265,12 +265,14 @@ user-attachments, so a leak is permanent.
265
265
  ### Showing a screen
266
266
 
267
267
  adiff is a terminal, so a screenshot is a real PNG of a real terminal, captured with
268
- [terminal-control](https://github.com/anomalyco/terminal-control) and uploaded to GitHub's
269
- attachment store.
268
+ [terminal-control](https://github.com/anomalyco/terminal-control) into `shots/`. A capture uploads
269
+ nothing: it prints markdown pointing at the file and the `--attach` flag, and `gh pr create` or `gh
270
+ pr edit` with `--attach` (gh 2.99 or later) uploads it to GitHub's attachment store with gh's own
271
+ sign-in, rewriting the reference in place.
270
272
 
271
273
  ```bash
272
274
  cargo install --locked terminal-control # once
273
- gh extension install drogers0/gh-image # once, then `gh image check-token`
275
+ gh --version # 2.99 or later, for --attach
274
276
  ```
275
277
 
276
278
  **Something new** gets one image:
@@ -287,8 +289,8 @@ pnpm shot --keys "enter text:l" --label "the layers rail" --against origin/main
287
289
  ```
288
290
 
289
291
  `--against` builds a worktree at the merge base, captures the same keystrokes on the code as it was,
290
- and prints the finished `<table>` with both images uploaded. Paste it under the section it belongs
291
- to. If the two frames come out identical the script says so and stops — those keys do not reach the
292
+ and prints a two-column markdown table of both frames. Paste it under the section it belongs to, and
293
+ pass both `--attach` flags it prints. If the two frames come out identical the script says so and stops — those keys do not reach the
292
294
  screen you changed.
293
295
 
294
296
  **Something about motion** — scroll feel, focus moving, a gap opening ten lines at a time — gets a
@@ -298,12 +300,12 @@ recording, because a still frame cannot show it:
298
300
  pnpm shot --keys "enter text:l text:l text:l" --label "the gap opening" --video
299
301
  ```
300
302
 
301
- That prints a bare URL. Leave it bare: GitHub wraps a player around a user-attachments URL on its
302
- own line, and `![…](…)` image markdown around a video renders nothing.
303
+ That prints `![…](./shots/….mp4)`. Paste it as it is: `--attach` rewrites it to the bare
304
+ user-attachments URL, which GitHub wraps in a player on its own line.
303
305
 
304
306
  Keys are termctrl's: `enter`, `escape`, `tab`, `up`, `down`, `page-up`, `ctrl-a` through `ctrl-z`,
305
- and `text:<value>` for anything typed, including single letters like `text:l`. Add `--keep` to leave
306
- the files in `shots/` instead of deleting them after upload.
307
+ and `text:<value>` for anything typed, including single letters like `text:l`. Every capture stays
308
+ in `shots/` until you delete it.
307
309
 
308
310
  ## Before you open the PR
309
311
 
package/CHANGELOG.md CHANGED
@@ -1,5 +1,52 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.202
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(diff): a layer keeps a short run another layer claims in place, in faint ink, and folds only runs of 8 lines or more.
8
+
9
+ <details><summary>What was wrong</summary>
10
+
11
+ Every line another layer claimed folded into its own "changed lines · layer N explains them" line,
12
+ even one line in the middle of a statement. A new file split between four layers showed a fold
13
+ every few lines, and a three-line `import { … } from` read as one line, a fold, and two lines.
14
+
15
+ </details>
16
+
17
+ - breaking(homebrew): the formula installs on Apple silicon only, and an Intel Mac installs adiff with npm.
18
+
19
+ <details><summary>Why</summary>
20
+
21
+ Releases no longer build a binary for Intel Macs. Apple stopped selling them in 2023, and the
22
+ Intel build was the slowest job on every pull request and every release. `brew upgrade` on an Intel
23
+ Mac now says the formula needs Apple silicon; `npm i -g @eliya-oss/agent-diff@alpha` still works
24
+ there.
25
+
26
+ </details>
27
+
28
+ ## 0.1.0-alpha.201
29
+
30
+ ### Patch Changes
31
+
32
+ - fix(file tree): a comment the branch moved past no longer marks its file or its layer part, since no line in the diff draws it.
33
+
34
+ <details><summary>What was wrong</summary>
35
+
36
+ A file whose only open comment was on code the branch had since rewritten still showed that comment's mark in the file tree and in the layers rail. Opening the file showed no comment anywhere, because a comment the branch moved past is read in the review panel.
37
+
38
+ </details>
39
+
40
+ - fix(reading order): asking for a reading order while an earlier request is still open adds to that request instead of filing a second one.
41
+
42
+ <details><summary>What was wrong</summary>
43
+
44
+ Each press of `L`, and each `layers ask`, filed a new comment about the branch, so the review panel listed the same request several times.
45
+
46
+ </details>
47
+
48
+ - feat(CLI): `comment list` counts the comments waiting on your answer and the ones holding an answer you have not read.
49
+
3
50
  ## 0.1.0-alpha.200
4
51
 
5
52
  ### Patch Changes
package/README.md CHANGED
@@ -31,8 +31,8 @@ point stays open until you settle it.
31
31
 
32
32
  ## Requirements
33
33
 
34
- The Homebrew formula installs one compiled binary, which draws the terminal itself and needs no Node
35
- at all. A global npm install runs on Node 22 or newer, and the terminal there needs Node 26: adiff
34
+ The Homebrew formula installs one compiled binary for Apple silicon, which draws the terminal itself
35
+ and needs no Node at all. On an Intel Mac, install with npm. A global npm install runs on Node 22 or newer, and the terminal there needs Node 26: adiff
36
36
  finds one among your fnm, nvm, asdf, volta and Homebrew installs and runs the terminal on that, and
37
37
  says so when there is none, while every other command runs where you are.
38
38
 
package/dist/main.js CHANGED
@@ -10083,7 +10083,7 @@ var init_config = __esmMin((() => {
10083
10083
  //#region package.json
10084
10084
  init_pane();
10085
10085
  init_config();
10086
- var version$1 = "0.1.0-alpha.200";
10086
+ var version$1 = "0.1.0-alpha.202";
10087
10087
  //#endregion
10088
10088
  //#region src/cli/error.ts
10089
10089
  var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered, NotServed, BadRequest;
@@ -14393,7 +14393,7 @@ var init_review$1 = __esmMin((() => {
14393
14393
  }));
14394
14394
  //#endregion
14395
14395
  //#region src/review/threads.ts
14396
- var ASK_LEAD, stateOf$2, choicesOf, answerOf, turnsOf, judged, factsOf, threadOf, threadsIn$1, idsIn, rootIn, rootOf, isKnown, known, list$3, clearDoing, doing, answer$3, repliesTo, settle, without$1, unsettle, remove, restore$1, settleRead, loudestOf, settledOnALine, fileThreads, byFile$1, drawnOnALine, lineThreads, byLine;
14396
+ var ASK_LEAD, stateOf$2, choicesOf, answerOf, turnsOf, judged, factsOf, threadOf, threadsIn$1, idsIn, rootIn, rootOf, isKnown, known, list$3, clearDoing, doing, answer$3, repliesTo, settle, without$1, unsettle, remove, restore$1, settleRead, countsOf, loudestOf, drawnOnALine, settledOnALine, fileThreads, byFile$1, lineThreads, byLine;
14397
14397
  var init_threads$1 = __esmMin((() => {
14398
14398
  init_dist();
14399
14399
  init_store();
@@ -14684,7 +14684,12 @@ var init_threads$1 = __esmMin((() => {
14684
14684
  }));
14685
14685
  return { settled: ripe.length };
14686
14686
  });
14687
+ countsOf = (threads) => ({
14688
+ asked: threads.filter((thread) => thread.stand === "asked").length,
14689
+ unread: threads.filter((thread) => isOpen(thread.stand) && thread.stand !== "asked" && thread.unread > 0).length
14690
+ });
14687
14691
  loudestOf = (threads) => threads.reduce((stand, one) => louderOf(stand, one.stand), "gone");
14692
+ drawnOnALine = (thread) => thread.about === "line" && !thread.movedPast && thread.stand !== "gone";
14688
14693
  settledOnALine = (thread) => thread.stand === "settled" && !thread.movedPast;
14689
14694
  fileThreads = (path, threads) => {
14690
14695
  const here = threads.filter((thread) => thread.file === path);
@@ -14697,10 +14702,9 @@ var init_threads$1 = __esmMin((() => {
14697
14702
  };
14698
14703
  };
14699
14704
  byFile$1 = (threads) => {
14700
- const counted = threads.filter((thread) => thread.about === "line" && (isOpen(thread.stand) || settledOnALine(thread)));
14705
+ const counted = threads.filter((thread) => drawnOnALine(thread) && (isOpen(thread.stand) || thread.stand === "settled"));
14701
14706
  return [...new Set(counted.map((thread) => thread.file))].map((path) => fileThreads(path, counted));
14702
14707
  };
14703
- drawnOnALine = (thread) => thread.about === "line" && !thread.movedPast && thread.stand !== "gone";
14704
14708
  lineThreads = (here, first) => ({
14705
14709
  path: first.file,
14706
14710
  side: first.side,
@@ -15821,7 +15825,7 @@ var init_preferences = __esmMin((() => {
15821
15825
  }));
15822
15826
  //#endregion
15823
15827
  //#region src/review/layers.ts
15824
- var STALE_ADVICE, unique, spansOfLayer, tidyPath, spanFault, blockFault, codeBlockOf, tidyBlock, blocksOf, layerFault, layerOf, parsed, readLayers, fromStored, toStored, partIn, reportedLayers, reportOf, storedLayers, set, readInLayer, withRead, coversThread, readsFile, lastHolding, layersHolding$1, loudest, partWithThreads, withThreads, readReport, view, show$1, placeThreads, spansIn, layersAt, taggedRow, nearestNew, lineNow, taggedHunk, taggedFile, tagSince, tagRows, read, partsOfFile, vouchPart, askingFor, ask, claims, vouchIn;
15828
+ var STALE_ADVICE, unique, spansOfLayer, tidyPath, spanFault, blockFault, codeBlockOf, tidyBlock, blocksOf, layerFault, layerOf, parsed, readLayers, fromStored, toStored, partIn, reportedLayers, reportOf, storedLayers, set, readInLayer, withRead, coversThread, readsFile, lastHolding, layersHolding$1, loudest, partWithThreads, withThreads, readReport, view, show$1, placeThreads, spansIn, layersAt, taggedRow, nearestNew, lineNow, taggedHunk, taggedFile, tagSince, tagRows, read, partsOfFile, vouchPart, askingFor, openAskOf, askIn, seenOf, ask, claims, vouchIn;
15825
15829
  var init_layers = __esmMin((() => {
15826
15830
  init_dist();
15827
15831
  init_layers$1();
@@ -16037,7 +16041,7 @@ var init_layers = __esmMin((() => {
16037
16041
  });
16038
16042
  };
16039
16043
  withThreads = (report, threads) => {
16040
- const open = threads.filter((thread) => isOpen(thread.stand)).map((thread) => ({
16044
+ const open = threads.filter((thread) => isOpen(thread.stand) && !thread.movedPast).map((thread) => ({
16041
16045
  thread,
16042
16046
  layers: layersHolding$1(report.layers, thread)
16043
16047
  }));
@@ -16191,6 +16195,30 @@ var init_layers = __esmMin((() => {
16191
16195
  if (told.stale) return `${ASK_LEAD} The reading order on it describes an older commit — please read the diff again and write a new one with \`adiff layers set\`.`;
16192
16196
  return `${ASK_LEAD} Please revise its reading order with \`adiff layers set\`.`;
16193
16197
  };
16198
+ openAskOf = (comments) => comments.find((one) => one.body.startsWith("About this branch, not about this line.") && one.settled !== true && one.removed !== true)?.id;
16199
+ askIn = fn("Review.Layers.askIn")(function* (worktree, asking) {
16200
+ if (asking.open !== void 0) return yield* reply(worktree, {
16201
+ to: asking.open,
16202
+ body: asking.body,
16203
+ id: asking.id,
16204
+ at: asking.at
16205
+ });
16206
+ return yield* submit(worktree, {
16207
+ file: asking.file,
16208
+ side: "new",
16209
+ start: 1,
16210
+ end: 1,
16211
+ body: asking.body,
16212
+ id: asking.id,
16213
+ at: asking.at
16214
+ });
16215
+ });
16216
+ seenOf = (thread) => ({
16217
+ id: thread.id,
16218
+ body: thread.body,
16219
+ settled: thread.settled,
16220
+ removed: thread.stand === "gone"
16221
+ });
16194
16222
  ask = fn("Review.Layers.ask")(function* (reading, request) {
16195
16223
  const first = reading.patches[0];
16196
16224
  if (first === void 0) return yield* new UnknownFile({
@@ -16202,14 +16230,13 @@ var init_layers = __esmMin((() => {
16202
16230
  count: told.layers.length,
16203
16231
  stale: told.stale
16204
16232
  });
16205
- yield* submit(reading.worktree, {
16233
+ const open = openAskOf((yield* list$3(reading)).map(seenOf));
16234
+ yield* askIn(reading.worktree, {
16206
16235
  file: first.path,
16207
- side: "new",
16208
- start: 1,
16209
- end: 1,
16210
16236
  body,
16211
16237
  id: request.id,
16212
- at: request.at
16238
+ at: request.at,
16239
+ open
16213
16240
  });
16214
16241
  return { asked: body };
16215
16242
  });
@@ -17914,10 +17941,11 @@ var init_keys = __esmMin((() => {
17914
17941
  source: "raw"
17915
17942
  });
17916
17943
  };
17917
- })), sourceLength, markerText, lastNewLine, spansOf, linesFrom, push, markGap, openOf, countOf, openAbove, openBelow, elsewhereText, markElsewhere, flushed, someRows, changedIn, firstChanged, makeRows, compose$1, cache, keyOf$1, saidOf, lineOf$1, inSpans, spansFor, claimOf, shownOf, gapAtRow, gapNumbered, gapRowSet;
17944
+ })), FOLDS_FROM, sourceLength, markerText, lastNewLine, spansOf, linesFrom, push, markGap, openOf, countOf, openAbove, openBelow, elsewhereText, markElsewhere, keepQuiet, flushed, someRows, changedIn, firstChanged, makeRows, compose$1, cache, keyOf$1, saidOf, lineOf$1, inSpans, spansFor, claimOf, shownOf, gapAtRow, gapNumbered, gapRowSet;
17918
17945
  var init_gaps = __esmMin((() => {
17919
17946
  init_dist();
17920
17947
  init_layers$1();
17948
+ FOLDS_FROM = 8;
17921
17949
  sourceLength = (source) => source.at(-1)?.trim() === "" ? source.length - 1 : source.length;
17922
17950
  markerText = (hidden) => {
17923
17951
  const said = `⋯ ${hidden} ${hidden === 1 ? "line" : "lines"} hidden`;
@@ -18003,8 +18031,16 @@ var init_gaps = __esmMin((() => {
18003
18031
  text: elsewhereText(lines, said)
18004
18032
  });
18005
18033
  };
18034
+ keepQuiet = (made, rows) => {
18035
+ for (const row of rows) {
18036
+ made.quiet.add(made.rows.length);
18037
+ push(made, row);
18038
+ }
18039
+ };
18006
18040
  flushed = (made, run) => {
18007
- if (run !== void 0) markElsewhere(made, run.lines, run.said);
18041
+ if (run === void 0) return void 0;
18042
+ if (run.rows.length < FOLDS_FROM) keepQuiet(made, run.rows);
18043
+ else markElsewhere(made, run.rows.length, run.said);
18008
18044
  };
18009
18045
  someRows = (made, hunk, claim) => {
18010
18046
  let run;
@@ -18015,7 +18051,7 @@ var init_gaps = __esmMin((() => {
18015
18051
  continue;
18016
18052
  }
18017
18053
  run = {
18018
- lines: (run?.lines ?? 0) + 1,
18054
+ rows: [...run?.rows ?? [], row],
18019
18055
  said: run?.said ?? claim.said(row)
18020
18056
  };
18021
18057
  }
@@ -18027,7 +18063,8 @@ var init_gaps = __esmMin((() => {
18027
18063
  const made = {
18028
18064
  rows: [],
18029
18065
  hunks: [],
18030
- gaps: []
18066
+ gaps: [],
18067
+ quiet: /* @__PURE__ */ new Set()
18031
18068
  };
18032
18069
  for (const [index, hunk] of build.base.hunks.entries()) {
18033
18070
  const left = openAbove(made, build, index);
@@ -18058,7 +18095,8 @@ var init_gaps = __esmMin((() => {
18058
18095
  rows: made.rows,
18059
18096
  hunks: made.hunks
18060
18097
  },
18061
- gaps: made.gaps
18098
+ gaps: made.gaps,
18099
+ quiet: made.quiet
18062
18100
  };
18063
18101
  };
18064
18102
  cache = /* @__PURE__ */ new WeakMap();
@@ -19060,7 +19098,7 @@ var init_notes = __esmMin((() => {
19060
19098
  init_words();
19061
19099
  threadsOn = (state, fileIndex) => {
19062
19100
  const patch = state.patches[fileIndex];
19063
- const stands = patch === void 0 ? [] : state.sent.filter((entry) => entry.file === patch.path && entry.removed !== true && entry.settled !== true).map((entry) => threadStand(entry));
19101
+ const stands = patch === void 0 ? [] : state.sent.filter((entry) => entry.file === patch.path && entry.removed !== true && entry.settled !== true && !movedPast(entry)).map((entry) => threadStand(entry));
19064
19102
  return {
19065
19103
  open: stands.length,
19066
19104
  stand: stands.reduce(louderOf, "gone")
@@ -19715,7 +19753,7 @@ var init_reduce = __esmMin((() => {
19715
19753
  if (drawn === void 0) return openingRow(state, patchIndex);
19716
19754
  const hidden = gapRowSet(drawn);
19717
19755
  const shows = (row) => !hidden.has(row.index) && carriesLine(row);
19718
- const changed = onLayers(held) ? drawn.patch.rows.findIndex((row) => shows(row) && row.kind !== "context") : -1;
19756
+ const changed = onLayers(held) ? drawn.patch.rows.findIndex((row) => shows(row) && row.kind !== "context" && !drawn.quiet.has(row.index)) : -1;
19719
19757
  if (changed !== -1) return changed;
19720
19758
  const at = drawn.patch.rows.findIndex(shows);
19721
19759
  return at === -1 ? openingRow(state, patchIndex) : at;
@@ -20741,9 +20779,10 @@ var init_diffview = __esmMin((() => {
20741
20779
  }
20742
20780
  show(patch, notes, gaps, under = {
20743
20781
  prose: [],
20744
- draft: void 0
20782
+ draft: void 0,
20783
+ quiet: /* @__PURE__ */ new Set()
20745
20784
  }) {
20746
- const { prose, draft } = under;
20785
+ const { prose, draft, quiet } = under;
20747
20786
  const room = notes.length === 0 && prose.length === 0 ? NOTE_MIN : this.noteRoom();
20748
20787
  const key = keyOf(room, notes, prose, draft);
20749
20788
  if (patch === this.shown && key === this.noted) return;
@@ -20755,6 +20794,7 @@ var init_diffview = __esmMin((() => {
20755
20794
  notes,
20756
20795
  room,
20757
20796
  gaps,
20797
+ quiet,
20758
20798
  prose,
20759
20799
  fresh: freshLines(patch),
20760
20800
  draft
@@ -21022,7 +21062,7 @@ var init_diffview = __esmMin((() => {
21022
21062
  ...prose.map((entry) => `p${entry.line}${entry.after ? ">" : "<"}:${entry.markdown}`)
21023
21063
  ].join("\0");
21024
21064
  groupOf = $match({
21025
- Code: () => void 0,
21065
+ Code: (line) => line.quiet ? "gap" : void 0,
21026
21066
  Gap: () => "gap",
21027
21067
  Comment: (line) => line.sent ? "note.sent" : "note",
21028
21068
  Label: () => "note.label",
@@ -21227,7 +21267,10 @@ var init_diffview = __esmMin((() => {
21227
21267
  row: row.index,
21228
21268
  stop: 0
21229
21269
  };
21230
- return plan.gaps.has(row.index) ? Gap(placed) : Code(placed);
21270
+ return plan.gaps.has(row.index) ? Gap(placed) : Code({
21271
+ ...placed,
21272
+ quiet: plan.quiet.has(row.index)
21273
+ });
21231
21274
  };
21232
21275
  DRAFT_STOP = -1;
21233
21276
  draftText = (draft, at) => {
@@ -21283,9 +21326,10 @@ var init_diffview = __esmMin((() => {
21283
21326
  if (isNote(entry)) return BARE_SIGN;
21284
21327
  const row = rows.get(entry.row);
21285
21328
  const sign = row === void 0 ? void 0 : SIGNS[row.kind];
21286
- return sign === void 0 ? BARE_SIGN : {
21329
+ if (sign === void 0) return BARE_SIGN;
21330
+ return {
21287
21331
  after: sign.text,
21288
- afterColor: sign.color
21332
+ afterColor: isCode(entry) && entry.quiet ? palette.faint : sign.color
21289
21333
  };
21290
21334
  };
21291
21335
  lineSigns = (patch, display) => {
@@ -22023,6 +22067,7 @@ var init_paint = __esmMin((() => {
22023
22067
  if (flags.cursor) return UNDER_CURSOR[kind] ?? PLAIN_CURSOR;
22024
22068
  if (flags.selected) return PICKED[kind] ?? PLAIN_PICKED;
22025
22069
  if (flags.gap) return GAP_PAINT;
22070
+ if (flags.quiet) return void 0;
22026
22071
  return view.washOf(kind);
22027
22072
  };
22028
22073
  PLAIN_PICKED = {
@@ -23357,7 +23402,8 @@ var init_render = __esmMin((() => {
23357
23402
  this.drafted = draft;
23358
23403
  this.view.show(patch, notesFor(state, patch.path), gapRowSet(shown), {
23359
23404
  prose: proseFor(state, patch.path),
23360
- draft
23405
+ draft,
23406
+ quiet: shown.quiet
23361
23407
  });
23362
23408
  this.view.pick(state.picked);
23363
23409
  if (!takesText(state.screen)) {
@@ -23594,13 +23640,15 @@ var init_render = __esmMin((() => {
23594
23640
  const shown = shownOf(state);
23595
23641
  const rows = shown?.patch.rows ?? [];
23596
23642
  const gaps = shown === void 0 ? /* @__PURE__ */ new Set() : gapRowSet(shown);
23643
+ const quiet = shown?.quiet ?? /* @__PURE__ */ new Set();
23597
23644
  return (row) => {
23598
23645
  const kind = rows[row]?.kind;
23599
23646
  if (kind === void 0) return void 0;
23600
23647
  return pickPaint(this.view, kind, {
23601
23648
  cursor: row === state.cursor,
23602
23649
  selected: selecting && row >= from && row <= to,
23603
- gap: gaps.has(row)
23650
+ gap: gaps.has(row),
23651
+ quiet: quiet.has(row)
23604
23652
  });
23605
23653
  };
23606
23654
  }
@@ -24657,14 +24705,12 @@ var init_comments = __esmMin((() => {
24657
24705
  const patch = app.state.patches[0];
24658
24706
  const branch = selectedBranch(app.state);
24659
24707
  if (patch === void 0 || branch === void 0) return;
24660
- yield* submit(yield* worktreeOf(app, branch.branch), {
24708
+ yield* askIn(yield* worktreeOf(app, branch.branch), {
24661
24709
  file: patch.path,
24662
- side: "new",
24663
- start: 1,
24664
- end: 1,
24665
24710
  body: layersAsk$1(app.state),
24666
24711
  id: randomUUID(),
24667
- at: (/* @__PURE__ */ new Date()).toISOString()
24712
+ at: (/* @__PURE__ */ new Date()).toISOString(),
24713
+ open: openAskOf(app.state.sent)
24668
24714
  });
24669
24715
  const sent = yield* loadSent(app, branch.branch);
24670
24716
  app.commit(withNotice(withSent(app.state, sent), askedFor(app.state)));
@@ -26540,6 +26586,7 @@ const commentList = fn("Main.commentList")(function* (options) {
26540
26586
  const comments = yield* placeThreads(reading, yield* list$3(reading));
26541
26587
  yield* answer(options, {
26542
26588
  comments,
26589
+ counts: countsOf(comments),
26543
26590
  files: byFile$1(comments),
26544
26591
  lines: byLine(comments)
26545
26592
  });
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.200",
26
+ "version": "0.1.0-alpha.202",
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": {