@eliya-oss/agent-diff 0.1.0-alpha.126 → 0.1.0-alpha.128
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 +14 -0
- package/dist/main.js +34 -14
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.128
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- A file whose name is not plain ASCII is in the review. git quotes such paths by default, adiff could not read the quoted form, and the file was dropped from the diff entirely — absent from the tree, absent from the count, unreachable by `]`, with nothing saying so. `layers set` reported it to the agent as vanished while it existed, and with layers set the same diff reported one more file than without.
|
|
8
|
+
|
|
9
|
+
Two things introduced earlier today are also fixed. A layer whose files you have all read stopped saying so once `f` hid them — the tick reverted and the layer looked unstarted, because the tally counted the visible files rather than the layer's own. And the leftover layer could say "0 runs of changed lines the layers do not account for" while listing a file; it now says what is actually left over.
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.127
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- The pinned scope keeps the innermost levels rather than the outermost. Deeply nested code pinned the four scopes furthest from the code — so at twelve levels of nesting you were told the class and never the function you were reading. It now pins the outermost one, for orientation, and the innermost ones, and marks the outermost with `⋯` when levels between were dropped.
|
|
16
|
+
|
|
3
17
|
## 0.1.0-alpha.126
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -9710,7 +9710,7 @@ var init_parse$1 = __esmMin((() => {
|
|
|
9710
9710
|
}));
|
|
9711
9711
|
//#endregion
|
|
9712
9712
|
//#region src/domain/patch/sticky.ts
|
|
9713
|
-
var CLOSER, COMMENT, LOOKAHEAD, indentOf, pinnable, limitFrom, stickyChain;
|
|
9713
|
+
var CLOSER, COMMENT, LOOKAHEAD, indentOf, pinnable, limitFrom, stickyChain, kept$1;
|
|
9714
9714
|
var init_sticky = __esmMin((() => {
|
|
9715
9715
|
CLOSER = /^[)\]}>;,]/;
|
|
9716
9716
|
COMMENT = /^(\/\/|\/\*|\*|#|<!--)/;
|
|
@@ -9741,7 +9741,13 @@ var init_sticky = __esmMin((() => {
|
|
|
9741
9741
|
limit = indent;
|
|
9742
9742
|
if (indent === 0) break;
|
|
9743
9743
|
}
|
|
9744
|
-
return chain.toReversed()
|
|
9744
|
+
return kept$1(chain.toReversed(), max);
|
|
9745
|
+
};
|
|
9746
|
+
kept$1 = (chain, max) => {
|
|
9747
|
+
if (chain.length <= max || max < 2) return chain.slice(0, max);
|
|
9748
|
+
const outer = chain[0] ?? "";
|
|
9749
|
+
const inner = chain.slice(chain.length - (max - 1));
|
|
9750
|
+
return [`${outer} ⋯`, ...inner];
|
|
9745
9751
|
};
|
|
9746
9752
|
}));
|
|
9747
9753
|
//#endregion
|
|
@@ -9787,7 +9793,7 @@ var init_run = __esmMin((() => {
|
|
|
9787
9793
|
gitOrEmpty = fn("Git.runOrEmpty")(function* (cwd, args) {
|
|
9788
9794
|
return yield* git(cwd, args).pipe(catchTag("GitCommandFailed", () => succeed$1("")));
|
|
9789
9795
|
});
|
|
9790
|
-
})), GREP_CONTEXT, CACHE_SIZE, NAME_TTL, FRESH_TTL, SPLIT, DEFAULT_BRANCH_CANDIDATES, STAT, Git, parseStat, readEntries, findDefaultBranch, partsOf$1, findMergeBase, toWorktree, branchTips, findParent, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, findRepo, refResolves, sharedCommit, makeCaches, shapeWith, makeGit, GitLive;
|
|
9796
|
+
})), GREP_CONTEXT, CACHE_SIZE, NAME_TTL, FRESH_TTL, SPLIT, DEFAULT_BRANCH_CANDIDATES, PLAIN_PATHS, STAT, Git, parseStat, readEntries, findDefaultBranch, partsOf$1, findMergeBase, toWorktree, branchTips, findParent, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, findRepo, refResolves, sharedCommit, makeCaches, shapeWith, makeGit, GitLive;
|
|
9791
9797
|
var init_service = __esmMin((() => {
|
|
9792
9798
|
init_dist();
|
|
9793
9799
|
init_error$1();
|
|
@@ -9803,6 +9809,7 @@ var init_service = __esmMin((() => {
|
|
|
9803
9809
|
"master",
|
|
9804
9810
|
"main"
|
|
9805
9811
|
];
|
|
9812
|
+
PLAIN_PATHS = ["-c", "core.quotepath=false"];
|
|
9806
9813
|
STAT = /(\d+) files? changed(?:, (\d+) insertions?\(\+\))?(?:, (\d+) deletions?\(-\))?/;
|
|
9807
9814
|
Git = class extends Service()("adiff/Git") {};
|
|
9808
9815
|
parseStat = (raw) => {
|
|
@@ -9917,6 +9924,7 @@ var init_service = __esmMin((() => {
|
|
|
9917
9924
|
const target = worktree.base.length > 0 ? worktree.base : "HEAD";
|
|
9918
9925
|
const scope = only === void 0 ? [] : ["--", only];
|
|
9919
9926
|
return yield* gitOrEmpty(worktree.path, [
|
|
9927
|
+
...PLAIN_PATHS,
|
|
9920
9928
|
"diff",
|
|
9921
9929
|
`-U${context}`,
|
|
9922
9930
|
target,
|
|
@@ -10977,7 +10985,7 @@ var init_pane = __esmMin((() => {
|
|
|
10977
10985
|
init_drafts();
|
|
10978
10986
|
init_init();
|
|
10979
10987
|
init_pane();
|
|
10980
|
-
var version$1 = "0.1.0-alpha.
|
|
10988
|
+
var version$1 = "0.1.0-alpha.128";
|
|
10981
10989
|
//#endregion
|
|
10982
10990
|
//#region src/cli/upgrade.ts
|
|
10983
10991
|
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;
|
|
@@ -11239,7 +11247,7 @@ var init_model$1 = __esmMin((() => {
|
|
|
11239
11247
|
}));
|
|
11240
11248
|
//#endregion
|
|
11241
11249
|
//#region src/domain/layers/coverage.ts
|
|
11242
|
-
var codeBlockOf$1, codeBlocks, noteOf, spansOf$1, changedLines, holds, runsOf, tallyOf, coverage,
|
|
11250
|
+
var codeBlockOf$1, codeBlocks, noteOf, spansOf$1, changedLines, holds, runsOf, tallyOf, coverage, runsSaid, filesSaid, leftSaid, unordered, withFullCoverage, proseAnchors;
|
|
11243
11251
|
var init_coverage = __esmMin((() => {
|
|
11244
11252
|
init_dist();
|
|
11245
11253
|
init_model$1();
|
|
@@ -11295,7 +11303,13 @@ var init_coverage = __esmMin((() => {
|
|
|
11295
11303
|
missing: tallies.flatMap((tally) => tally.missing)
|
|
11296
11304
|
};
|
|
11297
11305
|
};
|
|
11298
|
-
|
|
11306
|
+
runsSaid = (count) => count === 1 ? "One run of changed lines the layers do not account for." : `${count} runs of changed lines the layers do not account for.`;
|
|
11307
|
+
filesSaid = (count) => count === 1 ? "One file the layers had no lines to order." : `${count} files the layers had no lines to order.`;
|
|
11308
|
+
leftSaid = (runs, files) => {
|
|
11309
|
+
if (runs > 0 && files > 0) return `${runsSaid(runs)} ${filesSaid(files)}`;
|
|
11310
|
+
if (runs > 0) return runsSaid(runs);
|
|
11311
|
+
return files > 0 ? filesSaid(files) : "";
|
|
11312
|
+
};
|
|
11299
11313
|
unordered = (patches, layers, missing) => {
|
|
11300
11314
|
const named = /* @__PURE__ */ new Set([...spansOf$1(layers).map((span) => span.path), ...missing.map((span) => span.path)]);
|
|
11301
11315
|
return patches.filter((patch) => !named.has(patch.path)).map((patch) => ({
|
|
@@ -11309,12 +11323,13 @@ var init_coverage = __esmMin((() => {
|
|
|
11309
11323
|
const left = unordered(patches, layers.layers, gap.missing);
|
|
11310
11324
|
const spans = [...gap.missing, ...left];
|
|
11311
11325
|
if (spans.length === 0) return layers;
|
|
11326
|
+
const said = leftSaid(gap.missing.length, left.length);
|
|
11312
11327
|
const remainder = {
|
|
11313
11328
|
title: REMAINDER_TITLE,
|
|
11314
|
-
blocks: [{
|
|
11329
|
+
blocks: [...said.length === 0 ? [] : [{
|
|
11315
11330
|
kind: "prose",
|
|
11316
|
-
markdown:
|
|
11317
|
-
}, ...spans.map((span) => codeBlockOf$1(span))]
|
|
11331
|
+
markdown: said
|
|
11332
|
+
}], ...spans.map((span) => codeBlockOf$1(span))]
|
|
11318
11333
|
};
|
|
11319
11334
|
return {
|
|
11320
11335
|
...layers,
|
|
@@ -13003,7 +13018,7 @@ var init_tree = __esmMin((() => {
|
|
|
13003
13018
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
13004
13019
|
};
|
|
13005
13020
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
13006
|
-
})), nothingReviewed, 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, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, layerBody, layerRows, nearFirst, layerFitted, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, threadReplying, VOICES, threadQuote, pickedText, takenRows, selectedLines, shownMatches, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadHere, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
13021
|
+
})), nothingReviewed, 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, layerBody, layerRows, nearFirst, layerFitted, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, threadReplying, VOICES, threadQuote, pickedText, takenRows, selectedLines, shownMatches, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadHere, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
13007
13022
|
var init_model = __esmMin((() => {
|
|
13008
13023
|
init_dist();
|
|
13009
13024
|
init_patch();
|
|
@@ -13099,14 +13114,15 @@ var init_model = __esmMin((() => {
|
|
|
13099
13114
|
return layer.prose.filter((anchor) => anchor.path === path);
|
|
13100
13115
|
};
|
|
13101
13116
|
kept = (state, at) => !state.hideReviewed || at === state.patchIndex || !isReviewed(state, at);
|
|
13102
|
-
|
|
13117
|
+
layerHolds = (state, layerIndex) => {
|
|
13103
13118
|
const layer = state.layers[layerIndex];
|
|
13104
13119
|
if (layer === void 0) return [];
|
|
13105
13120
|
return layer.files.flatMap((path) => {
|
|
13106
13121
|
const at = state.patches.findIndex((patch) => patch.path === path);
|
|
13107
|
-
return at === -1
|
|
13122
|
+
return at === -1 ? [] : [at];
|
|
13108
13123
|
});
|
|
13109
13124
|
};
|
|
13125
|
+
layerFiles = (state, layerIndex) => layerHolds(state, layerIndex).filter((at) => kept(state, at));
|
|
13110
13126
|
layerHolding = (state, fileIndex) => {
|
|
13111
13127
|
const path = state.patches[fileIndex]?.path;
|
|
13112
13128
|
const at = state.layers.findIndex((layer) => layer.files.includes(path ?? ""));
|
|
@@ -13182,7 +13198,7 @@ var init_model = __esmMin((() => {
|
|
|
13182
13198
|
return rows;
|
|
13183
13199
|
};
|
|
13184
13200
|
layerRead = (state, layerIndex) => {
|
|
13185
|
-
const files =
|
|
13201
|
+
const files = layerHolds(state, layerIndex);
|
|
13186
13202
|
return {
|
|
13187
13203
|
done: files.filter((at) => isReviewed(state, at)).length,
|
|
13188
13204
|
all: files.length
|
|
@@ -13204,7 +13220,11 @@ var init_model = __esmMin((() => {
|
|
|
13204
13220
|
lead: false
|
|
13205
13221
|
}];
|
|
13206
13222
|
};
|
|
13207
|
-
layerBody = (state, index, room, shown) =>
|
|
13223
|
+
layerBody = (state, index, room, shown) => {
|
|
13224
|
+
if (!layerOpen(state, index) || !shown.has(index)) return countRow(state, index, room.file);
|
|
13225
|
+
const rows = fileRows(state, index, room);
|
|
13226
|
+
return rows.length > 0 ? rows : countRow(state, index, room.file);
|
|
13227
|
+
};
|
|
13208
13228
|
layerRows = (state, room, shown) => state.layers.flatMap((_, index) => [
|
|
13209
13229
|
...index > 0 ? [{
|
|
13210
13230
|
index,
|
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.128",
|
|
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": {
|