@eliya-oss/agent-diff 0.1.0-alpha.201 → 0.1.0-alpha.202
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 +25 -0
- package/README.md +2 -2
- package/dist/main.js +36 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.202
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(diff): a layer keeps a short run another layer claims in place, in faint ink, and folds only runs of 8 lines or more.
|
|
8
|
+
|
|
9
|
+
<details><summary>What was wrong</summary>
|
|
10
|
+
|
|
11
|
+
Every line another layer claimed folded into its own "changed lines · layer N explains them" line,
|
|
12
|
+
even one line in the middle of a statement. A new file split between four layers showed a fold
|
|
13
|
+
every few lines, and a three-line `import { … } from` read as one line, a fold, and two lines.
|
|
14
|
+
|
|
15
|
+
</details>
|
|
16
|
+
|
|
17
|
+
- breaking(homebrew): the formula installs on Apple silicon only, and an Intel Mac installs adiff with npm.
|
|
18
|
+
|
|
19
|
+
<details><summary>Why</summary>
|
|
20
|
+
|
|
21
|
+
Releases no longer build a binary for Intel Macs. Apple stopped selling them in 2023, and the
|
|
22
|
+
Intel build was the slowest job on every pull request and every release. `brew upgrade` on an Intel
|
|
23
|
+
Mac now says the formula needs Apple silicon; `npm i -g @eliya-oss/agent-diff@alpha` still works
|
|
24
|
+
there.
|
|
25
|
+
|
|
26
|
+
</details>
|
|
27
|
+
|
|
3
28
|
## 0.1.0-alpha.201
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -31,8 +31,8 @@ point stays open until you settle it.
|
|
|
31
31
|
|
|
32
32
|
## Requirements
|
|
33
33
|
|
|
34
|
-
The Homebrew formula installs one compiled binary, which draws the terminal itself
|
|
35
|
-
at all. A global npm install runs on Node 22 or newer, and the terminal there needs Node 26: adiff
|
|
34
|
+
The Homebrew formula installs one compiled binary for Apple silicon, which draws the terminal itself
|
|
35
|
+
and needs no Node at all. On an Intel Mac, install with npm. A global npm install runs on Node 22 or newer, and the terminal there needs Node 26: adiff
|
|
36
36
|
finds one among your fnm, nvm, asdf, volta and Homebrew installs and runs the terminal on that, and
|
|
37
37
|
says so when there is none, while every other command runs where you are.
|
|
38
38
|
|
package/dist/main.js
CHANGED
|
@@ -10083,7 +10083,7 @@ var init_config = __esmMin((() => {
|
|
|
10083
10083
|
//#region package.json
|
|
10084
10084
|
init_pane();
|
|
10085
10085
|
init_config();
|
|
10086
|
-
var version$1 = "0.1.0-alpha.
|
|
10086
|
+
var version$1 = "0.1.0-alpha.202";
|
|
10087
10087
|
//#endregion
|
|
10088
10088
|
//#region src/cli/error.ts
|
|
10089
10089
|
var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered, NotServed, BadRequest;
|
|
@@ -17941,10 +17941,11 @@ var init_keys = __esmMin((() => {
|
|
|
17941
17941
|
source: "raw"
|
|
17942
17942
|
});
|
|
17943
17943
|
};
|
|
17944
|
-
})), sourceLength, markerText, lastNewLine, spansOf, linesFrom, push, markGap, openOf, countOf, openAbove, openBelow, elsewhereText, markElsewhere, flushed, someRows, changedIn, firstChanged, makeRows, compose$1, cache, keyOf$1, saidOf, lineOf$1, inSpans, spansFor, claimOf, shownOf, gapAtRow, gapNumbered, gapRowSet;
|
|
17944
|
+
})), FOLDS_FROM, sourceLength, markerText, lastNewLine, spansOf, linesFrom, push, markGap, openOf, countOf, openAbove, openBelow, elsewhereText, markElsewhere, keepQuiet, flushed, someRows, changedIn, firstChanged, makeRows, compose$1, cache, keyOf$1, saidOf, lineOf$1, inSpans, spansFor, claimOf, shownOf, gapAtRow, gapNumbered, gapRowSet;
|
|
17945
17945
|
var init_gaps = __esmMin((() => {
|
|
17946
17946
|
init_dist();
|
|
17947
17947
|
init_layers$1();
|
|
17948
|
+
FOLDS_FROM = 8;
|
|
17948
17949
|
sourceLength = (source) => source.at(-1)?.trim() === "" ? source.length - 1 : source.length;
|
|
17949
17950
|
markerText = (hidden) => {
|
|
17950
17951
|
const said = `⋯ ${hidden} ${hidden === 1 ? "line" : "lines"} hidden`;
|
|
@@ -18030,8 +18031,16 @@ var init_gaps = __esmMin((() => {
|
|
|
18030
18031
|
text: elsewhereText(lines, said)
|
|
18031
18032
|
});
|
|
18032
18033
|
};
|
|
18034
|
+
keepQuiet = (made, rows) => {
|
|
18035
|
+
for (const row of rows) {
|
|
18036
|
+
made.quiet.add(made.rows.length);
|
|
18037
|
+
push(made, row);
|
|
18038
|
+
}
|
|
18039
|
+
};
|
|
18033
18040
|
flushed = (made, run) => {
|
|
18034
|
-
if (run
|
|
18041
|
+
if (run === void 0) return void 0;
|
|
18042
|
+
if (run.rows.length < FOLDS_FROM) keepQuiet(made, run.rows);
|
|
18043
|
+
else markElsewhere(made, run.rows.length, run.said);
|
|
18035
18044
|
};
|
|
18036
18045
|
someRows = (made, hunk, claim) => {
|
|
18037
18046
|
let run;
|
|
@@ -18042,7 +18051,7 @@ var init_gaps = __esmMin((() => {
|
|
|
18042
18051
|
continue;
|
|
18043
18052
|
}
|
|
18044
18053
|
run = {
|
|
18045
|
-
|
|
18054
|
+
rows: [...run?.rows ?? [], row],
|
|
18046
18055
|
said: run?.said ?? claim.said(row)
|
|
18047
18056
|
};
|
|
18048
18057
|
}
|
|
@@ -18054,7 +18063,8 @@ var init_gaps = __esmMin((() => {
|
|
|
18054
18063
|
const made = {
|
|
18055
18064
|
rows: [],
|
|
18056
18065
|
hunks: [],
|
|
18057
|
-
gaps: []
|
|
18066
|
+
gaps: [],
|
|
18067
|
+
quiet: /* @__PURE__ */ new Set()
|
|
18058
18068
|
};
|
|
18059
18069
|
for (const [index, hunk] of build.base.hunks.entries()) {
|
|
18060
18070
|
const left = openAbove(made, build, index);
|
|
@@ -18085,7 +18095,8 @@ var init_gaps = __esmMin((() => {
|
|
|
18085
18095
|
rows: made.rows,
|
|
18086
18096
|
hunks: made.hunks
|
|
18087
18097
|
},
|
|
18088
|
-
gaps: made.gaps
|
|
18098
|
+
gaps: made.gaps,
|
|
18099
|
+
quiet: made.quiet
|
|
18089
18100
|
};
|
|
18090
18101
|
};
|
|
18091
18102
|
cache = /* @__PURE__ */ new WeakMap();
|
|
@@ -19742,7 +19753,7 @@ var init_reduce = __esmMin((() => {
|
|
|
19742
19753
|
if (drawn === void 0) return openingRow(state, patchIndex);
|
|
19743
19754
|
const hidden = gapRowSet(drawn);
|
|
19744
19755
|
const shows = (row) => !hidden.has(row.index) && carriesLine(row);
|
|
19745
|
-
const changed = onLayers(held) ? drawn.patch.rows.findIndex((row) => shows(row) && row.kind !== "context") : -1;
|
|
19756
|
+
const changed = onLayers(held) ? drawn.patch.rows.findIndex((row) => shows(row) && row.kind !== "context" && !drawn.quiet.has(row.index)) : -1;
|
|
19746
19757
|
if (changed !== -1) return changed;
|
|
19747
19758
|
const at = drawn.patch.rows.findIndex(shows);
|
|
19748
19759
|
return at === -1 ? openingRow(state, patchIndex) : at;
|
|
@@ -20768,9 +20779,10 @@ var init_diffview = __esmMin((() => {
|
|
|
20768
20779
|
}
|
|
20769
20780
|
show(patch, notes, gaps, under = {
|
|
20770
20781
|
prose: [],
|
|
20771
|
-
draft: void 0
|
|
20782
|
+
draft: void 0,
|
|
20783
|
+
quiet: /* @__PURE__ */ new Set()
|
|
20772
20784
|
}) {
|
|
20773
|
-
const { prose, draft } = under;
|
|
20785
|
+
const { prose, draft, quiet } = under;
|
|
20774
20786
|
const room = notes.length === 0 && prose.length === 0 ? NOTE_MIN : this.noteRoom();
|
|
20775
20787
|
const key = keyOf(room, notes, prose, draft);
|
|
20776
20788
|
if (patch === this.shown && key === this.noted) return;
|
|
@@ -20782,6 +20794,7 @@ var init_diffview = __esmMin((() => {
|
|
|
20782
20794
|
notes,
|
|
20783
20795
|
room,
|
|
20784
20796
|
gaps,
|
|
20797
|
+
quiet,
|
|
20785
20798
|
prose,
|
|
20786
20799
|
fresh: freshLines(patch),
|
|
20787
20800
|
draft
|
|
@@ -21049,7 +21062,7 @@ var init_diffview = __esmMin((() => {
|
|
|
21049
21062
|
...prose.map((entry) => `p${entry.line}${entry.after ? ">" : "<"}:${entry.markdown}`)
|
|
21050
21063
|
].join("\0");
|
|
21051
21064
|
groupOf = $match({
|
|
21052
|
-
Code: () => void 0,
|
|
21065
|
+
Code: (line) => line.quiet ? "gap" : void 0,
|
|
21053
21066
|
Gap: () => "gap",
|
|
21054
21067
|
Comment: (line) => line.sent ? "note.sent" : "note",
|
|
21055
21068
|
Label: () => "note.label",
|
|
@@ -21254,7 +21267,10 @@ var init_diffview = __esmMin((() => {
|
|
|
21254
21267
|
row: row.index,
|
|
21255
21268
|
stop: 0
|
|
21256
21269
|
};
|
|
21257
|
-
return plan.gaps.has(row.index) ? Gap(placed) : Code(
|
|
21270
|
+
return plan.gaps.has(row.index) ? Gap(placed) : Code({
|
|
21271
|
+
...placed,
|
|
21272
|
+
quiet: plan.quiet.has(row.index)
|
|
21273
|
+
});
|
|
21258
21274
|
};
|
|
21259
21275
|
DRAFT_STOP = -1;
|
|
21260
21276
|
draftText = (draft, at) => {
|
|
@@ -21310,9 +21326,10 @@ var init_diffview = __esmMin((() => {
|
|
|
21310
21326
|
if (isNote(entry)) return BARE_SIGN;
|
|
21311
21327
|
const row = rows.get(entry.row);
|
|
21312
21328
|
const sign = row === void 0 ? void 0 : SIGNS[row.kind];
|
|
21313
|
-
|
|
21329
|
+
if (sign === void 0) return BARE_SIGN;
|
|
21330
|
+
return {
|
|
21314
21331
|
after: sign.text,
|
|
21315
|
-
afterColor: sign.color
|
|
21332
|
+
afterColor: isCode(entry) && entry.quiet ? palette.faint : sign.color
|
|
21316
21333
|
};
|
|
21317
21334
|
};
|
|
21318
21335
|
lineSigns = (patch, display) => {
|
|
@@ -22050,6 +22067,7 @@ var init_paint = __esmMin((() => {
|
|
|
22050
22067
|
if (flags.cursor) return UNDER_CURSOR[kind] ?? PLAIN_CURSOR;
|
|
22051
22068
|
if (flags.selected) return PICKED[kind] ?? PLAIN_PICKED;
|
|
22052
22069
|
if (flags.gap) return GAP_PAINT;
|
|
22070
|
+
if (flags.quiet) return void 0;
|
|
22053
22071
|
return view.washOf(kind);
|
|
22054
22072
|
};
|
|
22055
22073
|
PLAIN_PICKED = {
|
|
@@ -23384,7 +23402,8 @@ var init_render = __esmMin((() => {
|
|
|
23384
23402
|
this.drafted = draft;
|
|
23385
23403
|
this.view.show(patch, notesFor(state, patch.path), gapRowSet(shown), {
|
|
23386
23404
|
prose: proseFor(state, patch.path),
|
|
23387
|
-
draft
|
|
23405
|
+
draft,
|
|
23406
|
+
quiet: shown.quiet
|
|
23388
23407
|
});
|
|
23389
23408
|
this.view.pick(state.picked);
|
|
23390
23409
|
if (!takesText(state.screen)) {
|
|
@@ -23621,13 +23640,15 @@ var init_render = __esmMin((() => {
|
|
|
23621
23640
|
const shown = shownOf(state);
|
|
23622
23641
|
const rows = shown?.patch.rows ?? [];
|
|
23623
23642
|
const gaps = shown === void 0 ? /* @__PURE__ */ new Set() : gapRowSet(shown);
|
|
23643
|
+
const quiet = shown?.quiet ?? /* @__PURE__ */ new Set();
|
|
23624
23644
|
return (row) => {
|
|
23625
23645
|
const kind = rows[row]?.kind;
|
|
23626
23646
|
if (kind === void 0) return void 0;
|
|
23627
23647
|
return pickPaint(this.view, kind, {
|
|
23628
23648
|
cursor: row === state.cursor,
|
|
23629
23649
|
selected: selecting && row >= from && row <= to,
|
|
23630
|
-
gap: gaps.has(row)
|
|
23650
|
+
gap: gaps.has(row),
|
|
23651
|
+
quiet: quiet.has(row)
|
|
23631
23652
|
});
|
|
23632
23653
|
};
|
|
23633
23654
|
}
|
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.202",
|
|
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": {
|