@eliya-oss/agent-diff 0.1.0-alpha.42 → 0.1.0-alpha.44
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 +29 -8
- 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.44
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- A file buried deep in a nested tree can be read: the file list keeps both ends of a name that does not fit, so two files whose names end the same way no longer draw as one row, and the header names the file you are on instead of letting the path run off the edge of the terminal.
|
|
8
|
+
|
|
9
|
+
## 0.1.0-alpha.43
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Build the Linux release binaries again. The terminal library ships one native package per platform and libc, and pnpm skips the musl ones on a glibc runner, so the compiler could not find the musl library it still has to bundle and both Linux builds stopped there. Installs now take both libc flavours, and every pull request compiles all four binaries and checks they answer with no runtime on PATH, so a broken binary shows up before a release does. The release also tracks the newest Bun rather than a pinned one.
|
|
14
|
+
|
|
3
15
|
## 0.1.0-alpha.42
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/dist/main.js
CHANGED
|
@@ -9199,7 +9199,7 @@ var init_pane = __esmMin((() => {
|
|
|
9199
9199
|
init_commands();
|
|
9200
9200
|
init_init();
|
|
9201
9201
|
init_pane();
|
|
9202
|
-
var version$1 = "0.1.0-alpha.
|
|
9202
|
+
var version$1 = "0.1.0-alpha.44";
|
|
9203
9203
|
//#endregion
|
|
9204
9204
|
//#region src/cli/upgrade.ts
|
|
9205
9205
|
var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf, newer, tagIn, fetched, askLatest, ran, here, statusOf$1, ranLine, failedLine, noteFor, offerFor, restOf, sayUpgrade, upgradeAdiff;
|
|
@@ -13012,7 +13012,7 @@ var init_diffview = __esmMin((() => {
|
|
|
13012
13012
|
}));
|
|
13013
13013
|
//#endregion
|
|
13014
13014
|
//#region src/tui/render.ts
|
|
13015
|
-
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_MAX, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, BODY_BORDER, PANE_CHROME, BRANCH_WIDTH, BRANCH_NAME, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, bodyRoom, treeWidth, homeWidth, commandRow, modalWidth, composeRoom, laidOut, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, makePaletteParts, makePendingParts, makeChoices, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, makeComposeParts, makeCompose, clip, clipHead, clipPath, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, branchHeading, atHome, layersCell, stateCell, branchCells, headerParts, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, Screen;
|
|
13015
|
+
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_MAX, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, BODY_BORDER, PANE_CHROME, BRANCH_WIDTH, BRANCH_NAME, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, bodyRoom, treeWidth, homeWidth, commandRow, modalWidth, composeRoom, laidOut, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, 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, 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, Screen;
|
|
13016
13016
|
var init_render = __esmMin((() => {
|
|
13017
13017
|
init_command();
|
|
13018
13018
|
init_patch();
|
|
@@ -13340,6 +13340,12 @@ var init_render = __esmMin((() => {
|
|
|
13340
13340
|
});
|
|
13341
13341
|
clip = (label, room) => label.length > room ? `${label.slice(0, Math.max(0, room - 1))}…` : label;
|
|
13342
13342
|
clipHead = (label, room) => label.length > room ? `…${label.slice(label.length - Math.max(0, room - 1))}` : label;
|
|
13343
|
+
clipMiddle = (label, room) => {
|
|
13344
|
+
if (label.length <= room) return label;
|
|
13345
|
+
const kept = Math.max(0, room - 1);
|
|
13346
|
+
const front = Math.floor(kept / 2);
|
|
13347
|
+
return `${label.slice(0, front)}…${label.slice(label.length - (kept - front))}`;
|
|
13348
|
+
};
|
|
13343
13349
|
clipPath = (label, room) => {
|
|
13344
13350
|
if (label.length <= room) return label;
|
|
13345
13351
|
const segments = label.split("/");
|
|
@@ -13353,7 +13359,7 @@ var init_render = __esmMin((() => {
|
|
|
13353
13359
|
const indent = " ".repeat(row.depth);
|
|
13354
13360
|
if (row.kind === "file") {
|
|
13355
13361
|
const lead = `${indent} ${marks().file} `;
|
|
13356
|
-
return `${lead}${
|
|
13362
|
+
return `${lead}${clipMiddle(row.name, Math.max(4, room - lead.length))}`;
|
|
13357
13363
|
}
|
|
13358
13364
|
const shut = state.closed.includes(row.path);
|
|
13359
13365
|
const lead = `${indent}${shut ? "▸" : "▾"} ${shut ? marks().folder : marks().folderOpen} `;
|
|
@@ -13403,10 +13409,14 @@ var init_render = __esmMin((() => {
|
|
|
13403
13409
|
elide = (path, room) => {
|
|
13404
13410
|
if (path.length <= room) return path;
|
|
13405
13411
|
const parts = path.split("/").filter((part) => part.length > 0);
|
|
13406
|
-
const
|
|
13412
|
+
const first = parts[0] ?? "";
|
|
13413
|
+
const name = parts.at(-1) ?? path;
|
|
13407
13414
|
const tail = parts.slice(-2).join("/");
|
|
13408
|
-
|
|
13409
|
-
|
|
13415
|
+
return [
|
|
13416
|
+
`${path.startsWith("/") ? `/${first}` : path.startsWith("~") ? "~" : first}/…/${tail}`,
|
|
13417
|
+
`…/${tail}`,
|
|
13418
|
+
`…/${name}`
|
|
13419
|
+
].find((option) => option.length <= room) ?? clipMiddle(name, room);
|
|
13410
13420
|
};
|
|
13411
13421
|
contextLabel = (context) => {
|
|
13412
13422
|
if (context === 3) return "";
|
|
@@ -13451,6 +13461,16 @@ var init_render = __esmMin((() => {
|
|
|
13451
13461
|
hiddenLines(state) === 0 ? "" : `⋯ ${hiddenLines(state)} lines hidden`,
|
|
13452
13462
|
pan === 0 ? "" : `→ ${pan} columns`
|
|
13453
13463
|
];
|
|
13464
|
+
HEADER_GAP = 2;
|
|
13465
|
+
HEADER_PATH_MIN = 20;
|
|
13466
|
+
headerRoom = (width) => Math.max(0, width - 2 - 4);
|
|
13467
|
+
headerFitted = (parts, path, room) => {
|
|
13468
|
+
const gaps = HEADER_GAP * Math.max(0, parts.length - 1);
|
|
13469
|
+
const spent = parts.reduce((total, part) => total + part.length, gaps);
|
|
13470
|
+
if (path.length === 0 || spent <= room) return parts;
|
|
13471
|
+
const left = Math.max(HEADER_PATH_MIN, path.length - (spent - room));
|
|
13472
|
+
return parts.map((part) => part === path ? elide(path, left) : part);
|
|
13473
|
+
};
|
|
13454
13474
|
fallbackScope = (state, top) => {
|
|
13455
13475
|
const scope = (selectedPatch(state)?.hunks.findLast((hunk) => hunk.startRow < top))?.scope ?? "";
|
|
13456
13476
|
return scope.length === 0 ? [] : [scope];
|
|
@@ -13690,8 +13710,9 @@ var init_render = __esmMin((() => {
|
|
|
13690
13710
|
headerText(state) {
|
|
13691
13711
|
const branch = selectedBranch(state);
|
|
13692
13712
|
if (atHome(state)) return t`${fg(palette.faint)("")}`;
|
|
13693
|
-
const
|
|
13694
|
-
const
|
|
13713
|
+
const path = selectedPatch(state)?.path ?? "";
|
|
13714
|
+
const parts = headerParts(state, branch?.branch ?? "", path, Math.min(state.pan, this.view.panLimit())).filter((part) => part.length > 0);
|
|
13715
|
+
const [name = "", ...rest] = headerFitted(parts, path, headerRoom(this.renderer.width));
|
|
13695
13716
|
return t`${fg(palette.ink)(name)} ${fg(palette.muted)(rest.join(" "))}`;
|
|
13696
13717
|
}
|
|
13697
13718
|
footerText(state) {
|
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.44",
|
|
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": {
|