@eliya-oss/agent-diff 0.1.0-alpha.24 → 0.1.0-alpha.25
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 +8 -0
- package/dist/main.js +21 -11
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.25
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- The terminal names the key that sends a review, and counts what is waiting.
|
|
8
|
+
|
|
9
|
+
- The repository's own working tree is reviewable and marked here.
|
|
10
|
+
|
|
3
11
|
## 0.1.0-alpha.24
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -11815,14 +11815,15 @@ const mergeBaseOf = fn("Git.mergeBase")(function* (entry, base) {
|
|
|
11815
11815
|
mergeBases.set(key, found);
|
|
11816
11816
|
return found;
|
|
11817
11817
|
});
|
|
11818
|
-
const toWorktree = fn("Git.toWorktree")(function* (entry, base) {
|
|
11818
|
+
const toWorktree = fn("Git.toWorktree")(function* (entry, base, own) {
|
|
11819
11819
|
const mergeBase = yield* mergeBaseOf(entry, base);
|
|
11820
11820
|
return {
|
|
11821
11821
|
path: entry.path,
|
|
11822
11822
|
branch: entry.detached ? `(detached ${entry.head.slice(0, 8)})` : entry.branch,
|
|
11823
11823
|
head: entry.head.slice(0, 8),
|
|
11824
11824
|
base: mergeBase.slice(0, 8),
|
|
11825
|
-
detached: entry.detached
|
|
11825
|
+
detached: entry.detached,
|
|
11826
|
+
own
|
|
11826
11827
|
};
|
|
11827
11828
|
});
|
|
11828
11829
|
const splitLines = (text) => text.split("\n");
|
|
@@ -11846,7 +11847,7 @@ const shape = {
|
|
|
11846
11847
|
const base = yield* defaultBranch(repo);
|
|
11847
11848
|
const entries = readEntries(porcelain);
|
|
11848
11849
|
const found = [];
|
|
11849
|
-
for (const entry of entries) found.push(yield* toWorktree(entry, base));
|
|
11850
|
+
for (const [index, entry] of entries.entries()) found.push(yield* toWorktree(entry, base, index === 0));
|
|
11850
11851
|
return found;
|
|
11851
11852
|
}),
|
|
11852
11853
|
diff: fn("Git.diff")(function* (worktree, context) {
|
|
@@ -12211,7 +12212,8 @@ const listBranches = fn("Cli.listBranches")(function* (repo) {
|
|
|
12211
12212
|
staged: waiting.staged,
|
|
12212
12213
|
unread: waiting.unread,
|
|
12213
12214
|
layers: waiting.layers,
|
|
12214
|
-
stale: waiting.stale
|
|
12215
|
+
stale: waiting.stale,
|
|
12216
|
+
own: worktree.own
|
|
12215
12217
|
});
|
|
12216
12218
|
}
|
|
12217
12219
|
return summaries.filter((summary) => summary.files > 0);
|
|
@@ -14093,6 +14095,7 @@ const command = (input) => ({
|
|
|
14093
14095
|
hint: "",
|
|
14094
14096
|
listed: true,
|
|
14095
14097
|
whenStaged: false,
|
|
14098
|
+
counted: false,
|
|
14096
14099
|
whenLayers: false,
|
|
14097
14100
|
...input
|
|
14098
14101
|
});
|
|
@@ -14410,11 +14413,12 @@ const commands = [
|
|
|
14410
14413
|
}),
|
|
14411
14414
|
command({
|
|
14412
14415
|
action: "pending.open",
|
|
14413
|
-
title: "
|
|
14416
|
+
title: "Send what is staged",
|
|
14414
14417
|
keys: ["S"],
|
|
14415
14418
|
screens: ["review"],
|
|
14416
|
-
hint: "
|
|
14417
|
-
whenStaged: true
|
|
14419
|
+
hint: "send",
|
|
14420
|
+
whenStaged: true,
|
|
14421
|
+
counted: true
|
|
14418
14422
|
}),
|
|
14419
14423
|
command({
|
|
14420
14424
|
action: "pending.submit",
|
|
@@ -14532,7 +14536,7 @@ const displayKey = (key) => {
|
|
|
14532
14536
|
};
|
|
14533
14537
|
const hintsFor = (screen, staged, layers = 0) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenStaged || staged > 0).filter((entry) => !entry.whenLayers || layers > 0).map((entry) => ({
|
|
14534
14538
|
key: displayKey(entry.keys[0] ?? ""),
|
|
14535
|
-
hint: entry.hint,
|
|
14539
|
+
hint: entry.counted ? `${entry.hint} ${staged}` : entry.hint,
|
|
14536
14540
|
press: entry.keys[0] ?? ""
|
|
14537
14541
|
}));
|
|
14538
14542
|
//#endregion
|
|
@@ -15683,6 +15687,7 @@ const BRANCH_WIDTH = 82;
|
|
|
15683
15687
|
const BRANCH_NAME = 44;
|
|
15684
15688
|
const BRANCH_NAME_MIN = 12;
|
|
15685
15689
|
const BRANCH_TAIL = 45;
|
|
15690
|
+
const EMPTY_LIST = " nothing to review. No worktree differs from the branch it started from.";
|
|
15686
15691
|
const MODAL_MARGIN = 4;
|
|
15687
15692
|
const bodyRoom = (width) => Math.max(0, width - 2 - BODY_BORDER);
|
|
15688
15693
|
const treeWidth = (width) => {
|
|
@@ -16031,7 +16036,11 @@ const layersCell = (branch) => {
|
|
|
16031
16036
|
if (branch.layers === 0) return "";
|
|
16032
16037
|
return branch.stale ? `${branch.layers} stale` : `${branch.layers} layers`;
|
|
16033
16038
|
};
|
|
16034
|
-
const stateCell = (state, branch) => [
|
|
16039
|
+
const stateCell = (state, branch) => [
|
|
16040
|
+
branch.own ? "here" : "",
|
|
16041
|
+
state.pulls[branch.branch] ?? "",
|
|
16042
|
+
waitingLabel(branch).trim()
|
|
16043
|
+
].filter((part) => part.length > 0).join(" ");
|
|
16035
16044
|
const branchCells = (branch, here, room) => ({
|
|
16036
16045
|
lead: `${here ? marks().cursor : " "} `,
|
|
16037
16046
|
name: clip(branch.branch, room).padEnd(room),
|
|
@@ -16327,7 +16336,7 @@ var Screen = class {
|
|
|
16327
16336
|
}
|
|
16328
16337
|
const count = state.pending.length;
|
|
16329
16338
|
const room = modalWidth(this.renderer.width, PALETTE_WIDTH);
|
|
16330
|
-
this.pendingTitle.content = `
|
|
16339
|
+
this.pendingTitle.content = `Send ${count} comment${count === 1 ? "" : "s"} as one review, waking the agent once`;
|
|
16331
16340
|
this.pendingChoices.options = state.pending.map((entry) => ({
|
|
16332
16341
|
name: clip(`${entry.file}:${entry.start}-${entry.end} ${entry.body.split("\n")[0] ?? ""}`, Math.max(1, room - MODAL_ROOM)),
|
|
16333
16342
|
description: "",
|
|
@@ -16385,6 +16394,7 @@ var Screen = class {
|
|
|
16385
16394
|
}
|
|
16386
16395
|
branchTable(state) {
|
|
16387
16396
|
const room = nameRoom(homeWidth(this.renderer.width));
|
|
16397
|
+
if (state.branches.length === 0) return new StyledText([fg(palette.muted)(EMPTY_LIST)]);
|
|
16388
16398
|
const heading = [fg(palette.faint)(`${branchHeading(room)}\n\n`)];
|
|
16389
16399
|
const rows = state.branches.flatMap((branch, index) => {
|
|
16390
16400
|
const here = index === state.branchIndex;
|
|
@@ -16995,7 +17005,7 @@ var App = class {
|
|
|
16995
17005
|
const branch = selectedBranch(this.state);
|
|
16996
17006
|
const pending = branch === void 0 ? [] : await this.run(listPending(this.repo, branch.branch));
|
|
16997
17007
|
const next = withPending(this.state, pending, "review");
|
|
16998
|
-
this.commit(withNotice(next, `${pending.length} staged`));
|
|
17008
|
+
this.commit(withNotice(next, `${pending.length} staged, press S to send`));
|
|
16999
17009
|
}
|
|
17000
17010
|
async restage(id) {
|
|
17001
17011
|
const branch = selectedBranch(this.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.25",
|
|
27
27
|
"description": "Review agent work across git worktrees like a PR, and hand the comments back to the agent.",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"repository": {
|