@eliya-oss/agent-diff 0.1.0-alpha.127 → 0.1.0-alpha.129
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 +16 -0
- package/dist/main.js +142 -111
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.129
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- One glyph per idea. Five marks were carrying twelve meanings: `✓` meant a reviewed file, a settled thread and a sent one — the last of which is the opposite of done; `○` meant "this line has a thread", "this thread is unread" and "this file is in the diff"; `•` drew the same idea as `○` differently; `·` was a bullet and a separator at once; and `▎` was the cursor everywhere except the file tree, which used a background tint instead.
|
|
8
|
+
|
|
9
|
+
Now `▎` is the cursor row everywhere, `▾`/`▸` are disclosure only, `○ ◐ ●` is one three-state ring for a thread — waiting on the agent, answered, waiting on you — drawn identically in the diff gutter, the review panel, the file tree badge and the layers rail, `✓` means nothing left to do, and `·` is a separator. The file tree's badge counts only threads still open, so it stops promising work that is already settled. The diff no longer marks lines for a comment you removed. The Nerd Font file and folder icons are gone, and the two columns they took go to the path.
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.128
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 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.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
3
19
|
## 0.1.0-alpha.127
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -9793,7 +9793,7 @@ var init_run = __esmMin((() => {
|
|
|
9793
9793
|
gitOrEmpty = fn("Git.runOrEmpty")(function* (cwd, args) {
|
|
9794
9794
|
return yield* git(cwd, args).pipe(catchTag("GitCommandFailed", () => succeed$1("")));
|
|
9795
9795
|
});
|
|
9796
|
-
})), 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;
|
|
9797
9797
|
var init_service = __esmMin((() => {
|
|
9798
9798
|
init_dist();
|
|
9799
9799
|
init_error$1();
|
|
@@ -9809,6 +9809,7 @@ var init_service = __esmMin((() => {
|
|
|
9809
9809
|
"master",
|
|
9810
9810
|
"main"
|
|
9811
9811
|
];
|
|
9812
|
+
PLAIN_PATHS = ["-c", "core.quotepath=false"];
|
|
9812
9813
|
STAT = /(\d+) files? changed(?:, (\d+) insertions?\(\+\))?(?:, (\d+) deletions?\(-\))?/;
|
|
9813
9814
|
Git = class extends Service()("adiff/Git") {};
|
|
9814
9815
|
parseStat = (raw) => {
|
|
@@ -9923,6 +9924,7 @@ var init_service = __esmMin((() => {
|
|
|
9923
9924
|
const target = worktree.base.length > 0 ? worktree.base : "HEAD";
|
|
9924
9925
|
const scope = only === void 0 ? [] : ["--", only];
|
|
9925
9926
|
return yield* gitOrEmpty(worktree.path, [
|
|
9927
|
+
...PLAIN_PATHS,
|
|
9926
9928
|
"diff",
|
|
9927
9929
|
`-U${context}`,
|
|
9928
9930
|
target,
|
|
@@ -10983,7 +10985,7 @@ var init_pane = __esmMin((() => {
|
|
|
10983
10985
|
init_drafts();
|
|
10984
10986
|
init_init();
|
|
10985
10987
|
init_pane();
|
|
10986
|
-
var version$1 = "0.1.0-alpha.
|
|
10988
|
+
var version$1 = "0.1.0-alpha.129";
|
|
10987
10989
|
//#endregion
|
|
10988
10990
|
//#region src/cli/upgrade.ts
|
|
10989
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;
|
|
@@ -11245,7 +11247,7 @@ var init_model$1 = __esmMin((() => {
|
|
|
11245
11247
|
}));
|
|
11246
11248
|
//#endregion
|
|
11247
11249
|
//#region src/domain/layers/coverage.ts
|
|
11248
|
-
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;
|
|
11249
11251
|
var init_coverage = __esmMin((() => {
|
|
11250
11252
|
init_dist();
|
|
11251
11253
|
init_model$1();
|
|
@@ -11301,7 +11303,13 @@ var init_coverage = __esmMin((() => {
|
|
|
11301
11303
|
missing: tallies.flatMap((tally) => tally.missing)
|
|
11302
11304
|
};
|
|
11303
11305
|
};
|
|
11304
|
-
|
|
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
|
+
};
|
|
11305
11313
|
unordered = (patches, layers, missing) => {
|
|
11306
11314
|
const named = /* @__PURE__ */ new Set([...spansOf$1(layers).map((span) => span.path), ...missing.map((span) => span.path)]);
|
|
11307
11315
|
return patches.filter((patch) => !named.has(patch.path)).map((patch) => ({
|
|
@@ -11315,12 +11323,13 @@ var init_coverage = __esmMin((() => {
|
|
|
11315
11323
|
const left = unordered(patches, layers.layers, gap.missing);
|
|
11316
11324
|
const spans = [...gap.missing, ...left];
|
|
11317
11325
|
if (spans.length === 0) return layers;
|
|
11326
|
+
const said = leftSaid(gap.missing.length, left.length);
|
|
11318
11327
|
const remainder = {
|
|
11319
11328
|
title: REMAINDER_TITLE,
|
|
11320
|
-
blocks: [{
|
|
11329
|
+
blocks: [...said.length === 0 ? [] : [{
|
|
11321
11330
|
kind: "prose",
|
|
11322
|
-
markdown:
|
|
11323
|
-
}, ...spans.map((span) => codeBlockOf$1(span))]
|
|
11331
|
+
markdown: said
|
|
11332
|
+
}], ...spans.map((span) => codeBlockOf$1(span))]
|
|
11324
11333
|
};
|
|
11325
11334
|
return {
|
|
11326
11335
|
...layers,
|
|
@@ -13009,7 +13018,7 @@ var init_tree = __esmMin((() => {
|
|
|
13009
13018
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
13010
13019
|
};
|
|
13011
13020
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
13012
|
-
})), 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,
|
|
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, 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, 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, SECTION_OF, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
13013
13022
|
var init_model = __esmMin((() => {
|
|
13014
13023
|
init_dist();
|
|
13015
13024
|
init_patch();
|
|
@@ -13105,14 +13114,15 @@ var init_model = __esmMin((() => {
|
|
|
13105
13114
|
return layer.prose.filter((anchor) => anchor.path === path);
|
|
13106
13115
|
};
|
|
13107
13116
|
kept = (state, at) => !state.hideReviewed || at === state.patchIndex || !isReviewed(state, at);
|
|
13108
|
-
|
|
13117
|
+
layerHolds = (state, layerIndex) => {
|
|
13109
13118
|
const layer = state.layers[layerIndex];
|
|
13110
13119
|
if (layer === void 0) return [];
|
|
13111
13120
|
return layer.files.flatMap((path) => {
|
|
13112
13121
|
const at = state.patches.findIndex((patch) => patch.path === path);
|
|
13113
|
-
return at === -1
|
|
13122
|
+
return at === -1 ? [] : [at];
|
|
13114
13123
|
});
|
|
13115
13124
|
};
|
|
13125
|
+
layerFiles = (state, layerIndex) => layerHolds(state, layerIndex).filter((at) => kept(state, at));
|
|
13116
13126
|
layerHolding = (state, fileIndex) => {
|
|
13117
13127
|
const path = state.patches[fileIndex]?.path;
|
|
13118
13128
|
const at = state.layers.findIndex((layer) => layer.files.includes(path ?? ""));
|
|
@@ -13188,7 +13198,7 @@ var init_model = __esmMin((() => {
|
|
|
13188
13198
|
return rows;
|
|
13189
13199
|
};
|
|
13190
13200
|
layerRead = (state, layerIndex) => {
|
|
13191
|
-
const files =
|
|
13201
|
+
const files = layerHolds(state, layerIndex);
|
|
13192
13202
|
return {
|
|
13193
13203
|
done: files.filter((at) => isReviewed(state, at)).length,
|
|
13194
13204
|
all: files.length
|
|
@@ -13210,7 +13220,11 @@ var init_model = __esmMin((() => {
|
|
|
13210
13220
|
lead: false
|
|
13211
13221
|
}];
|
|
13212
13222
|
};
|
|
13213
|
-
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
|
+
};
|
|
13214
13228
|
layerRows = (state, room, shown) => state.layers.flatMap((_, index) => [
|
|
13215
13229
|
...index > 0 ? [{
|
|
13216
13230
|
index,
|
|
@@ -13296,20 +13310,44 @@ var init_model = __esmMin((() => {
|
|
|
13296
13310
|
more: rows.length - (start + height)
|
|
13297
13311
|
};
|
|
13298
13312
|
};
|
|
13299
|
-
|
|
13313
|
+
threadStand = (thread) => {
|
|
13314
|
+
if (thread.removed === true) return "gone";
|
|
13315
|
+
if (thread.settled === true) return "settled";
|
|
13316
|
+
if (thread.asks === true) return "asked";
|
|
13317
|
+
if (spokeLast(thread) === "reviewer") return "waiting";
|
|
13318
|
+
return answersIn(thread) > 0 ? "answered" : "waiting";
|
|
13319
|
+
};
|
|
13320
|
+
STAND_WEIGHT = {
|
|
13321
|
+
gone: 0,
|
|
13322
|
+
settled: 1,
|
|
13323
|
+
waiting: 2,
|
|
13324
|
+
answered: 3,
|
|
13325
|
+
asked: 4
|
|
13326
|
+
};
|
|
13327
|
+
louder = (one, other) => STAND_WEIGHT[one] > STAND_WEIGHT[other] ? one : other;
|
|
13328
|
+
threadsOn = (state, fileIndex) => {
|
|
13300
13329
|
const patch = state.patches[fileIndex];
|
|
13301
|
-
|
|
13302
|
-
return
|
|
13330
|
+
const stands = patch === void 0 ? [] : state.sent.filter((entry) => entry.file === patch.path && entry.removed !== true && entry.settled !== true).map((entry) => threadStand(entry));
|
|
13331
|
+
return {
|
|
13332
|
+
open: stands.length,
|
|
13333
|
+
stand: stands.reduce(louder, "gone")
|
|
13334
|
+
};
|
|
13303
13335
|
};
|
|
13304
13336
|
hiddenLines = (state) => shownOf(state)?.gaps.reduce((total, gap) => total + gap.hidden, 0) ?? 0;
|
|
13305
|
-
|
|
13337
|
+
rowsUnder = (patch, entry) => patch.rows.filter((row) => match$3(row.newLine, {
|
|
13338
|
+
onNone: () => false,
|
|
13339
|
+
onSome: (line) => line >= entry.start && line <= entry.end
|
|
13340
|
+
})).map((row) => row.index);
|
|
13341
|
+
markedStands = (state) => {
|
|
13306
13342
|
const patch = selectedPatch(state);
|
|
13307
|
-
|
|
13308
|
-
|
|
13309
|
-
|
|
13310
|
-
|
|
13311
|
-
|
|
13312
|
-
|
|
13343
|
+
const found = /* @__PURE__ */ new Map();
|
|
13344
|
+
if (patch === void 0) return found;
|
|
13345
|
+
const here = state.sent.filter((entry) => entry.file === patch.path && entry.removed !== true);
|
|
13346
|
+
for (const entry of here) {
|
|
13347
|
+
const stand = threadStand(entry);
|
|
13348
|
+
for (const row of rowsUnder(patch, entry)) found.set(row, louder(stand, found.get(row) ?? "gone"));
|
|
13349
|
+
}
|
|
13350
|
+
return found;
|
|
13313
13351
|
};
|
|
13314
13352
|
carriesLine = (row) => isSome(row.newLine) || isSome(row.oldLine);
|
|
13315
13353
|
selectedRows = (state) => {
|
|
@@ -13512,13 +13550,14 @@ var init_model = __esmMin((() => {
|
|
|
13512
13550
|
return answersIn(later) > answersIn(comment) ? later : comment;
|
|
13513
13551
|
};
|
|
13514
13552
|
spokeLast = (comment) => comment.turns?.at(-1)?.voice;
|
|
13515
|
-
|
|
13516
|
-
|
|
13517
|
-
|
|
13518
|
-
|
|
13519
|
-
|
|
13520
|
-
|
|
13521
|
-
};
|
|
13553
|
+
SECTION_OF = {
|
|
13554
|
+
gone: "removed",
|
|
13555
|
+
settled: "settled",
|
|
13556
|
+
asked: "asked",
|
|
13557
|
+
answered: "answered",
|
|
13558
|
+
waiting: "with"
|
|
13559
|
+
};
|
|
13560
|
+
sectionOf = (comment) => SECTION_OF[threadStand(comment)];
|
|
13522
13561
|
sentEntry = (state, comment) => {
|
|
13523
13562
|
const newer = newerOf(state, comment);
|
|
13524
13563
|
return {
|
|
@@ -15266,80 +15305,54 @@ var init_reduce = __esmMin((() => {
|
|
|
15266
15305
|
selecting: false,
|
|
15267
15306
|
notice
|
|
15268
15307
|
});
|
|
15269
|
-
})), ring, sets, chosen, useMarks, marks;
|
|
15308
|
+
})), shared, ring, sets, chosen, useMarks, marks, STAND_KEY, standMark;
|
|
15270
15309
|
var init_marks = __esmMin((() => {
|
|
15271
|
-
|
|
15272
|
-
|
|
15273
|
-
sent: "
|
|
15274
|
-
rule: "│",
|
|
15310
|
+
shared = {
|
|
15311
|
+
done: "✓",
|
|
15312
|
+
sent: "→",
|
|
15275
15313
|
cursor: "▎",
|
|
15276
|
-
|
|
15277
|
-
|
|
15278
|
-
folder: "",
|
|
15279
|
-
folderOpen: "",
|
|
15280
|
-
file: "",
|
|
15314
|
+
shut: "▸",
|
|
15315
|
+
open: "▾",
|
|
15281
15316
|
space: "·",
|
|
15282
15317
|
tab: "→"
|
|
15283
15318
|
};
|
|
15319
|
+
ring = {
|
|
15320
|
+
...shared,
|
|
15321
|
+
waiting: "○",
|
|
15322
|
+
answered: "◐",
|
|
15323
|
+
asked: "●",
|
|
15324
|
+
rule: "│"
|
|
15325
|
+
};
|
|
15284
15326
|
sets = {
|
|
15285
15327
|
ring,
|
|
15286
15328
|
bubble: {
|
|
15287
|
-
|
|
15288
|
-
|
|
15329
|
+
...shared,
|
|
15330
|
+
waiting: "◌",
|
|
15331
|
+
answered: "◑",
|
|
15332
|
+
asked: "◗",
|
|
15289
15333
|
rule: "┃",
|
|
15290
|
-
cursor: "▌"
|
|
15291
|
-
tally: "◗",
|
|
15292
|
-
reviewed: "✓",
|
|
15293
|
-
folder: "",
|
|
15294
|
-
folderOpen: "",
|
|
15295
|
-
file: "",
|
|
15296
|
-
space: "·",
|
|
15297
|
-
tab: "→"
|
|
15334
|
+
cursor: "▌"
|
|
15298
15335
|
},
|
|
15299
15336
|
quote: {
|
|
15300
|
-
|
|
15301
|
-
|
|
15302
|
-
|
|
15303
|
-
|
|
15304
|
-
|
|
15305
|
-
reviewed: "✓",
|
|
15306
|
-
folder: "",
|
|
15307
|
-
folderOpen: "",
|
|
15308
|
-
file: "",
|
|
15309
|
-
space: "·",
|
|
15310
|
-
tab: "→"
|
|
15337
|
+
...shared,
|
|
15338
|
+
waiting: "❞",
|
|
15339
|
+
answered: "❠",
|
|
15340
|
+
asked: "❝",
|
|
15341
|
+
rule: "┊"
|
|
15311
15342
|
},
|
|
15312
15343
|
diamond: {
|
|
15313
|
-
|
|
15314
|
-
|
|
15315
|
-
|
|
15316
|
-
|
|
15317
|
-
|
|
15318
|
-
reviewed: "✓",
|
|
15319
|
-
folder: "",
|
|
15320
|
-
folderOpen: "",
|
|
15321
|
-
file: "",
|
|
15322
|
-
space: "·",
|
|
15323
|
-
tab: "→"
|
|
15344
|
+
...shared,
|
|
15345
|
+
waiting: "◇",
|
|
15346
|
+
answered: "◈",
|
|
15347
|
+
asked: "◆",
|
|
15348
|
+
rule: "╎"
|
|
15324
15349
|
},
|
|
15325
15350
|
dot: {
|
|
15326
|
-
|
|
15327
|
-
|
|
15328
|
-
|
|
15329
|
-
|
|
15330
|
-
|
|
15331
|
-
reviewed: "✓",
|
|
15332
|
-
folder: "",
|
|
15333
|
-
folderOpen: "",
|
|
15334
|
-
file: "",
|
|
15335
|
-
space: "·",
|
|
15336
|
-
tab: "→"
|
|
15337
|
-
},
|
|
15338
|
-
plain: {
|
|
15339
|
-
...ring,
|
|
15340
|
-
folder: "▸",
|
|
15341
|
-
folderOpen: "▾",
|
|
15342
|
-
file: "·"
|
|
15351
|
+
...shared,
|
|
15352
|
+
waiting: "○",
|
|
15353
|
+
answered: "◉",
|
|
15354
|
+
asked: "●",
|
|
15355
|
+
rule: "▏"
|
|
15343
15356
|
}
|
|
15344
15357
|
};
|
|
15345
15358
|
Object.keys(sets);
|
|
@@ -15348,6 +15361,17 @@ var init_marks = __esmMin((() => {
|
|
|
15348
15361
|
chosen = sets[name] ?? ring;
|
|
15349
15362
|
};
|
|
15350
15363
|
marks = () => chosen;
|
|
15364
|
+
STAND_KEY = {
|
|
15365
|
+
waiting: "waiting",
|
|
15366
|
+
answered: "answered",
|
|
15367
|
+
asked: "asked",
|
|
15368
|
+
settled: "done",
|
|
15369
|
+
gone: void 0
|
|
15370
|
+
};
|
|
15371
|
+
standMark = (stand) => {
|
|
15372
|
+
const key = STAND_KEY[stand];
|
|
15373
|
+
return key === void 0 ? " " : chosen[key];
|
|
15374
|
+
};
|
|
15351
15375
|
useMarks(process.env["ADIFF_MARKS"] ?? "ring");
|
|
15352
15376
|
}));
|
|
15353
15377
|
//#endregion
|
|
@@ -15991,10 +16015,10 @@ var init_diffview = __esmMin((() => {
|
|
|
15991
16015
|
};
|
|
15992
16016
|
headOf = (note) => {
|
|
15993
16017
|
const moved = note.stale ? ", the branch moved on" : "";
|
|
15994
|
-
if (note.settled) return `${marks().
|
|
15995
|
-
if (note.asks) return `${marks().
|
|
15996
|
-
if (note.turns.at(-1)?.voice === "reviewer") return `${marks().
|
|
15997
|
-
if (note.answers.length > 0) return `${marks().
|
|
16018
|
+
if (note.settled) return `${marks().done} settled${moved}`;
|
|
16019
|
+
if (note.asks) return `${marks().asked} asked back${moved}`;
|
|
16020
|
+
if (note.turns.at(-1)?.voice === "reviewer") return `${marks().waiting} replied${moved}`;
|
|
16021
|
+
if (note.answers.length > 0) return `${marks().answered} answered${moved}`;
|
|
15998
16022
|
return `${marks().sent} sent${moved}`;
|
|
15999
16023
|
};
|
|
16000
16024
|
spokenLines = (body, room, mark) => {
|
|
@@ -16111,7 +16135,7 @@ var init_diffview = __esmMin((() => {
|
|
|
16111
16135
|
}));
|
|
16112
16136
|
//#endregion
|
|
16113
16137
|
//#region src/tui/render.ts
|
|
16114
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, 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, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, 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_LONG, STALE_SHORT, staleBanner, layerRoom, litRow, leftOver, titlePaint, titleMark, titleLook, fileLook, layerLook, layerGutter, layerText, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, foundTitle, fileRow, blockOf, aroundRow, windowedBlocks, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
16138
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, 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, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, 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_LONG, STALE_SHORT, staleBanner, layerRoom, litRow, leftOver, titlePaint, titleMark, titleLook, fileMark, fileLook, layerLook, layerGutter, layerText, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, foundTitle, CHANGED_MARK, fileRow, blockOf, aroundRow, windowedBlocks, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
16115
16139
|
var init_render = __esmMin((() => {
|
|
16116
16140
|
init_dist();
|
|
16117
16141
|
init_command();
|
|
@@ -16406,7 +16430,7 @@ var init_render = __esmMin((() => {
|
|
|
16406
16430
|
const shown = windowed(rows, at, Math.max(1, height));
|
|
16407
16431
|
const drawn = shown.rows.map((row, index) => {
|
|
16408
16432
|
const here = shown.from + index === at;
|
|
16409
|
-
const text = `${here ?
|
|
16433
|
+
const text = `${here ? marks().cursor : " "} ${row}`.padEnd(LIST_LEAD);
|
|
16410
16434
|
return here ? bg(palette.selection)(fg(palette.ink)(`${text}\n`)) : fg(palette.ink)(`${text}\n`);
|
|
16411
16435
|
});
|
|
16412
16436
|
return new StyledText(drawn);
|
|
@@ -16619,11 +16643,10 @@ var init_render = __esmMin((() => {
|
|
|
16619
16643
|
treeLabel = (state, row, room) => {
|
|
16620
16644
|
const indent = " ".repeat(Math.min(row.depth, INDENT_MAX));
|
|
16621
16645
|
if (row.kind === "file") {
|
|
16622
|
-
const lead = `${indent}
|
|
16646
|
+
const lead = `${indent} `;
|
|
16623
16647
|
return `${lead}${clipMiddle(row.name, Math.max(4, room - lead.length))}`;
|
|
16624
16648
|
}
|
|
16625
|
-
const
|
|
16626
|
-
const lead = `${indent}${shut ? "▸" : "▾"} ${shut ? marks().folder : marks().folderOpen} `;
|
|
16649
|
+
const lead = `${indent}${state.closed.includes(row.path) ? marks().shut : marks().open} `;
|
|
16627
16650
|
return `${lead}${clipPath(row.name, Math.max(4, room - lead.length))}`;
|
|
16628
16651
|
};
|
|
16629
16652
|
waitingLabel = (branch) => branch.unanswered > 0 ? `${branch.unanswered} unanswered` : "";
|
|
@@ -16765,12 +16788,13 @@ var init_render = __esmMin((() => {
|
|
|
16765
16788
|
return scope.length === 0 ? [] : [scope];
|
|
16766
16789
|
};
|
|
16767
16790
|
treeMarks = (state, row) => {
|
|
16768
|
-
|
|
16791
|
+
const seen = row.fileIndex !== void 0 && isReviewed(state, row.fileIndex) ? marks().done : " ";
|
|
16792
|
+
return `${row.fileIndex !== void 0 && row.fileIndex === state.patchIndex ? marks().cursor : " "}${seen}`;
|
|
16769
16793
|
};
|
|
16770
16794
|
treeTail = (state, row) => {
|
|
16771
16795
|
if (row.fileIndex === void 0) return " ";
|
|
16772
|
-
const
|
|
16773
|
-
return
|
|
16796
|
+
const threads = threadsOn(state, row.fileIndex);
|
|
16797
|
+
return threads.open > 0 ? `${threads.open}${standMark(threads.stand)}`.padStart(3) : " ";
|
|
16774
16798
|
};
|
|
16775
16799
|
treeLine = (state, row, pane) => {
|
|
16776
16800
|
const tail = treeTail(state, row);
|
|
@@ -16803,8 +16827,8 @@ var init_render = __esmMin((() => {
|
|
|
16803
16827
|
};
|
|
16804
16828
|
titleMark = (state, row) => {
|
|
16805
16829
|
if (!row.lead) return " ";
|
|
16806
|
-
if (layerDone(state, row.index)) return marks().
|
|
16807
|
-
if (leftOver(state, row.index)) return "
|
|
16830
|
+
if (layerDone(state, row.index)) return marks().done;
|
|
16831
|
+
if (leftOver(state, row.index)) return "0";
|
|
16808
16832
|
return `${row.index + 1}`;
|
|
16809
16833
|
};
|
|
16810
16834
|
titleLook = (state, row) => ({
|
|
@@ -16812,14 +16836,19 @@ var init_render = __esmMin((() => {
|
|
|
16812
16836
|
mark: titleMark(state, row),
|
|
16813
16837
|
paint: titlePaint(state, row.index)
|
|
16814
16838
|
});
|
|
16815
|
-
|
|
16839
|
+
fileMark = (state, row) => {
|
|
16840
|
+
const threads = row.fileIndex === void 0 ? void 0 : threadsOn(state, row.fileIndex);
|
|
16841
|
+
if (threads !== void 0 && threads.open > 0) return standMark(threads.stand);
|
|
16842
|
+
return row.reviewed === true ? marks().done : " ";
|
|
16843
|
+
};
|
|
16844
|
+
fileLook = (state, row) => ({
|
|
16816
16845
|
lead: FILE_LEAD,
|
|
16817
|
-
mark: row
|
|
16846
|
+
mark: fileMark(state, row),
|
|
16818
16847
|
paint: row.reviewed === true ? palette.added : palette.ink
|
|
16819
16848
|
});
|
|
16820
16849
|
layerLook = (state, row) => {
|
|
16821
16850
|
switch (row.kind) {
|
|
16822
|
-
case "file": return fileLook(row);
|
|
16851
|
+
case "file": return fileLook(state, row);
|
|
16823
16852
|
case "dir": return {
|
|
16824
16853
|
lead: DIR_LEAD,
|
|
16825
16854
|
mark: " ",
|
|
@@ -16836,7 +16865,7 @@ var init_render = __esmMin((() => {
|
|
|
16836
16865
|
}
|
|
16837
16866
|
};
|
|
16838
16867
|
layerGutter = (row, look) => {
|
|
16839
|
-
return `${row.here === true ?
|
|
16868
|
+
return `${row.here === true ? marks().cursor : " "}${look.mark.padStart(2)}`;
|
|
16840
16869
|
};
|
|
16841
16870
|
layerText = (row, look, room) => row.kind === "gap" ? "" : `${layerGutter(row, look)}${" ".repeat(look.lead - GUTTER)}${row.text}`.padEnd(room.title + TITLE_LEAD);
|
|
16842
16871
|
PANEL_TITLES = {
|
|
@@ -16861,8 +16890,9 @@ var init_render = __esmMin((() => {
|
|
|
16861
16890
|
if (state.term.length === 0) return "Look for something";
|
|
16862
16891
|
return `${state.term} · ${all === 1 ? "1 place" : `${all} places`}`;
|
|
16863
16892
|
};
|
|
16893
|
+
CHANGED_MARK = "*";
|
|
16864
16894
|
fileRow = (match, room) => {
|
|
16865
|
-
const said = ` ${match.changed ?
|
|
16895
|
+
const said = ` ${match.changed ? CHANGED_MARK : " "} ${clipHead(match.path, Math.max(8, room - 3))}`;
|
|
16866
16896
|
return {
|
|
16867
16897
|
rows: 1,
|
|
16868
16898
|
chunks: [fg(palette.accent)(said.padEnd(room)), fg(palette.faint)("\n")]
|
|
@@ -16879,7 +16909,7 @@ var init_render = __esmMin((() => {
|
|
|
16879
16909
|
const numbered = /^\s*(\d+) ?(.*)$/.exec(line);
|
|
16880
16910
|
const number = Number(numbered?.[1] ?? 0);
|
|
16881
16911
|
const text = numbered?.[2] ?? line;
|
|
16882
|
-
const said = ` ${number === at ?
|
|
16912
|
+
const said = ` ${number === at ? marks().cursor : " "} ${String(number).padStart(5)} ${text}`;
|
|
16883
16913
|
return fg(number === at ? palette.ink : palette.faint)(clip(said, room).padEnd(room));
|
|
16884
16914
|
};
|
|
16885
16915
|
windowedBlocks = (blocks, at, room) => {
|
|
@@ -16903,7 +16933,7 @@ var init_render = __esmMin((() => {
|
|
|
16903
16933
|
panelBody = (entry) => entry.comment.body.split("\n").find((line) => line.trim().length > 0) ?? "";
|
|
16904
16934
|
panelPair = (state, placed, room) => {
|
|
16905
16935
|
const { entry } = placed;
|
|
16906
|
-
const lead = ` ${entry.
|
|
16936
|
+
const lead = ` ${standMark(threadStand(entry.comment))} `;
|
|
16907
16937
|
const here = placed.at === state.panelIndex;
|
|
16908
16938
|
return [{
|
|
16909
16939
|
text: `${lead}${panelWhere(entry, room - PANEL_LEAD)}`,
|
|
@@ -17554,7 +17584,7 @@ var init_render = __esmMin((() => {
|
|
|
17554
17584
|
}
|
|
17555
17585
|
paintGutter(state, top, height) {
|
|
17556
17586
|
const [from, to] = selectionRange(state);
|
|
17557
|
-
const marked =
|
|
17587
|
+
const marked = markedStands(state);
|
|
17558
17588
|
const drawn = this.view.drawn();
|
|
17559
17589
|
const bare = (visual) => visual >= drawn || !this.view.carries(visual) || this.view.isRunOn(visual);
|
|
17560
17590
|
const held = (visual) => {
|
|
@@ -17562,7 +17592,8 @@ var init_render = __esmMin((() => {
|
|
|
17562
17592
|
const onCode = this.view.stopAt(visual) === 0;
|
|
17563
17593
|
const standing = row === state.cursor && this.view.stopAt(visual) === state.stop;
|
|
17564
17594
|
const within = onCode && inRange(state, row, from, to);
|
|
17565
|
-
|
|
17595
|
+
const stand = onCode ? marked.get(row) : void 0;
|
|
17596
|
+
return `${standing || within ? marks().cursor : " "}${stand === void 0 ? " " : standMark(stand)}`;
|
|
17566
17597
|
};
|
|
17567
17598
|
const rows = Array.from({ length: height }, (_, index) => bare(top + index) ? " " : held(top + index));
|
|
17568
17599
|
this.gutter.content = rows.join("\n");
|
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.129",
|
|
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": {
|