@eliya-oss/agent-diff 0.1.0-alpha.175 → 0.1.0-alpha.177

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,31 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.177
4
+
5
+ ### Patch Changes
6
+
7
+ - feat(review): `]` on the last file comes around to the first, `[` on the first to the last, and `j`/`k` in the file list do the same.
8
+
9
+ <details><summary>What was wrong</summary>
10
+
11
+ The walk stopped at either end, so getting from the last file back to the first meant pressing `[`
12
+ once per file. The footer says `around to the first file` when the walk wraps.
13
+
14
+ </details>
15
+
16
+ ## 0.1.0-alpha.176
17
+
18
+ ### Patch Changes
19
+
20
+ - fix(diff pane): a comment held until the review is sent shows under its line, marked waiting to be sent.
21
+
22
+ <details><summary>What was wrong</summary>
23
+
24
+ With holding on, a written comment reached only the review panel. The diff showed nothing under the
25
+ line, so a line you had commented on looked like one you had not.
26
+
27
+ </details>
28
+
3
29
  ## 0.1.0-alpha.175
4
30
 
5
31
  ### Patch Changes
package/dist/main.js CHANGED
@@ -10027,7 +10027,7 @@ var init_config = __esmMin((() => {
10027
10027
  //#region package.json
10028
10028
  init_pane();
10029
10029
  init_config();
10030
- var version$1 = "0.1.0-alpha.175";
10030
+ var version$1 = "0.1.0-alpha.177";
10031
10031
  //#endregion
10032
10032
  //#region src/cli/error.ts
10033
10033
  var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered;
@@ -17189,7 +17189,7 @@ var init_notes = __esmMin((() => {
17189
17189
  const patch = selectedPatch(state);
17190
17190
  const found = /* @__PURE__ */ new Map();
17191
17191
  if (patch === void 0) return found;
17192
- const here = state.sent.filter((entry) => entry.file === patch.path && entry.removed !== true && entry.outside !== true);
17192
+ const here = [...state.sent, ...state.held].filter((entry) => entry.file === patch.path && entry.removed !== true && entry.outside !== true);
17193
17193
  for (const entry of here) {
17194
17194
  const stand = threadStand(entry);
17195
17195
  for (const row of rowsUnder(patch, entry)) found.set(row, louderOf(stand, found.get(row) ?? "gone"));
@@ -17247,7 +17247,7 @@ var init_notes = __esmMin((() => {
17247
17247
  commentRowsIn = (state, fileIndex) => {
17248
17248
  const patch = fileIndex === state.patchIndex ? selectedPatch(state) : state.patches[fileIndex];
17249
17249
  if (patch === void 0) return [];
17250
- const notes = state.sent.filter((entry) => entry.file === patch.path && entry.outside !== true);
17250
+ const notes = [...state.sent, ...state.held].filter((entry) => entry.file === patch.path && entry.outside !== true);
17251
17251
  return patch.rows.filter((row) => notes.some((note) => lineOnSide(row, note.side) === note.end)).map((row) => row.index).toSorted((left, right) => left - right);
17252
17252
  };
17253
17253
  draftPlace = (state) => {
@@ -17389,7 +17389,7 @@ var init_notes = __esmMin((() => {
17389
17389
  }));
17390
17390
  //#endregion
17391
17391
  //#region src/tui/reduce.ts
17392
- var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, restingOn, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, atLayer, moveLayer, inRail, railScrolled, movePanel, layerDown, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, paneShown, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, foldMoved, overFold, readingThread, overThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile$1, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, BACK_FROM, goBack$1, walkMatches$1, openPalette, openKeys, openSettings, moveSettings, flipSetting, moveAsk, moveRef, withChoices, withRefs, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withRemarks, 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, withAround, withNoticeHere, withNotice;
17392
+ var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, restingOn, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, atLayer, moveLayer, inRail, railScrolled, movePanel, layerDown, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, paneShown, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, foldMoved, overFold, readingThread, overThread, fold, moveBranch, landingOn, revealing, atTheEnd, aroundTheEnd, CAME_AROUND, moveFile$1, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, BACK_FROM, goBack$1, walkMatches$1, openPalette, openKeys, openSettings, moveSettings, flipSetting, moveAsk, moveRef, withChoices, withRefs, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withRemarks, 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, withAround, withNoticeHere, withNotice;
17393
17393
  var init_reduce = __esmMin((() => {
17394
17394
  init_dist();
17395
17395
  init_patch();
@@ -17775,13 +17775,22 @@ var init_reduce = __esmMin((() => {
17775
17775
  const wanted = at + delta;
17776
17776
  return at !== -1 && (wanted < 0 || wanted >= readingOrder(state).length);
17777
17777
  };
17778
+ aroundTheEnd = (state, delta) => {
17779
+ const at = placeIn(state);
17780
+ return delta > 0 ? -at : readingOrder(state).length - 1 - at;
17781
+ };
17782
+ CAME_AROUND = {
17783
+ forward: "around to the first file",
17784
+ back: "around to the last file"
17785
+ };
17778
17786
  moveFile$1 = (state, delta) => {
17779
- if (atTheEnd(state, delta)) return withNoticeHere(state, delta > 0 ? "last file" : "first file");
17780
- const next = layerFile(state, delta);
17781
- const layer = onLayers(state) ? layerAfter(state, delta) : state.layerIndex;
17787
+ const around = atTheEnd(state, delta);
17788
+ const step = around ? aroundTheEnd(state, delta) : delta;
17789
+ const next = layerFile(state, step);
17790
+ const layer = onLayers(state) ? layerAfter(state, step) : state.layerIndex;
17782
17791
  return {
17783
17792
  ...state,
17784
- notice: "",
17793
+ notice: around ? CAME_AROUND[delta > 0 ? "forward" : "back"] : "",
17785
17794
  layerIndex: layer,
17786
17795
  openLayers: state.openLayers.includes(layer) ? state.openLayers : [...state.openLayers, layer],
17787
17796
  closed: revealing(state, next),
@@ -18525,7 +18534,7 @@ var init_theme = __esmMin((() => {
18525
18534
  "note.label": { fg: "#7aa2f7" },
18526
18535
  default: { fg: ink }
18527
18536
  };
18528
- })), Code, Gap, Comment, Label, DraftLine, ProseLine, $is, $match, isCode, isDraft, isProse, isSaid, isNote, isChrome, WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, firstOfEach, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, SAID_INDENT, REMARK_MARK$1, remarkHead, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, DRAFT_STOP, draftText, draftRows, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
18537
+ })), Code, Gap, Comment, Label, DraftLine, ProseLine, $is, $match, isCode, isDraft, isProse, isSaid, isNote, isChrome, WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, firstOfEach, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, SAID_INDENT, REMARK_MARK$1, remarkHead, HELD_HEAD, commentHead, headOf, spokenLines, heardFrom, answerLines, REMARK_LINES, capped, bodyLines, saidLines, noteLines, REMARK_RULE, noteRows, proseRows, freshLines, proseAt, apart, notesAt, TRAILING, shownText, codeRow, DRAFT_STOP, draftText, draftRows, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
18529
18538
  var init_diffview = __esmMin((() => {
18530
18539
  init_dist();
18531
18540
  init_patch();
@@ -19022,6 +19031,7 @@ var init_diffview = __esmMin((() => {
19022
19031
  };
19023
19032
  noteKey = (note) => [
19024
19033
  `${note.side}${note.line}:${note.folded ? "-" : "+"}${note.body}`,
19034
+ note.sent ? "sent" : "held",
19025
19035
  note.settled ? "settled" : note.asks ? "asked" : "open",
19026
19036
  ...note.turns.length > 0 ? note.turns.map((turn) => `${turn.voice[0] ?? ""}:${turn.body}`) : note.answers.map((body) => `a:${body}`)
19027
19037
  ].join("");
@@ -19145,6 +19155,7 @@ var init_diffview = __esmMin((() => {
19145
19155
  SAID_INDENT = 2;
19146
19156
  REMARK_MARK$1 = "◇";
19147
19157
  remarkHead = (note, from) => `${REMARK_MARK$1} @${from}${note.stale ? " · outdated" : ""}`;
19158
+ HELD_HEAD = "waiting to be sent";
19148
19159
  commentHead = (note) => {
19149
19160
  const moved = note.stale ? ", the branch moved on" : "";
19150
19161
  if (note.settled) return `${marks().done} settled${moved}`;
@@ -19154,7 +19165,10 @@ var init_diffview = __esmMin((() => {
19154
19165
  if (note.takenAt === void 0) return `${marks().sent} sent${moved}`;
19155
19166
  return `${marks().waiting} picked up ${agoText(note.takenAt, note.now)}${moved}`;
19156
19167
  };
19157
- headOf = (note) => note.from === void 0 ? commentHead(note) : remarkHead(note, note.from);
19168
+ headOf = (note) => {
19169
+ if (note.from !== void 0) return remarkHead(note, note.from);
19170
+ return note.sent ? commentHead(note) : `${marks().filed} ${HELD_HEAD}`;
19171
+ };
19158
19172
  spokenLines = (body, room, mark) => {
19159
19173
  return body.split("\n").flatMap((line) => wrap(line, Math.max(NOTE_MIN, room - 2))).map((text, at) => at === 0 ? `${mark} ${text}` : ` ${text}`);
19160
19174
  };
@@ -19378,10 +19392,17 @@ var init_notespane = __esmMin((() => {
19378
19392
  takenAt: void 0,
19379
19393
  now: state.now
19380
19394
  }));
19381
- notesFor = (state, path) => [...notesOf(stillThere(state.sent), path, true, {
19382
- opened: state.opened,
19383
- now: state.now
19384
- }), ...remarksOf(state, path)];
19395
+ notesFor = (state, path) => [
19396
+ ...notesOf(stillThere(state.sent), path, true, {
19397
+ opened: state.opened,
19398
+ now: state.now
19399
+ }),
19400
+ ...notesOf(state.held, path, false, {
19401
+ opened: state.opened,
19402
+ now: state.now
19403
+ }),
19404
+ ...remarksOf(state, path)
19405
+ ];
19385
19406
  standingOnRemark = (state) => remarkHere(state) !== void 0;
19386
19407
  standingOnDismissed = (state) => remarkUnderCursor(state)?.dismissed === true;
19387
19408
  })), PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, remarkWhere, wherePart, panelFile, panelWhere, panelBody, panelMark, lostCode, lostEntry, writtenOn, foldLine, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelPicked, panelText;
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.175",
26
+ "version": "0.1.0-alpha.177",
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": {