@eliya-oss/agent-diff 0.1.0-alpha.98 → 0.1.0-alpha.99
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 +6 -0
- package/dist/main.js +52 -13
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.99
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- What a search found can be narrowed by typing, and each match shows the end of its path and the line it matched rather than a long path cut at the edge.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.98
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -9913,7 +9913,7 @@ var init_pane = __esmMin((() => {
|
|
|
9913
9913
|
init_commands();
|
|
9914
9914
|
init_init();
|
|
9915
9915
|
init_pane();
|
|
9916
|
-
var version$1 = "0.1.0-alpha.
|
|
9916
|
+
var version$1 = "0.1.0-alpha.99";
|
|
9917
9917
|
//#endregion
|
|
9918
9918
|
//#region src/cli/upgrade.ts
|
|
9919
9919
|
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;
|
|
@@ -11749,7 +11749,7 @@ var init_tree = __esmMin((() => {
|
|
|
11749
11749
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
11750
11750
|
};
|
|
11751
11751
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
11752
|
-
})), 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, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, layerFile, selectionRange;
|
|
11752
|
+
})), 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, shownMatches, 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, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, layerFile, selectionRange;
|
|
11753
11753
|
var init_model = __esmMin((() => {
|
|
11754
11754
|
init_dist();
|
|
11755
11755
|
init_patch();
|
|
@@ -12147,7 +12147,12 @@ var init_model = __esmMin((() => {
|
|
|
12147
12147
|
if (line === void 0) return "";
|
|
12148
12148
|
return longestName$1(line) ?? line;
|
|
12149
12149
|
};
|
|
12150
|
-
|
|
12150
|
+
shownMatches = (state) => {
|
|
12151
|
+
const wanted = state.query.trim().toLowerCase();
|
|
12152
|
+
if (wanted.length === 0) return state.matches;
|
|
12153
|
+
return state.matches.filter((match) => `${match.path}:${match.line} ${match.text}`.toLowerCase().includes(wanted));
|
|
12154
|
+
};
|
|
12155
|
+
matchHere = (state) => shownMatches(state)[state.matchIndex];
|
|
12151
12156
|
selectionReadout = (state) => {
|
|
12152
12157
|
const patch = selectedPatch(state);
|
|
12153
12158
|
if (patch === void 0 || !state.selecting) return "";
|
|
@@ -12982,7 +12987,8 @@ var init_command = __esmMin((() => {
|
|
|
12982
12987
|
"compose",
|
|
12983
12988
|
"keys",
|
|
12984
12989
|
"palette",
|
|
12985
|
-
"report"
|
|
12990
|
+
"report",
|
|
12991
|
+
"search"
|
|
12986
12992
|
]);
|
|
12987
12993
|
PRINTABLE_KEY = /^[\S ]$/;
|
|
12988
12994
|
takesText = (screen) => TEXT_SCREENS.has(screen);
|
|
@@ -13383,7 +13389,8 @@ var init_reduce = __esmMin((() => {
|
|
|
13383
13389
|
...state,
|
|
13384
13390
|
screen: "review",
|
|
13385
13391
|
matches: [],
|
|
13386
|
-
term: ""
|
|
13392
|
+
term: "",
|
|
13393
|
+
query: ""
|
|
13387
13394
|
};
|
|
13388
13395
|
if (state.screen === "report") return {
|
|
13389
13396
|
...state,
|
|
@@ -13419,7 +13426,7 @@ var init_reduce = __esmMin((() => {
|
|
|
13419
13426
|
};
|
|
13420
13427
|
walkMatches = (state, delta) => ({
|
|
13421
13428
|
...state,
|
|
13422
|
-
matchIndex: clamp(state.matchIndex + delta, 0, Math.max(0, state.
|
|
13429
|
+
matchIndex: clamp(state.matchIndex + delta, 0, Math.max(0, shownMatches(state).length - 1))
|
|
13423
13430
|
});
|
|
13424
13431
|
openPalette = (state) => ({
|
|
13425
13432
|
...state,
|
|
@@ -13757,6 +13764,7 @@ var init_reduce = __esmMin((() => {
|
|
|
13757
13764
|
matches,
|
|
13758
13765
|
matchIndex: 0,
|
|
13759
13766
|
term,
|
|
13767
|
+
query: "",
|
|
13760
13768
|
selecting: false
|
|
13761
13769
|
});
|
|
13762
13770
|
withNoticeHere = (state, notice) => ({
|
|
@@ -14578,7 +14586,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14578
14586
|
}));
|
|
14579
14587
|
//#endregion
|
|
14580
14588
|
//#region src/tui/render.ts
|
|
14581
|
-
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_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, 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, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, 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, restingOrHere, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14589
|
+
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_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, 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, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, 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, restingOrHere, foundTitle, MATCH_SHARE, matchRow, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14582
14590
|
var init_render = __esmMin((() => {
|
|
14583
14591
|
init_command();
|
|
14584
14592
|
init_patch();
|
|
@@ -14863,15 +14871,18 @@ var init_render = __esmMin((() => {
|
|
|
14863
14871
|
makeFoundParts = (renderer) => {
|
|
14864
14872
|
const box = makePalette(renderer);
|
|
14865
14873
|
const title = bar(renderer, "found-title", palette.faint);
|
|
14874
|
+
const query = asking(renderer, "found-query");
|
|
14866
14875
|
const peek = bar(renderer, "found-peek", palette.muted);
|
|
14867
14876
|
const choices = makeChoices(renderer);
|
|
14868
14877
|
box.id = "found";
|
|
14869
14878
|
box.add(title);
|
|
14879
|
+
box.add(query);
|
|
14870
14880
|
box.add(choices);
|
|
14871
14881
|
box.add(peek);
|
|
14872
14882
|
return {
|
|
14873
14883
|
box,
|
|
14874
14884
|
title,
|
|
14885
|
+
query,
|
|
14875
14886
|
peek,
|
|
14876
14887
|
choices
|
|
14877
14888
|
};
|
|
@@ -15220,6 +15231,21 @@ var init_render = __esmMin((() => {
|
|
|
15220
15231
|
PANEL_LEAD = 3;
|
|
15221
15232
|
PANEL_EMPTY = "No comment on this branch yet.";
|
|
15222
15233
|
restingOrHere = (focused) => focused ? palette.selection : palette.resting;
|
|
15234
|
+
foundTitle = (state) => {
|
|
15235
|
+
const shown = shownMatches(state).length;
|
|
15236
|
+
const all = state.matches.length;
|
|
15237
|
+
const said = shown === all ? `${all} elsewhere` : `${shown} of ${all} elsewhere`;
|
|
15238
|
+
return `${state.term} · ${said}`;
|
|
15239
|
+
};
|
|
15240
|
+
MATCH_SHARE = .45;
|
|
15241
|
+
matchRow = (match, room) => {
|
|
15242
|
+
const lead = match.changed ? marks().comment : " ";
|
|
15243
|
+
const where = `:${match.line}`;
|
|
15244
|
+
const said = match.text.trim();
|
|
15245
|
+
const forPath = Math.max(8, Math.floor(room * MATCH_SHARE) - where.length);
|
|
15246
|
+
const left = `${lead} ${clipHead(match.path, forPath)}${where}`;
|
|
15247
|
+
return `${left} ${clip(said, Math.max(1, room - left.length - 2))}`;
|
|
15248
|
+
};
|
|
15223
15249
|
panelWhere = (entry, room) => {
|
|
15224
15250
|
const where = `:${entry.comment.end}`;
|
|
15225
15251
|
return `${clipPath(entry.comment.file, Math.max(4, room - where.length))}${where}`;
|
|
@@ -15311,6 +15337,7 @@ var init_render = __esmMin((() => {
|
|
|
15311
15337
|
keys;
|
|
15312
15338
|
keysTitle;
|
|
15313
15339
|
keysQuery;
|
|
15340
|
+
foundQuery;
|
|
15314
15341
|
keysChoices;
|
|
15315
15342
|
found;
|
|
15316
15343
|
foundTitle;
|
|
@@ -15360,6 +15387,7 @@ var init_render = __esmMin((() => {
|
|
|
15360
15387
|
this.keys = modals.keys.box;
|
|
15361
15388
|
this.keysTitle = modals.keys.title;
|
|
15362
15389
|
this.keysQuery = modals.keys.query;
|
|
15390
|
+
this.foundQuery = modals.found.query;
|
|
15363
15391
|
this.keysChoices = modals.keys.choices;
|
|
15364
15392
|
this.found = modals.found.box;
|
|
15365
15393
|
this.foundTitle = modals.found.title;
|
|
@@ -15436,6 +15464,7 @@ var init_render = __esmMin((() => {
|
|
|
15436
15464
|
}
|
|
15437
15465
|
asking(screen) {
|
|
15438
15466
|
if (screen === "palette") return this.paletteQuery;
|
|
15467
|
+
if (screen === "search") return this.foundQuery;
|
|
15439
15468
|
return screen === "keys" ? this.keysQuery : void 0;
|
|
15440
15469
|
}
|
|
15441
15470
|
railRows() {
|
|
@@ -15772,14 +15801,16 @@ var init_render = __esmMin((() => {
|
|
|
15772
15801
|
}
|
|
15773
15802
|
const room = panelWidth(this.renderer.width);
|
|
15774
15803
|
const here = matchHere(state);
|
|
15775
|
-
this.foundTitle.content =
|
|
15804
|
+
this.foundTitle.content = foundTitle(state);
|
|
15776
15805
|
const peekHigh = here?.around.length ?? 0;
|
|
15777
|
-
const foundRoom = Math.min(panelRows(this.renderer.height, PANEL_FIFTH), state.
|
|
15778
|
-
|
|
15806
|
+
const foundRoom = Math.min(panelRows(this.renderer.height, PANEL_FIFTH), shownMatches(state).length + peekHigh + PALETTE_CHROME);
|
|
15807
|
+
const wide = Math.max(1, room - MODAL_ROOM);
|
|
15808
|
+
const shown = shownMatches(state);
|
|
15809
|
+
this.foundChoices.content = listText(shown.map((match) => matchRow(match, wide)), state.matchIndex, Math.max(1, foundRoom - peekHigh - PALETTE_CHROME));
|
|
15779
15810
|
this.foundPeek.content = (here?.around ?? []).map((line) => clip(line, Math.max(1, room - MODAL_ROOM))).join("\n");
|
|
15780
15811
|
const peekRows = here?.around.length ?? 0;
|
|
15781
15812
|
this.foundPeek.height = peekRows;
|
|
15782
|
-
this.found.height = Math.min(panelRows(this.renderer.height, PANEL_FIFTH), state.
|
|
15813
|
+
this.found.height = Math.min(panelRows(this.renderer.height, PANEL_FIFTH), shownMatches(state).length + peekRows + PALETTE_CHROME);
|
|
15783
15814
|
this.found.width = room;
|
|
15784
15815
|
this.found.left = Math.max(FRAME_PAD, Math.floor((this.renderer.width - room) / 2));
|
|
15785
15816
|
this.found.top = panelTop(this.renderer.height, PANEL_FIFTH);
|
|
@@ -15869,7 +15900,11 @@ var ASKING, Display, paintWith, listenWith, lightWith, shapeOf, displayOn;
|
|
|
15869
15900
|
var init_display = __esmMin((() => {
|
|
15870
15901
|
init_dist();
|
|
15871
15902
|
init_render();
|
|
15872
|
-
ASKING = [
|
|
15903
|
+
ASKING = [
|
|
15904
|
+
"palette",
|
|
15905
|
+
"keys",
|
|
15906
|
+
"search"
|
|
15907
|
+
];
|
|
15873
15908
|
Display = class extends Service()("adiff/Display") {};
|
|
15874
15909
|
paintWith = (screen) => fn("Tui.paint")(function* (state) {
|
|
15875
15910
|
yield* sync(() => screen.update(state));
|
|
@@ -16084,7 +16119,11 @@ var init_app = __esmMin((() => {
|
|
|
16084
16119
|
if (!opened) return "could not reach the pull request";
|
|
16085
16120
|
return state.length === 0 ? "opened the pull request" : `opened the ${state} pull request`;
|
|
16086
16121
|
};
|
|
16087
|
-
LISTENS = /* @__PURE__ */ new Set([
|
|
16122
|
+
LISTENS = /* @__PURE__ */ new Set([
|
|
16123
|
+
"keys",
|
|
16124
|
+
"palette",
|
|
16125
|
+
"search"
|
|
16126
|
+
]);
|
|
16088
16127
|
WRITES = /* @__PURE__ */ new Set(["compose", "report"]);
|
|
16089
16128
|
OVER = /* @__PURE__ */ new Set([
|
|
16090
16129
|
"compose",
|
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.99",
|
|
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": {
|