@eliya-oss/agent-diff 0.1.0-alpha.163 → 0.1.0-alpha.165
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/.claude/skills/create-pr/SKILL.md +15 -0
- package/.claude/skills/release-notes/SKILL.md +14 -0
- package/CHANGELOG.md +12 -0
- package/dist/main.js +116 -19
- package/package.json +1 -1
|
@@ -118,6 +118,21 @@ duration, no dimensions, no file size.
|
|
|
118
118
|
After the prose and after `## What changed`, before anything else. A reviewer reads what changed,
|
|
119
119
|
then watches it.
|
|
120
120
|
|
|
121
|
+
## The whole template
|
|
122
|
+
|
|
123
|
+
```markdown
|
|
124
|
+
### What changed
|
|
125
|
+
|
|
126
|
+
<one paragraph, 200-300 characters, high level, technical>
|
|
127
|
+
|
|
128
|
+
### Recorded tests
|
|
129
|
+
|
|
130
|
+
<the pnpm record section, when the branch adds tests that press keys>
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
Two headings, in that order, and nothing else: no prose above `### What changed`, no "why", no
|
|
134
|
+
investigation, no test counts. A branch with no recordings carries the first heading alone.
|
|
135
|
+
|
|
121
136
|
## Check the body before it is posted
|
|
122
137
|
|
|
123
138
|
```bash
|
|
@@ -209,6 +209,20 @@ The repro. Then what the fix was.
|
|
|
209
209
|
"verified twice". CI says whether the tests pass.
|
|
210
210
|
- **Anything from a private repository.** See below.
|
|
211
211
|
|
|
212
|
+
### The template
|
|
213
|
+
|
|
214
|
+
A body is two headings and nothing else:
|
|
215
|
+
|
|
216
|
+
```markdown
|
|
217
|
+
### What changed
|
|
218
|
+
|
|
219
|
+
<one paragraph, 200-300 characters, high level, technical>
|
|
220
|
+
|
|
221
|
+
### Recorded tests
|
|
222
|
+
|
|
223
|
+
<what pnpm record printed>
|
|
224
|
+
```
|
|
225
|
+
|
|
212
226
|
### The body says what changed, and nothing about who asked
|
|
213
227
|
|
|
214
228
|
A body is the change, not its history. Two rules, and a command that enforces both:
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.165
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(review): A comment is called lost only when its line is gone from the whole file, not merely from the shown hunks, and the ones the branch really moved past are folded into a section of their own that says how many there are and opens with `l`.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.164
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- fix(diff): A stretch of code takes the first colour the highlighter gives it, so a `.tsx` file no longer paints tag names and identifiers as numbers where the highlighter answered with a name, a type and a constant for the same range.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.163
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -10577,7 +10577,7 @@ var init_error = __esmMin((() => {
|
|
|
10577
10577
|
}));
|
|
10578
10578
|
//#endregion
|
|
10579
10579
|
//#region src/cli/commands.ts
|
|
10580
|
-
var realOf, CONTEXT, POLL, AUTO, askedFor$1, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, waitingOn, summaryOf, summaryFor, listBranches, readParts, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, whereItSitsNow$1, sentIn, listSent, anchorIn, commentsIn, commentIn, submitComment, submitComments, without$2, submitReply, listPatches, patchIn, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, readPreferences, readPreference, ON, OFF, preferenceValue, savePreference, listRefs, setBase, clearBase, markRead;
|
|
10580
|
+
var realOf, CONTEXT, POLL, AUTO, askedFor$1, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, waitingOn, summaryOf, summaryFor, listBranches, readParts, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, whereItSitsNow$1, linesIn, lastLineOf, nearestLine, stillInFile, foundOutsideTheHunks, sentIn, listSent, anchorIn, commentsIn, commentIn, submitComment, submitComments, without$2, submitReply, listPatches, patchIn, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, readPreferences, readPreference, ON, OFF, preferenceValue, savePreference, listRefs, setBase, clearBase, markRead;
|
|
10581
10581
|
var init_commands = __esmMin((() => {
|
|
10582
10582
|
init_dist();
|
|
10583
10583
|
init_patch();
|
|
@@ -10844,13 +10844,43 @@ var init_commands = __esmMin((() => {
|
|
|
10844
10844
|
})
|
|
10845
10845
|
});
|
|
10846
10846
|
};
|
|
10847
|
+
linesIn = (found) => getOrElse$1(found, () => []);
|
|
10848
|
+
lastLineOf = (snippet) => snippet.split("\n").map((line) => line.trim()).findLast((line) => line.length > 0) ?? "";
|
|
10849
|
+
nearestLine = (source, wanted, was) => {
|
|
10850
|
+
const found = source.flatMap((line, at) => line.trim() === wanted ? [at + 1] : []);
|
|
10851
|
+
if (found.length === 0) return void 0;
|
|
10852
|
+
return found.reduce((best, line) => Math.abs(line - was) < Math.abs(best - was) ? line : best);
|
|
10853
|
+
};
|
|
10854
|
+
stillInFile = (comment, source) => {
|
|
10855
|
+
const line = nearestLine(source, lastLineOf(comment.snippet), comment.end);
|
|
10856
|
+
if (line === void 0) return comment;
|
|
10857
|
+
const span = Math.max(0, comment.end - comment.start);
|
|
10858
|
+
return {
|
|
10859
|
+
...comment,
|
|
10860
|
+
start: line - span,
|
|
10861
|
+
end: line,
|
|
10862
|
+
placed: true
|
|
10863
|
+
};
|
|
10864
|
+
};
|
|
10865
|
+
foundOutsideTheHunks = fn("Cli.foundOutsideTheHunks")(function* (worktree, held, shown) {
|
|
10866
|
+
const wanted = held.filter((comment) => comment.placed === false && shown.has(comment.file) && comment.start !== 1e5 && comment.snippet.trim().length > 0);
|
|
10867
|
+
if (wanted.length === 0) return held;
|
|
10868
|
+
const git = yield* Git;
|
|
10869
|
+
const paths = [...new Set(wanted.map((comment) => comment.file))];
|
|
10870
|
+
const readOne = (path) => map(git.source(worktree, path), (found) => [path, linesIn(found)]);
|
|
10871
|
+
const read = yield* forEach(paths, readOne);
|
|
10872
|
+
const sources = new Map(read);
|
|
10873
|
+
const asked = new Set(wanted.map((comment) => comment.id));
|
|
10874
|
+
return held.map((comment) => asked.has(comment.id) ? stillInFile(comment, sources.get(comment.file) ?? []) : comment);
|
|
10875
|
+
});
|
|
10847
10876
|
sentIn = fn("Cli.sentIn")(function* (reading) {
|
|
10848
10877
|
const store = yield* Store;
|
|
10849
10878
|
const worktree = reading.worktree;
|
|
10850
10879
|
const spoken = yield* store.answers(worktree.path);
|
|
10851
10880
|
const current = yield* store.state(worktree.path);
|
|
10852
10881
|
const shown = new Set(reading.patches.map((patch) => patch.path));
|
|
10853
|
-
const
|
|
10882
|
+
const placed = flatten(yield* store.inbox(worktree.path)).map((comment) => whereItSitsNow$1(reading.patches, comment));
|
|
10883
|
+
const held = yield* foundOutsideTheHunks(worktree, placed, shown);
|
|
10854
10884
|
const replies = held.filter((comment) => comment.replyTo !== void 0);
|
|
10855
10885
|
const conversation = {
|
|
10856
10886
|
spoken,
|
|
@@ -11343,7 +11373,7 @@ var init_pane = __esmMin((() => {
|
|
|
11343
11373
|
//#region package.json
|
|
11344
11374
|
init_drafts();
|
|
11345
11375
|
init_pane();
|
|
11346
|
-
var version$1 = "0.1.0-alpha.
|
|
11376
|
+
var version$1 = "0.1.0-alpha.165";
|
|
11347
11377
|
//#endregion
|
|
11348
11378
|
//#region src/cli/upgrade.ts
|
|
11349
11379
|
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$1, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, SAY_SKILL_TOO, upgradeReport;
|
|
@@ -13987,7 +14017,7 @@ var init_tree = __esmMin((() => {
|
|
|
13987
14017
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
13988
14018
|
};
|
|
13989
14019
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
13990
|
-
})), HOLDS, chosenNow, withChosen, preferenceRows, nothingReviewed, nothingFound, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, kept, layerHolds, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, NOTHING_LEFT, textRows, emptyRows, layerBody, holdsCursor, layerCard, layerRows, nearFirst, layerFitted, restingAt, railTop, PANE_CHROME$1, layerRoomIn, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, partHere, layersHolding, readIn, treeStart, treeWindow, MINUTE, HOUR, DAY, sinceThen, threadStand, STAND_WEIGHT, louder, threadsOn, hiddenLines, rowsUnder, markedStands, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, remarkAnswering, answerTarget, replyTarget, threadReplying, VOICES, remarkQuote, threadQuote, pickedText, takenRows, selectedLines, shownMatches, refsShown, picking, refHere, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, needingRowsIn, commentRowsIn, threadsAtRow, remarkShown, remarksAtRow, remarkRowsIn, stopsIn, stopsAtRow, remarkAtStop, remarkAtRow, remarkInPanel, remarkInDiff, remarkUnderCursor, remarkToTakeOn, remarkHere, threadHere, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, SECTION_OF, sectionOf, sentEntry, remarkRows, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
14020
|
+
})), HOLDS, chosenNow, withChosen, preferenceRows, nothingReviewed, nothingFound, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, kept, layerHolds, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, NOTHING_LEFT, textRows, emptyRows, layerBody, holdsCursor, layerCard, layerRows, nearFirst, layerFitted, restingAt, railTop, PANE_CHROME$1, layerRoomIn, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, partHere, layersHolding, readIn, treeStart, treeWindow, MINUTE, HOUR, DAY, sinceThen, threadStand, STAND_WEIGHT, louder, threadsOn, hiddenLines, rowsUnder, markedStands, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, remarkAnswering, answerTarget, replyTarget, threadReplying, VOICES, remarkQuote, threadQuote, pickedText, takenRows, selectedLines, shownMatches, refsShown, picking, refHere, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, needingRowsIn, commentRowsIn, threadsAtRow, remarkShown, remarksAtRow, remarkRowsIn, stopsIn, stopsAtRow, remarkAtStop, remarkAtRow, remarkInPanel, remarkInDiff, remarkUnderCursor, remarkToTakeOn, remarkHere, threadHere, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, SECTION_OF, movedPast, sectionOf, sentEntry, remarkRows, panelHolds, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
13991
14021
|
var init_model$1 = __esmMin((() => {
|
|
13992
14022
|
init_dist();
|
|
13993
14023
|
init_patch();
|
|
@@ -14075,6 +14105,7 @@ var init_model$1 = __esmMin((() => {
|
|
|
14075
14105
|
closed: [],
|
|
14076
14106
|
vouched: [],
|
|
14077
14107
|
partsRead: [],
|
|
14108
|
+
openMoved: false,
|
|
14078
14109
|
sent: [],
|
|
14079
14110
|
remarks: [],
|
|
14080
14111
|
viewport: 20,
|
|
@@ -14712,6 +14743,7 @@ var init_model$1 = __esmMin((() => {
|
|
|
14712
14743
|
"filed",
|
|
14713
14744
|
"with",
|
|
14714
14745
|
"answered",
|
|
14746
|
+
"movedOn",
|
|
14715
14747
|
"settled",
|
|
14716
14748
|
"removed",
|
|
14717
14749
|
"dismissed"
|
|
@@ -14732,7 +14764,8 @@ var init_model$1 = __esmMin((() => {
|
|
|
14732
14764
|
answered: "answered",
|
|
14733
14765
|
waiting: "with"
|
|
14734
14766
|
};
|
|
14735
|
-
|
|
14767
|
+
movedPast = (comment) => comment.outside === true && comment.settled !== true && comment.removed !== true;
|
|
14768
|
+
sectionOf = (comment) => movedPast(comment) ? "movedOn" : SECTION_OF[threadStand(comment)];
|
|
14736
14769
|
sentEntry = (state, comment) => {
|
|
14737
14770
|
const newer = newerOf(state, comment);
|
|
14738
14771
|
return {
|
|
@@ -14748,6 +14781,10 @@ var init_model$1 = __esmMin((() => {
|
|
|
14748
14781
|
section,
|
|
14749
14782
|
remark
|
|
14750
14783
|
}));
|
|
14784
|
+
panelHolds = (state) => panelEntries({
|
|
14785
|
+
...state,
|
|
14786
|
+
openMoved: true
|
|
14787
|
+
}).filter((entry) => entry.kind !== "fold");
|
|
14751
14788
|
panelEntries = (state) => {
|
|
14752
14789
|
const shown = state.hideSettled ? state.sent.filter((comment) => comment.settled !== true) : state.sent;
|
|
14753
14790
|
const waiting = state.held.map((comment) => ({
|
|
@@ -14765,7 +14802,15 @@ var init_model$1 = __esmMin((() => {
|
|
|
14765
14802
|
];
|
|
14766
14803
|
const ordered = (section) => {
|
|
14767
14804
|
const found = delivered.filter((entry) => entry.section === section);
|
|
14768
|
-
|
|
14805
|
+
const held = state.newestFirst ? found.toReversed() : found;
|
|
14806
|
+
if (section !== "movedOn" || held.length === 0) return held;
|
|
14807
|
+
const fold = {
|
|
14808
|
+
kind: "fold",
|
|
14809
|
+
section,
|
|
14810
|
+
held: held.length,
|
|
14811
|
+
open: state.openMoved
|
|
14812
|
+
};
|
|
14813
|
+
return state.openMoved ? [fold, ...held] : [fold];
|
|
14769
14814
|
};
|
|
14770
14815
|
return PANEL_SECTIONS.flatMap((section) => ordered(section));
|
|
14771
14816
|
};
|
|
@@ -16012,7 +16057,7 @@ var init_match = __esmMin((() => {
|
|
|
16012
16057
|
}));
|
|
16013
16058
|
//#endregion
|
|
16014
16059
|
//#region src/tui/reduce.ts
|
|
16015
|
-
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, paneShown, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, BACK_FROM, goBack, walkMatches, openPalette, openKeys, openSettings, moveSettings, flipSetting, 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;
|
|
16060
|
+
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, paneShown, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, foldMoved, overFold, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, BACK_FROM, goBack, walkMatches, openPalette, openKeys, openSettings, moveSettings, flipSetting, 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;
|
|
16016
16061
|
var init_reduce = __esmMin((() => {
|
|
16017
16062
|
init_dist();
|
|
16018
16063
|
init_patch();
|
|
@@ -16320,7 +16365,17 @@ var init_reduce = __esmMin((() => {
|
|
|
16320
16365
|
opened: shut ? rest : [...rest, id]
|
|
16321
16366
|
};
|
|
16322
16367
|
};
|
|
16368
|
+
foldMoved = (state, shut) => shut ? {
|
|
16369
|
+
...state,
|
|
16370
|
+
openMoved: false
|
|
16371
|
+
} : {
|
|
16372
|
+
...state,
|
|
16373
|
+
openMoved: true,
|
|
16374
|
+
panelIndex: state.panelIndex + 1
|
|
16375
|
+
};
|
|
16376
|
+
overFold = (state) => state.focus === "review" && panelEntry(state)?.kind === "fold";
|
|
16323
16377
|
fold = (state, shut) => {
|
|
16378
|
+
if (overFold(state)) return foldMoved(state, shut);
|
|
16324
16379
|
const thread = threadAtStop(state);
|
|
16325
16380
|
if (thread?.id !== void 0 && thread.settled === true) return foldThread(state, shut, thread.id);
|
|
16326
16381
|
return onLayers(state) ? foldLayer(state, shut) : foldDirectory(state, shut);
|
|
@@ -17069,7 +17124,7 @@ var init_theme = __esmMin((() => {
|
|
|
17069
17124
|
"note.label": { fg: "#7aa2f7" },
|
|
17070
17125
|
default: { fg: ink }
|
|
17071
17126
|
};
|
|
17072
|
-
})), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, 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, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
17127
|
+
})), WASH, NOTE_MIN, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, numbered, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, firstOfEach, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, 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, rowsFor, replacedBy, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
17073
17128
|
var init_diffview = __esmMin((() => {
|
|
17074
17129
|
init_dist();
|
|
17075
17130
|
init_patch();
|
|
@@ -17591,14 +17646,25 @@ var init_diffview = __esmMin((() => {
|
|
|
17591
17646
|
line += 1;
|
|
17592
17647
|
}
|
|
17593
17648
|
};
|
|
17649
|
+
firstOfEach = (found) => {
|
|
17650
|
+
const seen = /* @__PURE__ */ new Set();
|
|
17651
|
+
const kept = [];
|
|
17652
|
+
for (const [from, to, group] of found) {
|
|
17653
|
+
const range = `${from}:${to}`;
|
|
17654
|
+
if (seen.has(range)) continue;
|
|
17655
|
+
seen.add(range);
|
|
17656
|
+
kept.push([
|
|
17657
|
+
from,
|
|
17658
|
+
to,
|
|
17659
|
+
group
|
|
17660
|
+
]);
|
|
17661
|
+
}
|
|
17662
|
+
return kept;
|
|
17663
|
+
};
|
|
17594
17664
|
spansByLine = (lines, found) => {
|
|
17595
17665
|
const starts = lineStarts(lines);
|
|
17596
17666
|
const held = lines.map(() => []);
|
|
17597
|
-
for (const
|
|
17598
|
-
from,
|
|
17599
|
-
to,
|
|
17600
|
-
group
|
|
17601
|
-
]);
|
|
17667
|
+
for (const span of firstOfEach(found)) acrossLines(lines, starts, held, span);
|
|
17602
17668
|
return held;
|
|
17603
17669
|
};
|
|
17604
17670
|
textAt = (display, pan, covered = 0) => {
|
|
@@ -17783,7 +17849,7 @@ var init_diffview = __esmMin((() => {
|
|
|
17783
17849
|
}));
|
|
17784
17850
|
//#endregion
|
|
17785
17851
|
//#region src/tui/render.ts
|
|
17786
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, SENDS, REPLIES, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, LEGEND_ROWS, LEGEND, legendText, keysTitle, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, DIFF_FLOOR, COMPOSE_EDGE, CRAMPED, CRAMPED_ROWS, DIFF_CHROME_MOST, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, keysOf, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, PLAIN_PICKED, PICKED, PLAIN_CURSOR, UNDER_CURSOR, GAP_PAINT, frameRoot, crampedBar, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, SHEET_GAP, sheetRow, groupedBy, sheetBlock, splitInTwo, sheetPaint, sheetDeep, sheetText, SETTING_LEAD, settingsText, stack, makeBody, makeHome, makeModals, makeBaseParts, makeSettingsParts, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, remarksOf, notesFor, paired, chipWidth, WAYS_OUT, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, panLabel, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, GUTTER, DIR_LEAD, TITLE_LEAD, FILE_LEAD, STALE_ROOM, STALE_ASKING, STALE_LONG, STALE_MIDDLE, STALE_SHORT, staleSaid, staleBanner, litRow, leftOver, titlePaint, titleMark, titleLook, fileMark, fileLook, layerLook, layerGutter, layerText, standingOnThread, standingOnRemark, standingOnDismissed, offeredIn, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, counting, foundBlocks, JOIN, foundTitle, CHANGED_MARK, DECLARED, fileRow, leftRow, placeRow, blockOf, aroundRow, windowedBlocks, pickingTitle, YOURS, YOUR_REF, pickedTail, REMARK_MARK, remarkWhere, wherePart, panelFile, panelWhere, panelBody, panelMark, lostCode, lostEntry, writtenOn, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
17852
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, SENDS, REPLIES, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, LEGEND_ROWS, LEGEND, legendText, keysTitle, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, DIFF_FLOOR, COMPOSE_EDGE, CRAMPED, CRAMPED_ROWS, DIFF_CHROME_MOST, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, keysOf, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, PLAIN_PICKED, PICKED, PLAIN_CURSOR, UNDER_CURSOR, GAP_PAINT, frameRoot, crampedBar, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, SHEET_GAP, sheetRow, groupedBy, sheetBlock, splitInTwo, sheetPaint, sheetDeep, sheetText, SETTING_LEAD, settingsText, stack, makeBody, makeHome, makeModals, makeBaseParts, makeSettingsParts, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, remarksOf, notesFor, paired, chipWidth, WAYS_OUT, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, panLabel, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, GUTTER, DIR_LEAD, TITLE_LEAD, FILE_LEAD, STALE_ROOM, STALE_ASKING, STALE_LONG, STALE_MIDDLE, STALE_SHORT, staleSaid, staleBanner, litRow, leftOver, titlePaint, titleMark, titleLook, fileMark, fileLook, layerLook, layerGutter, layerText, standingOnThread, standingOnRemark, standingOnDismissed, offeredIn, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, counting, foundBlocks, JOIN, foundTitle, CHANGED_MARK, DECLARED, fileRow, leftRow, placeRow, blockOf, aroundRow, windowedBlocks, pickingTitle, YOURS, YOUR_REF, pickedTail, REMARK_MARK, remarkWhere, wherePart, panelFile, panelWhere, panelBody, panelMark, lostCode, lostEntry, writtenOn, foldLine, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
17787
17853
|
var init_render = __esmMin((() => {
|
|
17788
17854
|
init_dist();
|
|
17789
17855
|
init_command();
|
|
@@ -18714,6 +18780,7 @@ var init_render = __esmMin((() => {
|
|
|
18714
18780
|
filed: "Not picked up",
|
|
18715
18781
|
with: "Picked up, no answer",
|
|
18716
18782
|
answered: "Answered, not settled",
|
|
18783
|
+
movedOn: "The branch moved past these",
|
|
18717
18784
|
settled: "Settled",
|
|
18718
18785
|
removed: "Removed"
|
|
18719
18786
|
};
|
|
@@ -18835,25 +18902,34 @@ var init_render = __esmMin((() => {
|
|
|
18835
18902
|
return known ? " · outside this diff" : " · not in the diff";
|
|
18836
18903
|
};
|
|
18837
18904
|
wherePart = (state, entry) => {
|
|
18905
|
+
if (entry.kind === "fold") return "";
|
|
18838
18906
|
if (entry.kind === "remark") {
|
|
18839
18907
|
const known = state.patches.some((patch) => patch.path === entry.remark.file);
|
|
18840
18908
|
return remarkWhere(entry.remark, known);
|
|
18841
18909
|
}
|
|
18842
18910
|
return entry.comment.outside === true ? " · not in the diff" : `:${entry.comment.end}`;
|
|
18843
18911
|
};
|
|
18844
|
-
panelFile = (entry) =>
|
|
18912
|
+
panelFile = (entry) => {
|
|
18913
|
+
if (entry.kind === "fold") return "";
|
|
18914
|
+
return entry.kind === "remark" ? entry.remark.file : entry.comment.file;
|
|
18915
|
+
};
|
|
18845
18916
|
panelWhere = (state, entry, room) => {
|
|
18846
18917
|
const where = wherePart(state, entry);
|
|
18847
18918
|
return `${clipPath(panelFile(entry), Math.max(4, room - where.length))}${where}`;
|
|
18848
18919
|
};
|
|
18849
18920
|
panelBody = (entry) => {
|
|
18921
|
+
if (entry.kind === "fold") return "";
|
|
18850
18922
|
return (entry.kind === "remark" ? `@${entry.remark.by} ${entry.remark.body}` : entry.comment.body).split("\n").find((line) => line.trim().length > 0) ?? "";
|
|
18851
18923
|
};
|
|
18852
|
-
panelMark = (entry) =>
|
|
18924
|
+
panelMark = (entry) => {
|
|
18925
|
+
if (entry.kind === "fold") return entry.open ? marks().open : marks().shut;
|
|
18926
|
+
return entry.kind === "remark" ? REMARK_MARK : standMark(threadStand(entry.comment));
|
|
18927
|
+
};
|
|
18853
18928
|
lostCode = (entry) => {
|
|
18929
|
+
if (entry.kind === "fold") return [];
|
|
18854
18930
|
return (entry.kind === "remark" ? entry.remark.code : (entry.comment.snippet ?? "").split("\n")).filter((line) => line.trim().length > 0);
|
|
18855
18931
|
};
|
|
18856
|
-
lostEntry = (state, entry) => entry.kind === "remark" ? !entry.remark.placed && state.patches.some((patch) => patch.path === entry.remark.file) : entry.comment.outside === true;
|
|
18932
|
+
lostEntry = (state, entry) => entry.kind === "fold" ? false : entry.kind === "remark" ? !entry.remark.placed && state.patches.some((patch) => patch.path === entry.remark.file) : entry.comment.outside === true;
|
|
18857
18933
|
writtenOn = (state, placed, room) => {
|
|
18858
18934
|
const { entry } = placed;
|
|
18859
18935
|
if (placed.at !== state.panelIndex || !lostEntry(state, entry)) return [];
|
|
@@ -18878,8 +18954,21 @@ var init_render = __esmMin((() => {
|
|
|
18878
18954
|
...rows
|
|
18879
18955
|
];
|
|
18880
18956
|
};
|
|
18957
|
+
foldLine = (state, placed, room) => {
|
|
18958
|
+
const { entry } = placed;
|
|
18959
|
+
if (entry.kind !== "fold") return [];
|
|
18960
|
+
const here = placed.at === state.panelIndex;
|
|
18961
|
+
const said = entry.open ? "h folds them away" : "l opens them";
|
|
18962
|
+
const text = ` ${panelMark(entry)} ${entry.held} ${entry.held === 1 ? "comment" : "comments"} · ${said}`;
|
|
18963
|
+
return [{
|
|
18964
|
+
text: clip(text, room),
|
|
18965
|
+
tone: palette.faint,
|
|
18966
|
+
here
|
|
18967
|
+
}];
|
|
18968
|
+
};
|
|
18881
18969
|
panelPair = (state, placed, room) => {
|
|
18882
18970
|
const { entry } = placed;
|
|
18971
|
+
if (entry.kind === "fold") return foldLine(state, placed, room);
|
|
18883
18972
|
const lead = ` ${panelMark(entry)} `;
|
|
18884
18973
|
const here = placed.at === state.panelIndex;
|
|
18885
18974
|
return [
|
|
@@ -18936,8 +19025,9 @@ var init_render = __esmMin((() => {
|
|
|
18936
19025
|
entry,
|
|
18937
19026
|
at
|
|
18938
19027
|
}));
|
|
18939
|
-
const
|
|
18940
|
-
const
|
|
19028
|
+
const holds = panelHolds(state);
|
|
19029
|
+
const fresh = holds.filter((entry) => entry.kind === "comment" && entry.fresh).length;
|
|
19030
|
+
const unread = holds.filter((entry) => entry.kind === "comment" && entry.unread > 0).length;
|
|
18941
19031
|
const said = fresh > 0 ? `${fresh} ${PULL_HINT}` : unread > 0 ? `${unread} unread` : "";
|
|
18942
19032
|
const banner = said.length === 0 ? [] : [{
|
|
18943
19033
|
text: clip(said, room),
|
|
@@ -20786,6 +20876,13 @@ var init_app = __esmMin((() => {
|
|
|
20786
20876
|
this.commit(withNoticeHere(this.state, "nothing in the review yet"));
|
|
20787
20877
|
return;
|
|
20788
20878
|
}
|
|
20879
|
+
if (entry.kind === "fold") {
|
|
20880
|
+
this.commit({
|
|
20881
|
+
...this.state,
|
|
20882
|
+
openMoved: !entry.open
|
|
20883
|
+
});
|
|
20884
|
+
return;
|
|
20885
|
+
}
|
|
20789
20886
|
if (entry.kind === "remark") {
|
|
20790
20887
|
yield* this.openRemark(entry.remark);
|
|
20791
20888
|
return;
|
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.
|
|
26
|
+
"version": "0.1.0-alpha.165",
|
|
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": {
|