@eliya-oss/agent-diff 0.1.0-alpha.136 → 0.1.0-alpha.137

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.
@@ -36,9 +36,10 @@ If you are unsure, ask: would someone who upgraded notice? If no, no file.
36
36
  gerund — `a-file-with-an-accent.md`, not `keeping-a-file-with-an-accent.md`. The bump is `patch`
37
37
  until this reaches 1.0, whatever the kind says.
38
38
 
39
- **Do not copy a neighbouring file as a model.** Most of `.changeset/` predates this format and is
40
- free prose with a gerund name. The test only holds intents that have not shipped yet to the shape,
41
- which is why the old ones still pass. Follow this page, not the file next to yours.
39
+ `.changeset/` holds only what has not shipped yet, so it is usually empty or nearly so. A release
40
+ collects the intents it consumed and deletes them — their words live on in `CHANGELOG.md`, and
41
+ `.changeset/ledger.yaml` records which release took which. Do not go looking for a neighbouring
42
+ file to copy; follow this page.
42
43
 
43
44
  ```markdown
44
45
  ---
package/CHANGELOG.md CHANGED
@@ -1,5 +1,41 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.137
4
+
5
+ ### Patch Changes
6
+
7
+ - fix(diff): a layer's prose carries a rule down its margin, so it cannot be read as the file.
8
+
9
+ <details><summary>What was wrong</summary>
10
+
11
+ The prose sat between two lines of code with no line number, no marker and nothing else to say it was not part of the file, so a note about the change below it read as stray markdown someone had committed.
12
+
13
+ </details>
14
+
15
+ perf(diff): turning to the next file takes about 15ms, down from about 77ms.
16
+
17
+ <details><summary>What was wrong</summary>
18
+
19
+ Every turn read the whole file at both ends of the diff before the screen moved, and those two reads exist only to feed syntax highlighting. The diff itself is already in memory, so the file now opens straight away and the colour follows it.
20
+
21
+ </details>
22
+
23
+ - feat(keys): `t` shows or hides the file list on its own, leaving the review panel where it is.
24
+
25
+ <details><summary>What was wrong</summary>
26
+
27
+ `z` hid the file list and the review panel together, so reading a wide diff beside your comments meant hiding both and bringing one back — `z` then `a`, which works by accident of composition rather than because anything offers it.
28
+
29
+ </details>
30
+
31
+ fix(footer): a stale reading order says which key asks for a new one.
32
+
33
+ <details><summary>What was wrong</summary>
34
+
35
+ The header said `layers stale` and stopped there, and `L` was in neither footer, so the one thing to do about it was only findable by reading the key sheet. The header now names the key, and the footer offers it while the order is stale.
36
+
37
+ </details>
38
+
3
39
  ## 0.1.0-alpha.136
4
40
 
5
41
  ### Patch Changes
package/dist/main.js CHANGED
@@ -11098,7 +11098,7 @@ var init_pane = __esmMin((() => {
11098
11098
  init_drafts();
11099
11099
  init_init();
11100
11100
  init_pane();
11101
- var version$1 = "0.1.0-alpha.136";
11101
+ var version$1 = "0.1.0-alpha.137";
11102
11102
  //#endregion
11103
11103
  //#region src/cli/upgrade.ts
11104
11104
  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;
@@ -13930,6 +13930,7 @@ var init_command = __esmMin((() => {
13930
13930
  whenComments: false,
13931
13931
  counted: false,
13932
13932
  whenLayers: false,
13933
+ whenStale: false,
13933
13934
  whenThread: false,
13934
13935
  whenSelecting: false,
13935
13936
  whenReviewed: false,
@@ -14376,6 +14377,20 @@ var init_command = __esmMin((() => {
14376
14377
  whenReviewed: true,
14377
14378
  rank: 3
14378
14379
  }),
14380
+ command({
14381
+ action: "nav.toggle",
14382
+ also: [
14383
+ "sidebar",
14384
+ "file list",
14385
+ "collapse",
14386
+ "expand",
14387
+ "hide files"
14388
+ ],
14389
+ title: "Show or hide the file list",
14390
+ category: "Reading",
14391
+ keys: ["t"],
14392
+ screens: ["review"]
14393
+ }),
14379
14394
  command({
14380
14395
  action: "layers.ask",
14381
14396
  also: [
@@ -14386,7 +14401,10 @@ var init_command = __esmMin((() => {
14386
14401
  title: "Ask the agent for a reading order",
14387
14402
  category: "Files",
14388
14403
  keys: ["L"],
14389
- screens: ["review"]
14404
+ screens: ["review"],
14405
+ hint: "new order",
14406
+ rank: 6,
14407
+ whenStale: true
14390
14408
  }),
14391
14409
  command({
14392
14410
  action: "rail.toggle",
@@ -14639,7 +14657,7 @@ var init_command = __esmMin((() => {
14639
14657
  if (swapped !== void 0) return swapped(offered);
14640
14658
  return entry.counted ? `${entry.hint} ${offered.comments}` : entry.hint;
14641
14659
  };
14642
- hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenComments || offered.comments > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenSelecting || offered.selecting).filter((entry) => !entry.whenReviewed || offered.reviewed > 0).filter((entry) => !entry.whenPull || offered.pull).filter((entry) => entry.panes.includes(offered.pane)).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
14660
+ hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenComments || offered.comments > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenStale || offered.stale).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenSelecting || offered.selecting).filter((entry) => !entry.whenReviewed || offered.reviewed > 0).filter((entry) => !entry.whenPull || offered.pull).filter((entry) => entry.panes.includes(offered.pane)).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
14643
14661
  key: displayKey(entry.keys[0] ?? ""),
14644
14662
  hint: hintOf(entry, offered),
14645
14663
  press: entry.keys[0] ?? ""
@@ -14683,7 +14701,7 @@ var init_match = __esmMin((() => {
14683
14701
  }));
14684
14702
  //#endregion
14685
14703
  //#region src/tui/reduce.ts
14686
- var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, restingOn, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withSent, withArrived, withColumns, laidOver, onLayerHolding, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withFinder, withMatches, withNoticeHere, withNotice;
14704
+ var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, restingOn, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withSent, withArrived, withColumns, laidOver, onLayerHolding, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withFinder, withMatches, withNoticeHere, withNotice;
14687
14705
  var init_reduce = __esmMin((() => {
14688
14706
  init_dist();
14689
14707
  init_patch();
@@ -14922,6 +14940,17 @@ var init_reduce = __esmMin((() => {
14922
14940
  panelIndex: 0
14923
14941
  };
14924
14942
  };
14943
+ toggleNav = (state) => {
14944
+ if (state.navOpen) return {
14945
+ ...state,
14946
+ navOpen: false,
14947
+ focus: state.focus === "tree" ? "diff" : state.focus
14948
+ };
14949
+ return {
14950
+ ...state,
14951
+ navOpen: true
14952
+ };
14953
+ };
14925
14954
  packedAway = (state) => !state.navOpen && !state.panelOpen;
14926
14955
  zoom = (state) => packedAway(state) ? {
14927
14956
  ...state,
@@ -15181,6 +15210,7 @@ var init_reduce = __esmMin((() => {
15181
15210
  navOpen: true
15182
15211
  }),
15183
15212
  "panel.toggle": togglePanel,
15213
+ "nav.toggle": toggleNav,
15184
15214
  "nav.zoom": zoom,
15185
15215
  "wrap.toggle": (state) => ({
15186
15216
  ...state,
@@ -16259,7 +16289,7 @@ var init_diffview = __esmMin((() => {
16259
16289
  prose: false
16260
16290
  }));
16261
16291
  proseRows = (entry, row, room) => [...entry.markdown.split("\n").flatMap((line) => wrap(line, room - 2)), ""].map((line) => ({
16262
- text: line.length === 0 ? "" : ` ${line}`,
16292
+ text: line.length === 0 ? marks().rule : `${marks().rule} ${line}`,
16263
16293
  row,
16264
16294
  stop: 0,
16265
16295
  comment: false,
@@ -17056,7 +17086,7 @@ var init_render = __esmMin((() => {
17056
17086
  pullHere(state).length === 0 ? "" : `${pullHere(state)} pull request`,
17057
17087
  state.vouched.length === 0 ? "" : reviewedCount(state),
17058
17088
  contextLabel(state.context),
17059
- state.layersStale ? "layers stale" : "",
17089
+ state.layersStale ? "layers stale · L for a new one" : "",
17060
17090
  hiddenLines(state) === 0 ? "" : `⋯ ${hiddenLines(state)} ${hiddenLines(state) === 1 ? "line" : "lines"} hidden`,
17061
17091
  panLabel(state, across)
17062
17092
  ];
@@ -17508,6 +17538,7 @@ var init_render = __esmMin((() => {
17508
17538
  reviewed: reviewedCountIn(state),
17509
17539
  pull: pullHere(state).length > 0,
17510
17540
  pane: state.screen === "review" ? state.focus : "diff",
17541
+ stale: state.layersStale,
17511
17542
  onLayers: onLayers(state),
17512
17543
  hidingRead: state.hideReviewed,
17513
17544
  hidingSettled: state.hideSettled,
@@ -18281,6 +18312,7 @@ var init_app = __esmMin((() => {
18281
18312
  sideways = 0;
18282
18313
  listening;
18283
18314
  lighting;
18315
+ sourcing;
18284
18316
  constructor(options) {
18285
18317
  this.renderer = options.renderer;
18286
18318
  this.repo = options.repo;
@@ -18313,6 +18345,7 @@ var init_app = __esmMin((() => {
18313
18345
  renderer.on("destroy", () => this.stopTicking());
18314
18346
  this.startTicking();
18315
18347
  renderer.on("destroy", () => this.stopLighting());
18348
+ renderer.on("destroy", () => this.stopSourcing());
18316
18349
  renderer.on("destroy", () => void getTreeSitterClient().destroy());
18317
18350
  renderer.on("destroy", () => this.stopPainting());
18318
18351
  renderer.on("destroy", () => this.stopConsuming());
@@ -18446,7 +18479,11 @@ var init_app = __esmMin((() => {
18446
18479
  }
18447
18480
  settled() {
18448
18481
  if (this.consuming === void 0) return Promise.resolve();
18449
- return runPromise(andThen(this.drained(), this.stillLighting()));
18482
+ return runPromise(andThen(andThen(this.drained(), suspend(() => this.stillSourcing())), suspend(() => this.stillLighting())));
18483
+ }
18484
+ stillSourcing() {
18485
+ const fiber = this.sourcing;
18486
+ return fiber === void 0 ? void_ : asVoid(await_(fiber));
18450
18487
  }
18451
18488
  stillLighting() {
18452
18489
  const fiber = this.lighting;
@@ -19250,9 +19287,15 @@ var init_app = __esmMin((() => {
19250
19287
  turnedTo() {
19251
19288
  return gen({ self: this }, function* () {
19252
19289
  this.commit(withSource(this.state, []));
19253
- yield* this.loadSource();
19290
+ this.stopSourcing();
19291
+ this.sourcing = yield* forkDetach(this.loadSource());
19254
19292
  });
19255
19293
  }
19294
+ stopSourcing() {
19295
+ const fiber = this.sourcing;
19296
+ this.sourcing = void 0;
19297
+ if (fiber !== void 0) runFork(interrupt(fiber));
19298
+ }
19256
19299
  loadSource() {
19257
19300
  return gen({ self: this }, function* () {
19258
19301
  const branch = selectedBranch(this.state);
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.136",
26
+ "version": "0.1.0-alpha.137",
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": {