@eliya-oss/agent-diff 0.1.0-alpha.53 → 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 +14 -0
- package/dist/main.js +93 -41
- 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.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
|
+
|
|
9
|
+
## 0.1.0-alpha.54
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- A review now follows its branch instead of the folder it was read in. State was keyed on the worktree path, so renaming a worktree — or checking the same branch out somewhere else — left the entire review behind with nothing on screen to say it had happened. The key is the repository and the branch now, where the repository is the common git directory every worktree of it shares, so all the worktrees of one repo agree on where a review lives and different branches still keep their own. A store written under the old key is adopted the first time the branch is opened, so nothing already written is stranded.
|
|
14
|
+
|
|
15
|
+
- Comments handed to an agent that never answered them are no longer lost. The cursor advanced the moment `comment take` read a comment, so an agent that collected five and answered three left two that nothing would ever hand over again — and the terminal went on showing them as sent, with no sign anything was wrong. An answer is what retires a comment now, so one the agent dropped comes back on its next take and keeps coming back until it is answered. Settling or removing retires it too, since both are the reviewer saying they no longer need one. The branch list counts what the agent still owes rather than what it has yet to read, which is the number that was missing when a comment went quietly missing.
|
|
16
|
+
|
|
3
17
|
## 0.1.0-alpha.53
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { appendFile, mkdir, readFile, realpath, writeFile } from "node:fs/promises";
|
|
2
|
+
import { appendFile, mkdir, readFile, realpath, rename, stat, writeFile } from "node:fs/promises";
|
|
3
3
|
import { homedir, hostname, platform } from "node:os";
|
|
4
4
|
import { text } from "node:stream/consumers";
|
|
5
5
|
import { dirname, join, resolve } from "node:path";
|
|
@@ -8336,7 +8336,7 @@ var init_paths = __esmMin((() => {
|
|
|
8336
8336
|
upgradePath = (root) => join(root, "upgrade.json");
|
|
8337
8337
|
reportsDir = (root) => join(root, "reports");
|
|
8338
8338
|
reportPath = (root, stamp) => join(reportsDir(root), `${stamp}.md`);
|
|
8339
|
-
})), Store, ensureDir, readOptional, missing, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, headOf$1, keyOf$2, answerOps, layersOps, inboxOps, stateOps, makeStore, storeAt;
|
|
8339
|
+
})), Store, ensureDir, readOptional, missing, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, gitDirOf, headOf$1, repoOf$2, keyOf$2, wasKeyOf, there, adopted, moved, adopt, keyIn, answerOps, layersOps, inboxOps, stateOps, makeStore, storeAt;
|
|
8340
8340
|
var init_service$1 = __esmMin((() => {
|
|
8341
8341
|
init_dist();
|
|
8342
8342
|
init_error$2();
|
|
@@ -8514,18 +8514,40 @@ var init_service$1 = __esmMin((() => {
|
|
|
8514
8514
|
return path;
|
|
8515
8515
|
});
|
|
8516
8516
|
HEAD_REF = /^ref:\s*refs\/heads\/(.+)$/;
|
|
8517
|
-
|
|
8517
|
+
gitDirOf = (worktreePath) => readFile(join(worktreePath, ".git"), "utf8").then((raw) => {
|
|
8518
8518
|
const linked = raw.match(/^gitdir:\s*(.+)$/m);
|
|
8519
8519
|
return linked?.[1] === void 0 ? join(worktreePath, ".git") : linked[1].trim();
|
|
8520
|
-
}).catch(() => join(worktreePath, ".git"))
|
|
8520
|
+
}).catch(() => join(worktreePath, ".git"));
|
|
8521
|
+
headOf$1 = (worktreePath) => gitDirOf(worktreePath).then((dir) => readFile(join(dir, "HEAD"), "utf8")).then((raw) => {
|
|
8521
8522
|
const named = raw.trim().match(HEAD_REF);
|
|
8522
8523
|
return named?.[1] === void 0 ? raw.trim() : named[1];
|
|
8523
8524
|
}).catch(() => "");
|
|
8524
|
-
|
|
8525
|
+
repoOf$2 = (worktreePath) => gitDirOf(worktreePath).then((dir) => readFile(join(dir, "commondir"), "utf8").then((raw) => resolve(dir, raw.trim())).catch(() => dir));
|
|
8526
|
+
keyOf$2 = (worktreePath) => promise(() => Promise.all([repoOf$2(worktreePath), headOf$1(worktreePath)]).then(([repo, head]) => `${repo}#${head}`));
|
|
8527
|
+
wasKeyOf = (worktreePath) => promise(() => headOf$1(worktreePath).then((head) => `${worktreePath}#${head}`));
|
|
8528
|
+
there = (path) => stat(path).then(() => true, () => false);
|
|
8529
|
+
adopted = /* @__PURE__ */ new Set();
|
|
8530
|
+
moved = (from, to) => rename(from, to).catch(() => void 0);
|
|
8531
|
+
adopt = fn("Store.adopt")(function* (root, key, was) {
|
|
8532
|
+
const here = branchDir(root, key);
|
|
8533
|
+
if (yield* promise(() => there(here))) return key;
|
|
8534
|
+
const older = branchDir(root, was);
|
|
8535
|
+
if (!(yield* promise(() => there(older)))) return key;
|
|
8536
|
+
yield* promise(() => moved(older, here));
|
|
8537
|
+
return key;
|
|
8538
|
+
});
|
|
8539
|
+
keyIn = (root, worktreePath) => gen(function* () {
|
|
8540
|
+
const key = yield* keyOf$2(worktreePath);
|
|
8541
|
+
const mark = `${root}#${key}`;
|
|
8542
|
+
if (adopted.has(mark)) return key;
|
|
8543
|
+
adopted.add(mark);
|
|
8544
|
+
const was = yield* wasKeyOf(worktreePath);
|
|
8545
|
+
return key === was ? key : yield* adopt(root, key, was);
|
|
8546
|
+
});
|
|
8525
8547
|
answerOps = (root) => {
|
|
8526
8548
|
return {
|
|
8527
8549
|
answer: fn("Store.answer")(function* (worktreePath, entry) {
|
|
8528
|
-
const key = yield*
|
|
8550
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8529
8551
|
const path = outboxPath(root, key);
|
|
8530
8552
|
yield* ensureDir(branchDir(root, key));
|
|
8531
8553
|
yield* tryPromise({
|
|
@@ -8537,7 +8559,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8537
8559
|
});
|
|
8538
8560
|
}),
|
|
8539
8561
|
answers: fn("Store.answers")(function* (worktreePath) {
|
|
8540
|
-
const key = yield*
|
|
8562
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8541
8563
|
const path = outboxPath(root, key);
|
|
8542
8564
|
const raw = yield* readOptional(path);
|
|
8543
8565
|
return yield* match$3(raw, {
|
|
@@ -8550,14 +8572,14 @@ var init_service$1 = __esmMin((() => {
|
|
|
8550
8572
|
layersOps = (root) => {
|
|
8551
8573
|
return {
|
|
8552
8574
|
layers: fn("Store.layers")(function* (worktreePath) {
|
|
8553
|
-
const key = yield*
|
|
8575
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8554
8576
|
const path = layersPath(root, key);
|
|
8555
8577
|
const raw = yield* readOptional(path);
|
|
8556
8578
|
if (isNone(raw)) return none();
|
|
8557
8579
|
return some(yield* parseLayers(path, raw.value));
|
|
8558
8580
|
}),
|
|
8559
8581
|
saveLayers: fn("Store.saveLayers")(function* (worktreePath, next) {
|
|
8560
|
-
const key = yield*
|
|
8582
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8561
8583
|
const path = layersPath(root, key);
|
|
8562
8584
|
yield* ensureDir(branchDir(root, key));
|
|
8563
8585
|
yield* tryPromise({
|
|
@@ -8573,7 +8595,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8573
8595
|
inboxOps = (root) => {
|
|
8574
8596
|
return {
|
|
8575
8597
|
submit: fn("Store.submit")(function* (worktreePath, batch) {
|
|
8576
|
-
const key = yield*
|
|
8598
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8577
8599
|
const path = inboxPath(root, key);
|
|
8578
8600
|
yield* ensureDir(branchDir(root, key));
|
|
8579
8601
|
yield* tryPromise({
|
|
@@ -8585,7 +8607,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8585
8607
|
});
|
|
8586
8608
|
}),
|
|
8587
8609
|
inbox: fn("Store.inbox")(function* (worktreePath) {
|
|
8588
|
-
const key = yield*
|
|
8610
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8589
8611
|
const path = inboxPath(root, key);
|
|
8590
8612
|
const raw = yield* readOptional(path);
|
|
8591
8613
|
return yield* match$3(raw, {
|
|
@@ -8598,7 +8620,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8598
8620
|
stateOps = (root) => {
|
|
8599
8621
|
return {
|
|
8600
8622
|
state: fn("Store.state")(function* (worktreePath) {
|
|
8601
|
-
const key = yield*
|
|
8623
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8602
8624
|
const path = statePath(root, key);
|
|
8603
8625
|
const raw = yield* readOptional(path);
|
|
8604
8626
|
return yield* match$3(raw, {
|
|
@@ -8607,7 +8629,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8607
8629
|
});
|
|
8608
8630
|
}),
|
|
8609
8631
|
saveState: fn("Store.saveState")(function* (worktreePath, next) {
|
|
8610
|
-
const key = yield*
|
|
8632
|
+
const key = yield* keyIn(root, worktreePath);
|
|
8611
8633
|
const path = statePath(root, key);
|
|
8612
8634
|
yield* ensureDir(branchDir(root, key));
|
|
8613
8635
|
yield* tryPromise({
|
|
@@ -9236,7 +9258,7 @@ var init_pane = __esmMin((() => {
|
|
|
9236
9258
|
init_commands();
|
|
9237
9259
|
init_init();
|
|
9238
9260
|
init_pane();
|
|
9239
|
-
var version$1 = "0.1.0-alpha.
|
|
9261
|
+
var version$1 = "0.1.0-alpha.55";
|
|
9240
9262
|
//#endregion
|
|
9241
9263
|
//#region src/cli/upgrade.ts
|
|
9242
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;
|
|
@@ -10957,7 +10979,7 @@ var init_tree = __esmMin((() => {
|
|
|
10957
10979
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
10958
10980
|
};
|
|
10959
10981
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
10960
|
-
})), 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;
|
|
10961
10983
|
var init_model = __esmMin((() => {
|
|
10962
10984
|
init_dist();
|
|
10963
10985
|
init_patch();
|
|
@@ -11018,21 +11040,19 @@ var init_model = __esmMin((() => {
|
|
|
11018
11040
|
matchIndex: 0,
|
|
11019
11041
|
rail: "tree"
|
|
11020
11042
|
});
|
|
11021
|
-
BODY_BORDER = 2;
|
|
11022
11043
|
TREE_MAX = 34;
|
|
11023
11044
|
TREE_MIN = 18;
|
|
11024
11045
|
TREE_SHARE = .3;
|
|
11025
|
-
DIFF_MIN =
|
|
11026
|
-
|
|
11027
|
-
|
|
11028
|
-
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);
|
|
11029
11049
|
treeWidth = (columns) => {
|
|
11030
11050
|
const room = bodyRoom(columns);
|
|
11031
11051
|
const wanted = Math.min(TREE_MAX, Math.max(TREE_MIN, Math.floor(room * TREE_SHARE)));
|
|
11032
11052
|
return Math.max(0, Math.min(wanted, room - DIFF_MIN));
|
|
11033
11053
|
};
|
|
11034
|
-
reviewWidth = () =>
|
|
11035
|
-
panelFits = (state) => bodyRoom(state.columns) - treeWidth(state.columns) -
|
|
11054
|
+
reviewWidth = () => 36;
|
|
11055
|
+
panelFits = (state) => bodyRoom(state.columns) - treeWidth(state.columns) - reviewWidth() >= DIFF_ROOMY;
|
|
11036
11056
|
panelShown = (state) => state.screen !== "branches" && state.panelOpen && panelFits(state);
|
|
11037
11057
|
onLayers = (state) => state.rail === "layers" && state.layers.length > 0;
|
|
11038
11058
|
selectedLayer = (state) => state.layers[state.layerIndex];
|
|
@@ -11694,6 +11714,14 @@ var init_command = __esmMin((() => {
|
|
|
11694
11714
|
keys: ["tab"],
|
|
11695
11715
|
screens: ["review"]
|
|
11696
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
|
+
}),
|
|
11697
11725
|
command({
|
|
11698
11726
|
action: "panel.toggle",
|
|
11699
11727
|
title: "Show or hide the review panel",
|
|
@@ -12103,7 +12131,7 @@ var init_match = __esmMin((() => {
|
|
|
12103
12131
|
}));
|
|
12104
12132
|
//#endregion
|
|
12105
12133
|
//#region src/tui/reduce.ts
|
|
12106
|
-
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;
|
|
12107
12135
|
var init_reduce = __esmMin((() => {
|
|
12108
12136
|
init_dist();
|
|
12109
12137
|
init_patch();
|
|
@@ -12245,10 +12273,16 @@ var init_reduce = __esmMin((() => {
|
|
|
12245
12273
|
if (state.focus === "review") return movePanel(state, delta);
|
|
12246
12274
|
return stepStop(state, delta);
|
|
12247
12275
|
};
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
|
|
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;
|
|
12252
12286
|
};
|
|
12253
12287
|
togglePanel = (state) => {
|
|
12254
12288
|
if (!state.panelOpen && !panelFits(state)) return withNotice(state, "the terminal is too narrow for the review panel");
|
|
@@ -12468,7 +12502,12 @@ var init_reduce = __esmMin((() => {
|
|
|
12468
12502
|
"compose.newline": (state) => inserted(state, "\n"),
|
|
12469
12503
|
"focus.toggle": (state) => ({
|
|
12470
12504
|
...state,
|
|
12471
|
-
focus:
|
|
12505
|
+
focus: focusStepped(state, 1),
|
|
12506
|
+
navOpen: true
|
|
12507
|
+
}),
|
|
12508
|
+
"focus.back": (state) => ({
|
|
12509
|
+
...state,
|
|
12510
|
+
focus: focusStepped(state, -1),
|
|
12472
12511
|
navOpen: true
|
|
12473
12512
|
}),
|
|
12474
12513
|
"panel.toggle": togglePanel,
|
|
@@ -13367,7 +13406,7 @@ var init_diffview = __esmMin((() => {
|
|
|
13367
13406
|
}));
|
|
13368
13407
|
//#endregion
|
|
13369
13408
|
//#region src/tui/render.ts
|
|
13370
|
-
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;
|
|
13371
13410
|
var init_render = __esmMin((() => {
|
|
13372
13411
|
init_command();
|
|
13373
13412
|
init_patch();
|
|
@@ -13403,6 +13442,7 @@ var init_render = __esmMin((() => {
|
|
|
13403
13442
|
PANEL_QUARTER = 4;
|
|
13404
13443
|
PANEL_FIFTH = 5;
|
|
13405
13444
|
PANE_CHROME = 3;
|
|
13445
|
+
PANE_EDGES = 2;
|
|
13406
13446
|
PANE_INSET = 1;
|
|
13407
13447
|
BRANCH_WIDTH = 82;
|
|
13408
13448
|
BRANCH_NAME_MIN = 12;
|
|
@@ -13469,7 +13509,6 @@ var init_render = __esmMin((() => {
|
|
|
13469
13509
|
flexDirection: "column",
|
|
13470
13510
|
minHeight: 0,
|
|
13471
13511
|
overflow: "hidden",
|
|
13472
|
-
border: ["right"],
|
|
13473
13512
|
borderColor: palette.rule
|
|
13474
13513
|
});
|
|
13475
13514
|
};
|
|
@@ -13490,7 +13529,6 @@ var init_render = __esmMin((() => {
|
|
|
13490
13529
|
flexDirection: "column",
|
|
13491
13530
|
minHeight: 0,
|
|
13492
13531
|
overflow: "hidden",
|
|
13493
|
-
border: ["left"],
|
|
13494
13532
|
borderColor: palette.rule,
|
|
13495
13533
|
visible: false
|
|
13496
13534
|
});
|
|
@@ -14100,7 +14138,8 @@ var init_render = __esmMin((() => {
|
|
|
14100
14138
|
return this.view.room();
|
|
14101
14139
|
}
|
|
14102
14140
|
diffRows() {
|
|
14103
|
-
const
|
|
14141
|
+
const edges = this.diffPane.border === true ? PANE_EDGES : 0;
|
|
14142
|
+
const pane = this.diffPane.height - edges - this.view.pinRows();
|
|
14104
14143
|
return Math.max(1, pane > 0 ? pane : this.diffScroll.height);
|
|
14105
14144
|
}
|
|
14106
14145
|
update(state) {
|
|
@@ -14211,7 +14250,7 @@ var init_render = __esmMin((() => {
|
|
|
14211
14250
|
this.panelPane.visible = shown;
|
|
14212
14251
|
this.panelPane.width = shown ? reviewWidth() : 0;
|
|
14213
14252
|
this.panelPane.paddingLeft = shown ? 1 : 0;
|
|
14214
|
-
this.panelPane.paddingTop =
|
|
14253
|
+
this.panelPane.paddingTop = 0;
|
|
14215
14254
|
this.panel.content = shown ? panelText(state, reviewWidth() - PANE_CHROME) : "";
|
|
14216
14255
|
}
|
|
14217
14256
|
listText(state) {
|
|
@@ -14226,7 +14265,8 @@ var init_render = __esmMin((() => {
|
|
|
14226
14265
|
return new StyledText([...rows, ...more]);
|
|
14227
14266
|
}
|
|
14228
14267
|
listRoom() {
|
|
14229
|
-
|
|
14268
|
+
const edges = this.listPane.border === true ? PANE_EDGES : PANE_INSET;
|
|
14269
|
+
return Math.max(1, this.listPane.height - edges);
|
|
14230
14270
|
}
|
|
14231
14271
|
layerRail(state) {
|
|
14232
14272
|
const banner = state.layersStale ? 1 : 0;
|
|
@@ -14391,21 +14431,32 @@ var init_render = __esmMin((() => {
|
|
|
14391
14431
|
const inset = onBranches ? 0 : 1;
|
|
14392
14432
|
this.listPane.width = onBranches ? this.homeRoom(state) : this.paneRoom();
|
|
14393
14433
|
this.listPane.visible = onBranches || state.navOpen;
|
|
14394
|
-
this.listPane.border = onBranches ? [] : ["right"];
|
|
14395
14434
|
this.listPane.paddingLeft = inset;
|
|
14396
|
-
this.listPane.paddingRight =
|
|
14397
|
-
this.listPane.paddingTop =
|
|
14435
|
+
this.listPane.paddingRight = 0;
|
|
14436
|
+
this.listPane.paddingTop = 0;
|
|
14398
14437
|
this.listPane.marginRight = 0;
|
|
14399
14438
|
this.diffPane.paddingLeft = inset;
|
|
14400
14439
|
this.list.flexGrow = inset;
|
|
14440
|
+
this.paintFocus(state, onBranches);
|
|
14401
14441
|
this.paintChrome(onBranches);
|
|
14402
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
|
+
}
|
|
14403
14457
|
paintChrome(onBranches) {
|
|
14404
14458
|
const place = onBranches ? "center" : "flex-start";
|
|
14405
|
-
this.body.border =
|
|
14406
|
-
this.body.borderStyle = "rounded";
|
|
14407
|
-
this.body.borderColor = palette.rule;
|
|
14408
|
-
this.listPane.borderColor = palette.rule;
|
|
14459
|
+
this.body.border = [];
|
|
14409
14460
|
this.listPane.backgroundColor = "transparent";
|
|
14410
14461
|
this.logo.visible = onBranches;
|
|
14411
14462
|
this.landing.visible = onBranches;
|
|
@@ -14677,6 +14728,7 @@ var init_app = __esmMin((() => {
|
|
|
14677
14728
|
LISTENS = /* @__PURE__ */ new Set(["keys", "palette"]);
|
|
14678
14729
|
listens = (screen) => LISTENS.has(screen);
|
|
14679
14730
|
keyName = (key) => {
|
|
14731
|
+
if (key.shift && key.name === "tab") return "shift+tab";
|
|
14680
14732
|
const base = key.shift && key.name.length === 1 ? key.name.toUpperCase() : key.name;
|
|
14681
14733
|
return key.ctrl ? `ctrl+${base}` : base;
|
|
14682
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": {
|