@eliya-oss/agent-diff 0.1.0-alpha.54 → 0.1.0-alpha.55
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 +58 -28
- 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.55
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The review screen says which pane you are in. It was one frame around everything with rules between the panes, which drew the seams but never told you which side of them your next keystroke was going to land on — and `tab` moves between three panes where most keys mean something different. Each pane is its own bordered box now, and the one holding the focus is lit in the accent colour while the others stay dim, so exactly one border is bright at any time. `tab` also walks the panes left to right now, the way they are drawn, rather than starting in the middle and jumping to the left pane before crossing to the right; `shift+tab` walks back.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.54
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -9258,7 +9258,7 @@ var init_pane = __esmMin((() => {
|
|
|
9258
9258
|
init_commands();
|
|
9259
9259
|
init_init();
|
|
9260
9260
|
init_pane();
|
|
9261
|
-
var version$1 = "0.1.0-alpha.
|
|
9261
|
+
var version$1 = "0.1.0-alpha.55";
|
|
9262
9262
|
//#endregion
|
|
9263
9263
|
//#region src/cli/upgrade.ts
|
|
9264
9264
|
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;
|
|
@@ -10979,7 +10979,7 @@ var init_tree = __esmMin((() => {
|
|
|
10979
10979
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
10980
10980
|
};
|
|
10981
10981
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
10982
|
-
})), nothingReviewed, initialState,
|
|
10982
|
+
})), nothingReviewed, initialState, TREE_MAX, 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, treeOf, treeRows, crowdedOf, foldersOfFile, isReviewed, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, caretAt, drafted, WORD, wordLeft, wordRight, caretByWord, lineStart, lineEnd, caretToEdge, editedComment, composeTarget, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
|
|
10983
10983
|
var init_model = __esmMin((() => {
|
|
10984
10984
|
init_dist();
|
|
10985
10985
|
init_patch();
|
|
@@ -11040,21 +11040,19 @@ var init_model = __esmMin((() => {
|
|
|
11040
11040
|
matchIndex: 0,
|
|
11041
11041
|
rail: "tree"
|
|
11042
11042
|
});
|
|
11043
|
-
BODY_BORDER = 2;
|
|
11044
11043
|
TREE_MAX = 34;
|
|
11045
11044
|
TREE_MIN = 18;
|
|
11046
11045
|
TREE_SHARE = .3;
|
|
11047
|
-
DIFF_MIN =
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
bodyRoom = (columns) => Math.max(0, columns - 2 - BODY_BORDER);
|
|
11046
|
+
DIFF_MIN = 26;
|
|
11047
|
+
DIFF_ROOMY = 58;
|
|
11048
|
+
bodyRoom = (columns) => Math.max(0, columns - 2);
|
|
11051
11049
|
treeWidth = (columns) => {
|
|
11052
11050
|
const room = bodyRoom(columns);
|
|
11053
11051
|
const wanted = Math.min(TREE_MAX, Math.max(TREE_MIN, Math.floor(room * TREE_SHARE)));
|
|
11054
11052
|
return Math.max(0, Math.min(wanted, room - DIFF_MIN));
|
|
11055
11053
|
};
|
|
11056
|
-
reviewWidth = () =>
|
|
11057
|
-
panelFits = (state) => bodyRoom(state.columns) - treeWidth(state.columns) -
|
|
11054
|
+
reviewWidth = () => 36;
|
|
11055
|
+
panelFits = (state) => bodyRoom(state.columns) - treeWidth(state.columns) - reviewWidth() >= DIFF_ROOMY;
|
|
11058
11056
|
panelShown = (state) => state.screen !== "branches" && state.panelOpen && panelFits(state);
|
|
11059
11057
|
onLayers = (state) => state.rail === "layers" && state.layers.length > 0;
|
|
11060
11058
|
selectedLayer = (state) => state.layers[state.layerIndex];
|
|
@@ -11716,6 +11714,14 @@ var init_command = __esmMin((() => {
|
|
|
11716
11714
|
keys: ["tab"],
|
|
11717
11715
|
screens: ["review"]
|
|
11718
11716
|
}),
|
|
11717
|
+
command({
|
|
11718
|
+
action: "focus.back",
|
|
11719
|
+
title: "Switch pane, the other way",
|
|
11720
|
+
category: "General",
|
|
11721
|
+
keys: ["shift+tab"],
|
|
11722
|
+
screens: ["review"],
|
|
11723
|
+
listed: false
|
|
11724
|
+
}),
|
|
11719
11725
|
command({
|
|
11720
11726
|
action: "panel.toggle",
|
|
11721
11727
|
title: "Show or hide the review panel",
|
|
@@ -12125,7 +12131,7 @@ var init_match = __esmMin((() => {
|
|
|
12125
12131
|
}));
|
|
12126
12132
|
//#endregion
|
|
12127
12133
|
//#region src/tui/reduce.ts
|
|
12128
|
-
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown,
|
|
12134
|
+
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, withPending, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, withPatches, inserted, typed, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, pasted, backspaced, deleted, caretMoved, caretJumped, caretHomed, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12129
12135
|
var init_reduce = __esmMin((() => {
|
|
12130
12136
|
init_dist();
|
|
12131
12137
|
init_patch();
|
|
@@ -12267,10 +12273,16 @@ var init_reduce = __esmMin((() => {
|
|
|
12267
12273
|
if (state.focus === "review") return movePanel(state, delta);
|
|
12268
12274
|
return stepStop(state, delta);
|
|
12269
12275
|
};
|
|
12270
|
-
|
|
12271
|
-
|
|
12272
|
-
|
|
12273
|
-
|
|
12276
|
+
PANES = [
|
|
12277
|
+
"tree",
|
|
12278
|
+
"diff",
|
|
12279
|
+
"review"
|
|
12280
|
+
];
|
|
12281
|
+
panesShown = (state) => PANES.filter((pane) => pane !== "review" || panelShown(state));
|
|
12282
|
+
focusStepped = (state, delta) => {
|
|
12283
|
+
const shown = panesShown(state);
|
|
12284
|
+
const at = shown.indexOf(state.focus);
|
|
12285
|
+
return shown[((at === -1 ? 0 : at) + delta + shown.length) % shown.length] ?? state.focus;
|
|
12274
12286
|
};
|
|
12275
12287
|
togglePanel = (state) => {
|
|
12276
12288
|
if (!state.panelOpen && !panelFits(state)) return withNotice(state, "the terminal is too narrow for the review panel");
|
|
@@ -12490,7 +12502,12 @@ var init_reduce = __esmMin((() => {
|
|
|
12490
12502
|
"compose.newline": (state) => inserted(state, "\n"),
|
|
12491
12503
|
"focus.toggle": (state) => ({
|
|
12492
12504
|
...state,
|
|
12493
|
-
focus:
|
|
12505
|
+
focus: focusStepped(state, 1),
|
|
12506
|
+
navOpen: true
|
|
12507
|
+
}),
|
|
12508
|
+
"focus.back": (state) => ({
|
|
12509
|
+
...state,
|
|
12510
|
+
focus: focusStepped(state, -1),
|
|
12494
12511
|
navOpen: true
|
|
12495
12512
|
}),
|
|
12496
12513
|
"panel.toggle": togglePanel,
|
|
@@ -13389,7 +13406,7 @@ var init_diffview = __esmMin((() => {
|
|
|
13389
13406
|
}));
|
|
13390
13407
|
//#endregion
|
|
13391
13408
|
//#region src/tui/render.ts
|
|
13392
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, COMPOSE_PAD, COMPOSE_MIN_TEXT, 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_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, makePaletteParts, makePendingParts, makeChoices, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, 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, 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;
|
|
13409
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, COMPOSE_PAD, COMPOSE_MIN_TEXT, 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, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, makePaletteParts, makePendingParts, makeChoices, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, 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, 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;
|
|
13393
13410
|
var init_render = __esmMin((() => {
|
|
13394
13411
|
init_command();
|
|
13395
13412
|
init_patch();
|
|
@@ -13425,6 +13442,7 @@ var init_render = __esmMin((() => {
|
|
|
13425
13442
|
PANEL_QUARTER = 4;
|
|
13426
13443
|
PANEL_FIFTH = 5;
|
|
13427
13444
|
PANE_CHROME = 3;
|
|
13445
|
+
PANE_EDGES = 2;
|
|
13428
13446
|
PANE_INSET = 1;
|
|
13429
13447
|
BRANCH_WIDTH = 82;
|
|
13430
13448
|
BRANCH_NAME_MIN = 12;
|
|
@@ -13491,7 +13509,6 @@ var init_render = __esmMin((() => {
|
|
|
13491
13509
|
flexDirection: "column",
|
|
13492
13510
|
minHeight: 0,
|
|
13493
13511
|
overflow: "hidden",
|
|
13494
|
-
border: ["right"],
|
|
13495
13512
|
borderColor: palette.rule
|
|
13496
13513
|
});
|
|
13497
13514
|
};
|
|
@@ -13512,7 +13529,6 @@ var init_render = __esmMin((() => {
|
|
|
13512
13529
|
flexDirection: "column",
|
|
13513
13530
|
minHeight: 0,
|
|
13514
13531
|
overflow: "hidden",
|
|
13515
|
-
border: ["left"],
|
|
13516
13532
|
borderColor: palette.rule,
|
|
13517
13533
|
visible: false
|
|
13518
13534
|
});
|
|
@@ -14122,7 +14138,8 @@ var init_render = __esmMin((() => {
|
|
|
14122
14138
|
return this.view.room();
|
|
14123
14139
|
}
|
|
14124
14140
|
diffRows() {
|
|
14125
|
-
const
|
|
14141
|
+
const edges = this.diffPane.border === true ? PANE_EDGES : 0;
|
|
14142
|
+
const pane = this.diffPane.height - edges - this.view.pinRows();
|
|
14126
14143
|
return Math.max(1, pane > 0 ? pane : this.diffScroll.height);
|
|
14127
14144
|
}
|
|
14128
14145
|
update(state) {
|
|
@@ -14233,7 +14250,7 @@ var init_render = __esmMin((() => {
|
|
|
14233
14250
|
this.panelPane.visible = shown;
|
|
14234
14251
|
this.panelPane.width = shown ? reviewWidth() : 0;
|
|
14235
14252
|
this.panelPane.paddingLeft = shown ? 1 : 0;
|
|
14236
|
-
this.panelPane.paddingTop =
|
|
14253
|
+
this.panelPane.paddingTop = 0;
|
|
14237
14254
|
this.panel.content = shown ? panelText(state, reviewWidth() - PANE_CHROME) : "";
|
|
14238
14255
|
}
|
|
14239
14256
|
listText(state) {
|
|
@@ -14248,7 +14265,8 @@ var init_render = __esmMin((() => {
|
|
|
14248
14265
|
return new StyledText([...rows, ...more]);
|
|
14249
14266
|
}
|
|
14250
14267
|
listRoom() {
|
|
14251
|
-
|
|
14268
|
+
const edges = this.listPane.border === true ? PANE_EDGES : PANE_INSET;
|
|
14269
|
+
return Math.max(1, this.listPane.height - edges);
|
|
14252
14270
|
}
|
|
14253
14271
|
layerRail(state) {
|
|
14254
14272
|
const banner = state.layersStale ? 1 : 0;
|
|
@@ -14413,21 +14431,32 @@ var init_render = __esmMin((() => {
|
|
|
14413
14431
|
const inset = onBranches ? 0 : 1;
|
|
14414
14432
|
this.listPane.width = onBranches ? this.homeRoom(state) : this.paneRoom();
|
|
14415
14433
|
this.listPane.visible = onBranches || state.navOpen;
|
|
14416
|
-
this.listPane.border = onBranches ? [] : ["right"];
|
|
14417
14434
|
this.listPane.paddingLeft = inset;
|
|
14418
|
-
this.listPane.paddingRight =
|
|
14419
|
-
this.listPane.paddingTop =
|
|
14435
|
+
this.listPane.paddingRight = 0;
|
|
14436
|
+
this.listPane.paddingTop = 0;
|
|
14420
14437
|
this.listPane.marginRight = 0;
|
|
14421
14438
|
this.diffPane.paddingLeft = inset;
|
|
14422
14439
|
this.list.flexGrow = inset;
|
|
14440
|
+
this.paintFocus(state, onBranches);
|
|
14423
14441
|
this.paintChrome(onBranches);
|
|
14424
14442
|
}
|
|
14443
|
+
paintFocus(state, onBranches) {
|
|
14444
|
+
const lit = (held) => !onBranches && state.focus === held ? palette.accent : palette.rule;
|
|
14445
|
+
for (const pane of [
|
|
14446
|
+
this.listPane,
|
|
14447
|
+
this.diffPane,
|
|
14448
|
+
this.panelPane
|
|
14449
|
+
]) {
|
|
14450
|
+
pane.border = onBranches ? [] : true;
|
|
14451
|
+
pane.borderStyle = "rounded";
|
|
14452
|
+
}
|
|
14453
|
+
this.listPane.borderColor = onBranches ? palette.rule : lit("tree");
|
|
14454
|
+
this.diffPane.borderColor = lit("diff");
|
|
14455
|
+
this.panelPane.borderColor = lit("review");
|
|
14456
|
+
}
|
|
14425
14457
|
paintChrome(onBranches) {
|
|
14426
14458
|
const place = onBranches ? "center" : "flex-start";
|
|
14427
|
-
this.body.border =
|
|
14428
|
-
this.body.borderStyle = "rounded";
|
|
14429
|
-
this.body.borderColor = palette.rule;
|
|
14430
|
-
this.listPane.borderColor = palette.rule;
|
|
14459
|
+
this.body.border = [];
|
|
14431
14460
|
this.listPane.backgroundColor = "transparent";
|
|
14432
14461
|
this.logo.visible = onBranches;
|
|
14433
14462
|
this.landing.visible = onBranches;
|
|
@@ -14699,6 +14728,7 @@ var init_app = __esmMin((() => {
|
|
|
14699
14728
|
LISTENS = /* @__PURE__ */ new Set(["keys", "palette"]);
|
|
14700
14729
|
listens = (screen) => LISTENS.has(screen);
|
|
14701
14730
|
keyName = (key) => {
|
|
14731
|
+
if (key.shift && key.name === "tab") return "shift+tab";
|
|
14702
14732
|
const base = key.shift && key.name.length === 1 ? key.name.toUpperCase() : key.name;
|
|
14703
14733
|
return key.ctrl ? `ctrl+${base}` : base;
|
|
14704
14734
|
};
|
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.55",
|
|
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": {
|