@eliya-oss/agent-diff 0.1.0-alpha.82 → 0.1.0-alpha.84
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 +12 -0
- package/dist/main.js +52 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.84
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The count in the header follows the order `[` and `]` move in, so it steps by one instead of jumping about, and a branch named on the command line opens at the top of its tree rather than partway down it.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.83
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- A thread is redrawn when an answer or a reply lands in it, rather than staying as it was until the branch is read again. A thread the reviewer wrote back to now says it is with the agent instead of claiming it was answered.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.82
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/main.js
CHANGED
|
@@ -9804,7 +9804,7 @@ var init_pane = __esmMin((() => {
|
|
|
9804
9804
|
init_commands();
|
|
9805
9805
|
init_init();
|
|
9806
9806
|
init_pane();
|
|
9807
|
-
var version$1 = "0.1.0-alpha.
|
|
9807
|
+
var version$1 = "0.1.0-alpha.84";
|
|
9808
9808
|
//#endregion
|
|
9809
9809
|
//#region src/cli/upgrade.ts
|
|
9810
9810
|
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, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
|
|
@@ -11584,7 +11584,7 @@ var init_tree = __esmMin((() => {
|
|
|
11584
11584
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
11585
11585
|
};
|
|
11586
11586
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
11587
|
-
})), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
|
|
11587
|
+
})), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, layerFile, selectionRange;
|
|
11588
11588
|
var init_model = __esmMin((() => {
|
|
11589
11589
|
init_dist();
|
|
11590
11590
|
init_patch();
|
|
@@ -12058,7 +12058,11 @@ var init_model = __esmMin((() => {
|
|
|
12058
12058
|
if (later === void 0) return comment;
|
|
12059
12059
|
return answersIn(later) > answersIn(comment) ? later : comment;
|
|
12060
12060
|
};
|
|
12061
|
-
|
|
12061
|
+
spokeLast = (comment) => comment.turns?.at(-1)?.voice;
|
|
12062
|
+
sectionOf = (comment) => {
|
|
12063
|
+
if (spokeLast(comment) === "reviewer" && comment.settled !== true) return "with";
|
|
12064
|
+
return answersIn(comment) > 0 || comment.settled === true ? "answered" : "with";
|
|
12065
|
+
};
|
|
12062
12066
|
sentEntry = (state, comment) => {
|
|
12063
12067
|
const newer = newerOf(state, comment);
|
|
12064
12068
|
return {
|
|
@@ -12122,6 +12126,18 @@ var init_model = __esmMin((() => {
|
|
|
12122
12126
|
};
|
|
12123
12127
|
reviewedCount = (state) => `${state.vouched.length}/${state.patches.length} reviewed`;
|
|
12124
12128
|
fileOrder = (state) => onLayers(state) ? layerFiles(state, state.layerIndex) : flattenTree(treeOf(state), []).flatMap((row) => row.fileIndex === void 0 ? [] : [row.fileIndex]);
|
|
12129
|
+
filePlace = (state) => {
|
|
12130
|
+
const order = fileOrder(state);
|
|
12131
|
+
const at = order.indexOf(state.patchIndex);
|
|
12132
|
+
if (at === -1) return {
|
|
12133
|
+
at: state.patchIndex + 1,
|
|
12134
|
+
of: state.patches.length
|
|
12135
|
+
};
|
|
12136
|
+
return {
|
|
12137
|
+
at: at + 1,
|
|
12138
|
+
of: order.length
|
|
12139
|
+
};
|
|
12140
|
+
};
|
|
12125
12141
|
layerFile = (state, delta) => {
|
|
12126
12142
|
const order = fileOrder(state);
|
|
12127
12143
|
const position = order.indexOf(state.patchIndex);
|
|
@@ -13734,7 +13750,7 @@ var init_theme = __esmMin((() => {
|
|
|
13734
13750
|
}));
|
|
13735
13751
|
//#endregion
|
|
13736
13752
|
//#region src/tui/diffview.ts
|
|
13737
|
-
var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, proseAt, notesAt, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
13753
|
+
var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, proseAt, notesAt, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
13738
13754
|
var init_diffview = __esmMin((() => {
|
|
13739
13755
|
init_dist();
|
|
13740
13756
|
init_patch();
|
|
@@ -14175,9 +14191,14 @@ var init_diffview = __esmMin((() => {
|
|
|
14175
14191
|
return starts;
|
|
14176
14192
|
};
|
|
14177
14193
|
bareOf = (display) => new Set(display.flatMap((entry, index) => entry.comment || entry.gap || entry.prose ? [index] : []));
|
|
14194
|
+
noteKey = (note) => [
|
|
14195
|
+
`${note.side}${note.line}:${note.folded ? "-" : "+"}${note.body}`,
|
|
14196
|
+
note.settled ? "settled" : note.asks ? "asked" : "open",
|
|
14197
|
+
...note.turns.length > 0 ? note.turns.map((turn) => `${turn.voice[0] ?? ""}:${turn.body}`) : note.answers.map((body) => `a:${body}`)
|
|
14198
|
+
].join("");
|
|
14178
14199
|
keyOf = (room, notes, prose) => [
|
|
14179
14200
|
room,
|
|
14180
|
-
...notes.map(
|
|
14201
|
+
...notes.map(noteKey),
|
|
14181
14202
|
...prose.map((entry) => `p${entry.line}${entry.after ? ">" : "<"}:${entry.markdown}`)
|
|
14182
14203
|
].join("\0");
|
|
14183
14204
|
groupOf = (entry) => {
|
|
@@ -14284,6 +14305,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14284
14305
|
const moved = note.stale ? ", the branch moved on" : "";
|
|
14285
14306
|
if (note.settled) return `${marks().sent} settled${moved}`;
|
|
14286
14307
|
if (note.asks) return `${marks().comment} asked back${moved}`;
|
|
14308
|
+
if (note.turns.at(-1)?.voice === "reviewer") return `${marks().comment} replied${moved}`;
|
|
14287
14309
|
if (note.answers.length > 0) return `${marks().sent} answered${moved}`;
|
|
14288
14310
|
return `${marks().sent} sent${moved}`;
|
|
14289
14311
|
};
|
|
@@ -14370,7 +14392,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14370
14392
|
}));
|
|
14371
14393
|
//#endregion
|
|
14372
14394
|
//#region src/tui/render.ts
|
|
14373
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, 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, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14395
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, 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, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14374
14396
|
var init_render = __esmMin((() => {
|
|
14375
14397
|
init_command();
|
|
14376
14398
|
init_patch();
|
|
@@ -14916,10 +14938,14 @@ var init_render = __esmMin((() => {
|
|
|
14916
14938
|
layers: layersCell(branch),
|
|
14917
14939
|
state: ""
|
|
14918
14940
|
});
|
|
14941
|
+
placeLabel = (state) => {
|
|
14942
|
+
const place = filePlace(state);
|
|
14943
|
+
return `${place.at}/${place.of}`;
|
|
14944
|
+
};
|
|
14919
14945
|
headerParts = (state, branch, path, pan) => [
|
|
14920
14946
|
branch,
|
|
14921
14947
|
path,
|
|
14922
|
-
state.patches.length === 0 ? "nothing to read" :
|
|
14948
|
+
state.patches.length === 0 ? "nothing to read" : placeLabel(state),
|
|
14923
14949
|
pullHere(state).length === 0 ? "" : `${pullHere(state)} pull request`,
|
|
14924
14950
|
state.vouched.length === 0 ? "" : reviewedCount(state),
|
|
14925
14951
|
contextLabel(state.context),
|
|
@@ -15932,8 +15958,10 @@ var init_app = __esmMin((() => {
|
|
|
15932
15958
|
renderer.on("frame", () => this.syncGeometry());
|
|
15933
15959
|
renderer.setFrameCallback(() => runPromise(this.applying()));
|
|
15934
15960
|
const resume = options.resume;
|
|
15961
|
+
const opensOn = options.opensOn;
|
|
15935
15962
|
this.dispatchTask(this.loadPulls());
|
|
15936
|
-
if (
|
|
15963
|
+
if (opensOn !== void 0) this.dispatchTask(this.openedOn(opensOn));
|
|
15964
|
+
else if (resume !== void 0) this.dispatchTask(this.resume(resume));
|
|
15937
15965
|
if (options.partial === true) this.dispatchTask(this.fillBranches());
|
|
15938
15966
|
}
|
|
15939
15967
|
listen(fiber) {
|
|
@@ -15979,6 +16007,17 @@ var init_app = __esmMin((() => {
|
|
|
15979
16007
|
Ping: ({ done }) => asVoid(succeed$3(done, void 0))
|
|
15980
16008
|
});
|
|
15981
16009
|
}
|
|
16010
|
+
openedOn(branchIndex) {
|
|
16011
|
+
return gen({ self: this }, function* () {
|
|
16012
|
+
if (branchIndex >= this.state.branches.length) return;
|
|
16013
|
+
this.write({
|
|
16014
|
+
...this.state,
|
|
16015
|
+
branchIndex
|
|
16016
|
+
});
|
|
16017
|
+
yield* this.openBranch();
|
|
16018
|
+
yield* this.loadSource();
|
|
16019
|
+
});
|
|
16020
|
+
}
|
|
15982
16021
|
resume(session) {
|
|
15983
16022
|
return gen({ self: this }, function* () {
|
|
15984
16023
|
const branches = this.state.branches;
|
|
@@ -16830,12 +16869,7 @@ var init_app = __esmMin((() => {
|
|
|
16830
16869
|
openingOn = (branches, branch) => {
|
|
16831
16870
|
if (branch === void 0) return none();
|
|
16832
16871
|
const at = branches.findIndex((candidate) => candidate.branch === branch);
|
|
16833
|
-
return at === -1 ? none() : some(
|
|
16834
|
-
branchIndex: at,
|
|
16835
|
-
patchIndex: 0,
|
|
16836
|
-
cursor: 0,
|
|
16837
|
-
top: 0
|
|
16838
|
-
});
|
|
16872
|
+
return at === -1 ? none() : some(at);
|
|
16839
16873
|
};
|
|
16840
16874
|
launch = fn("Tui.launch")(function* (asked, renderer, options = {}) {
|
|
16841
16875
|
const { noticeMs, sessionPath } = options;
|
|
@@ -16843,7 +16877,7 @@ var init_app = __esmMin((() => {
|
|
|
16843
16877
|
const branches = yield* firstBranches(repo, options.branch);
|
|
16844
16878
|
const asOpened = openingOn(branches, options.branch);
|
|
16845
16879
|
const missed = missing(options.branch, asOpened);
|
|
16846
|
-
const resume = isSome(asOpened) ?
|
|
16880
|
+
const resume = isSome(asOpened) ? none() : sessionPath === void 0 ? none() : yield* readSession(sessionPath);
|
|
16847
16881
|
const store = yield* Store;
|
|
16848
16882
|
const kept = yield* settingsHeld;
|
|
16849
16883
|
const display = yield* Display.pipe(provide(displayOn(renderer, repo)));
|
|
@@ -16866,6 +16900,7 @@ var init_app = __esmMin((() => {
|
|
|
16866
16900
|
noticeMs,
|
|
16867
16901
|
sessionPath,
|
|
16868
16902
|
resume: getOrUndefined$1(resume),
|
|
16903
|
+
opensOn: getOrUndefined$1(asOpened),
|
|
16869
16904
|
wrap: kept.wrap,
|
|
16870
16905
|
sticky: kept.sticky,
|
|
16871
16906
|
partial,
|
|
@@ -16914,6 +16949,7 @@ var tui_exports = /* @__PURE__ */ __exportAll({
|
|
|
16914
16949
|
laidDraft: () => laidDraft,
|
|
16915
16950
|
launch: () => launch,
|
|
16916
16951
|
listableFor: () => listableFor,
|
|
16952
|
+
noteKey: () => noteKey,
|
|
16917
16953
|
palette: () => palette,
|
|
16918
16954
|
runOn: () => runOn,
|
|
16919
16955
|
runTui: () => runTui,
|
|
@@ -16925,6 +16961,7 @@ var init_tui = __esmMin((() => {
|
|
|
16925
16961
|
init_command();
|
|
16926
16962
|
init_match();
|
|
16927
16963
|
init_model();
|
|
16964
|
+
init_diffview();
|
|
16928
16965
|
init_render();
|
|
16929
16966
|
init_theme();
|
|
16930
16967
|
}));
|
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.84",
|
|
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": {
|