@eliya-oss/agent-diff 0.1.0-alpha.183 → 0.1.0-alpha.184
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 +20 -0
- package/dist/main.js +163 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.184
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- feat(CLI): `adiff patch show` answers a branch's diff as JSON, with line numbers on both sides, and with binary and generated files listed and flagged.
|
|
8
|
+
|
|
9
|
+
<details><summary>What it is for</summary>
|
|
10
|
+
|
|
11
|
+
Another program on your machine, such as a review page in the browser, draws the same rows the terminal draws instead of diffing the files itself. `--file` narrows it to one file, and `--context all` answers whole files.
|
|
12
|
+
|
|
13
|
+
</details>
|
|
14
|
+
|
|
15
|
+
feat(comment delivery): an open review shows a comment filed from another program without a reload, and `adiff comment list` reports the code each comment was written against.
|
|
16
|
+
|
|
17
|
+
<details><summary>What changed</summary>
|
|
18
|
+
|
|
19
|
+
The terminal used to notice only the agent's answers. A comment sent with `adiff comment send` from elsewhere now draws in the open review as soon as it is filed.
|
|
20
|
+
|
|
21
|
+
</details>
|
|
22
|
+
|
|
3
23
|
## 0.1.0-alpha.183
|
|
4
24
|
|
|
5
25
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -10042,7 +10042,7 @@ var init_config = __esmMin((() => {
|
|
|
10042
10042
|
//#region package.json
|
|
10043
10043
|
init_pane();
|
|
10044
10044
|
init_config();
|
|
10045
|
-
var version$1 = "0.1.0-alpha.
|
|
10045
|
+
var version$1 = "0.1.0-alpha.184";
|
|
10046
10046
|
//#endregion
|
|
10047
10047
|
//#region src/cli/error.ts
|
|
10048
10048
|
var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered;
|
|
@@ -10381,6 +10381,30 @@ var init_catalog = __esmMin((() => {
|
|
|
10381
10381
|
dataKey: "pane",
|
|
10382
10382
|
example: "adiff review pane --repo ."
|
|
10383
10383
|
},
|
|
10384
|
+
{
|
|
10385
|
+
name: "patch show",
|
|
10386
|
+
about: "A branch's diff as rows with line numbers on both sides, read from the same parse the terminal draws. Binary and generated files are listed and flagged",
|
|
10387
|
+
group: READ_A_BRANCH,
|
|
10388
|
+
addresses: "review",
|
|
10389
|
+
safety: "read",
|
|
10390
|
+
options: [
|
|
10391
|
+
...based,
|
|
10392
|
+
{
|
|
10393
|
+
name: "file",
|
|
10394
|
+
required: false,
|
|
10395
|
+
value: "path",
|
|
10396
|
+
about: "Answer for this one file only"
|
|
10397
|
+
},
|
|
10398
|
+
{
|
|
10399
|
+
name: "context",
|
|
10400
|
+
required: false,
|
|
10401
|
+
value: "lines|all",
|
|
10402
|
+
about: "Unchanged lines around each change. Defaults to 3; `all` answers whole files"
|
|
10403
|
+
}
|
|
10404
|
+
],
|
|
10405
|
+
dataKey: "patch",
|
|
10406
|
+
example: "adiff patch show --repo . --branch add-invitations --file src/api.ts --context all"
|
|
10407
|
+
},
|
|
10384
10408
|
{
|
|
10385
10409
|
name: "file review",
|
|
10386
10410
|
about: "Toggle a file as reviewed. Lapses on its own when the file changes",
|
|
@@ -10907,7 +10931,7 @@ var init_catalog = __esmMin((() => {
|
|
|
10907
10931
|
}));
|
|
10908
10932
|
//#endregion
|
|
10909
10933
|
//#region src/cli/parse.ts
|
|
10910
|
-
var FLAG, flagOn, tokenOn, optionsFrom, onlyKnown, oneOf, required, numeric, seconds;
|
|
10934
|
+
var FLAG, flagOn, tokenOn, optionsFrom, onlyKnown, oneOf, required, numeric, WHOLE, around$1, seconds;
|
|
10911
10935
|
var init_parse$1 = __esmMin((() => {
|
|
10912
10936
|
init_dist();
|
|
10913
10937
|
init_catalog();
|
|
@@ -10987,6 +11011,18 @@ var init_parse$1 = __esmMin((() => {
|
|
|
10987
11011
|
allowed: ["a whole number of 1 or more"]
|
|
10988
11012
|
});
|
|
10989
11013
|
});
|
|
11014
|
+
WHOLE = "all";
|
|
11015
|
+
around$1 = fn("Cli.around")(function* (options, name) {
|
|
11016
|
+
const raw = options[name];
|
|
11017
|
+
if (raw === void 0) return void 0;
|
|
11018
|
+
if (raw === WHOLE) return WHOLE;
|
|
11019
|
+
const parsed = Number(raw);
|
|
11020
|
+
return yield* Number.isInteger(parsed) && parsed >= 0 ? succeed$1(parsed) : new BadOption({
|
|
11021
|
+
option: name,
|
|
11022
|
+
given: raw,
|
|
11023
|
+
allowed: ["a whole number of 0 or more", WHOLE]
|
|
11024
|
+
});
|
|
11025
|
+
});
|
|
10990
11026
|
seconds = fn("Cli.seconds")(function* (options, name) {
|
|
10991
11027
|
const raw = options[name];
|
|
10992
11028
|
if (raw === void 0) return 0;
|
|
@@ -11473,10 +11509,12 @@ var init_parse = __esmMin((() => {
|
|
|
11473
11509
|
};
|
|
11474
11510
|
FROM_MARKERS = [{
|
|
11475
11511
|
marker: "rename from ",
|
|
11476
|
-
said: "renamed from"
|
|
11512
|
+
said: "renamed from",
|
|
11513
|
+
status: "renamed"
|
|
11477
11514
|
}, {
|
|
11478
11515
|
marker: "copy from ",
|
|
11479
|
-
said: "copied from"
|
|
11516
|
+
said: "copied from",
|
|
11517
|
+
status: "copied"
|
|
11480
11518
|
}];
|
|
11481
11519
|
draftFrom = (line) => {
|
|
11482
11520
|
const named = FILE_HEADER.exec(line);
|
|
@@ -11488,6 +11526,8 @@ var init_parse = __esmMin((() => {
|
|
|
11488
11526
|
notes: [],
|
|
11489
11527
|
oldMode: "",
|
|
11490
11528
|
made: "changed",
|
|
11529
|
+
status: "changed",
|
|
11530
|
+
binary: false,
|
|
11491
11531
|
hunks: [],
|
|
11492
11532
|
rows: [],
|
|
11493
11533
|
added: 0,
|
|
@@ -11574,15 +11614,18 @@ var init_parse = __esmMin((() => {
|
|
|
11574
11614
|
if (readMode(draft, line)) return true;
|
|
11575
11615
|
if (line.startsWith(FILE_ADDED_MARKER) || line.startsWith(FILE_GONE_MARKER)) {
|
|
11576
11616
|
draft.made = line.startsWith(FILE_ADDED_MARKER) ? "added" : "deleted";
|
|
11617
|
+
draft.status = draft.made;
|
|
11577
11618
|
return true;
|
|
11578
11619
|
}
|
|
11579
11620
|
const from = FROM_MARKERS.find((entry) => line.startsWith(entry.marker));
|
|
11580
11621
|
if (from === void 0) return false;
|
|
11581
11622
|
draft.notes.push(`${from.said} ${line.slice(from.marker.length)}`);
|
|
11623
|
+
draft.status = from.status;
|
|
11582
11624
|
return true;
|
|
11583
11625
|
};
|
|
11584
11626
|
readBinary = (draft, line) => {
|
|
11585
11627
|
if (!line.startsWith(BINARY_MARKER)) return false;
|
|
11628
|
+
draft.binary = true;
|
|
11586
11629
|
told(draft, draft.notes);
|
|
11587
11630
|
openPlain(draft);
|
|
11588
11631
|
appendRow(draft, "context", BINARY_SAID);
|
|
@@ -11710,7 +11753,7 @@ var init_run = __esmMin((() => {
|
|
|
11710
11753
|
gitOrEmpty = fn("Git.runOrEmpty")(function* (cwd, args) {
|
|
11711
11754
|
return yield* git(cwd, args).pipe(catchTag("GitCommandFailed", () => succeed$1("")));
|
|
11712
11755
|
});
|
|
11713
|
-
})), CACHE_SIZE, NAME_TTL, FRESH_TTL, SPLIT$1, DEFAULT_BRANCH_CANDIDATES, PLAIN_PATHS, STAT, Git, parseStat, readEntries, findDefaultBranch, partsOf$1, findMergeBase, toWorktree, branchTips, findParent, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, findRepo, LINKED_GIT_DIR, HEAD_REF, gitDirOf, findCommonDir, readHead, REFS_MOST, readCommits, readRefs, refResolves, sharedCommit, makeCaches, shapeWith, makeGit, GitLive;
|
|
11756
|
+
})), CACHE_SIZE, NAME_TTL, FRESH_TTL, SPLIT$1, DEFAULT_BRANCH_CANDIDATES, PLAIN_PATHS, STAT, Git, parseStat, readEntries, findDefaultBranch, partsOf$1, findMergeBase, toWorktree, branchTips, findParent, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, GENERATED_SAID, markedGenerated, readGenerated, findRepo, LINKED_GIT_DIR, HEAD_REF, gitDirOf, findCommonDir, readHead, REFS_MOST, readCommits, readRefs, refResolves, sharedCommit, makeCaches, shapeWith, makeGit, GitLive;
|
|
11714
11757
|
var init_service$2 = __esmMin((() => {
|
|
11715
11758
|
init_dist();
|
|
11716
11759
|
init_error$4();
|
|
@@ -11877,6 +11920,24 @@ var init_service$2 = __esmMin((() => {
|
|
|
11877
11920
|
term
|
|
11878
11921
|
]);
|
|
11879
11922
|
});
|
|
11923
|
+
GENERATED_SAID = ": linguist-generated: ";
|
|
11924
|
+
markedGenerated = (line) => {
|
|
11925
|
+
const at = line.lastIndexOf(GENERATED_SAID);
|
|
11926
|
+
if (at === -1) return [];
|
|
11927
|
+
const value = line.slice(at + 22).trim();
|
|
11928
|
+
return value === "unspecified" || value === "unset" || value === "false" ? [] : [line.slice(0, at)];
|
|
11929
|
+
};
|
|
11930
|
+
readGenerated = fn("Git.generated")(function* (worktree, paths) {
|
|
11931
|
+
if (paths.length === 0) return /* @__PURE__ */ new Set();
|
|
11932
|
+
const raw = yield* gitOrEmpty(worktree.path, [
|
|
11933
|
+
...PLAIN_PATHS,
|
|
11934
|
+
"check-attr",
|
|
11935
|
+
"linguist-generated",
|
|
11936
|
+
"--",
|
|
11937
|
+
...paths
|
|
11938
|
+
]);
|
|
11939
|
+
return new Set(raw.split("\n").flatMap(markedGenerated));
|
|
11940
|
+
});
|
|
11880
11941
|
findRepo = fn("Git.repoOf")(function* (worktree) {
|
|
11881
11942
|
const trimmed = (yield* gitOrEmpty(worktree, [
|
|
11882
11943
|
"rev-parse",
|
|
@@ -11976,6 +12037,7 @@ var init_service$2 = __esmMin((() => {
|
|
|
11976
12037
|
source: readSource,
|
|
11977
12038
|
blob: readBlob,
|
|
11978
12039
|
grep: readGrep,
|
|
12040
|
+
generated: readGenerated,
|
|
11979
12041
|
defaultBranch: (repo) => get(caches.baseName, repo),
|
|
11980
12042
|
stackParent: (repo, branch) => get(caches.baseName, repo).pipe(flatMap((fallback) => get(caches.parent, `${repo}${SPLIT$1}${branch}${SPLIT$1}${fallback}`))),
|
|
11981
12043
|
refs: readRefs,
|
|
@@ -12635,7 +12697,7 @@ var init_error$2 = __esmMin((() => {
|
|
|
12635
12697
|
PartlySent = class extends TaggedError("PartlySent") {};
|
|
12636
12698
|
PullMoved = class extends TaggedError("PullMoved") {};
|
|
12637
12699
|
NoLayers = class extends TaggedError("NoLayers") {};
|
|
12638
|
-
})), realOf, AUTO, askedFor$1, basedOn, named$3, find, worktreeAt, patches, reading, waitingOn, summaryOf, summary, list$5, markOpened, lastOpened, repoOf, nameAt, saveReport, refs, forOne, recentBases, setBase, clearBase;
|
|
12700
|
+
})), realOf, AUTO, askedFor$1, basedOn, named$3, find, basedAt, worktreeAt, patches, reading, waitingOn, summaryOf, summary, list$5, markOpened, lastOpened, repoOf, nameAt, saveReport, refs, forOne, recentBases, setBase, clearBase;
|
|
12639
12701
|
var init_branches$1 = __esmMin((() => {
|
|
12640
12702
|
init_dist();
|
|
12641
12703
|
init_patch();
|
|
@@ -12718,7 +12780,7 @@ var init_branches$1 = __esmMin((() => {
|
|
|
12718
12780
|
find = fn("Review.Branch.find")(function* (repo, branch, base) {
|
|
12719
12781
|
return (yield* basedOn(repo, yield* named$3(repo, branch), base)).worktree;
|
|
12720
12782
|
});
|
|
12721
|
-
|
|
12783
|
+
basedAt = fn("Review.Branch.basedAt")(function* (worktreePath, base) {
|
|
12722
12784
|
const git = yield* Git;
|
|
12723
12785
|
const asked = yield* git.realPathOf(worktreePath);
|
|
12724
12786
|
const worktrees = yield* git.worktrees(asked);
|
|
@@ -12728,7 +12790,10 @@ var init_branches$1 = __esmMin((() => {
|
|
|
12728
12790
|
known: worktrees.map((entry) => entry.path)
|
|
12729
12791
|
});
|
|
12730
12792
|
const repo = yield* git.repoOf(found.path);
|
|
12731
|
-
return
|
|
12793
|
+
return yield* basedOn(repo, found, base);
|
|
12794
|
+
});
|
|
12795
|
+
worktreeAt = fn("Review.Branch.worktreeAt")(function* (worktreePath, base) {
|
|
12796
|
+
return (yield* basedAt(worktreePath, base)).worktree;
|
|
12732
12797
|
});
|
|
12733
12798
|
patches = fn("Review.Branch.patches")(function* (worktree, context = 3, only) {
|
|
12734
12799
|
const raw = yield* (yield* Git).diff(worktree, context, only);
|
|
@@ -12856,7 +12921,7 @@ var init_branches$1 = __esmMin((() => {
|
|
|
12856
12921
|
}));
|
|
12857
12922
|
//#endregion
|
|
12858
12923
|
//#region src/review/patches.ts
|
|
12859
|
-
var findPatch, blobOf, anchor, list$4, source, before;
|
|
12924
|
+
var findPatch, blobOf, anchor, list$4, source, before, linesAround, GENERATED_NAME, lineOf$2, isNote$1, shownRow, shownHunk, shownFile, show$2;
|
|
12860
12925
|
var init_patches = __esmMin((() => {
|
|
12861
12926
|
init_dist();
|
|
12862
12927
|
init_patch();
|
|
@@ -12895,6 +12960,54 @@ var init_patches = __esmMin((() => {
|
|
|
12895
12960
|
const found = yield* (yield* Git).blob(worktree, file);
|
|
12896
12961
|
return getOrElse(found, () => []);
|
|
12897
12962
|
});
|
|
12963
|
+
linesAround = (context) => {
|
|
12964
|
+
if (context === "all") return WHOLE_FILE;
|
|
12965
|
+
return context ?? 3;
|
|
12966
|
+
};
|
|
12967
|
+
GENERATED_NAME = /\.generated\./;
|
|
12968
|
+
lineOf$2 = (side, line) => match$3(line, {
|
|
12969
|
+
onNone: () => ({}),
|
|
12970
|
+
onSome: (at) => ({ [side]: at })
|
|
12971
|
+
});
|
|
12972
|
+
isNote$1 = (hunk, row) => hunk.marker.length === 0 || isNone(row.oldLine) && isNone(row.newLine);
|
|
12973
|
+
shownRow = (hunk, row) => isNote$1(hunk, row) ? {
|
|
12974
|
+
kind: "note",
|
|
12975
|
+
text: row.text
|
|
12976
|
+
} : {
|
|
12977
|
+
kind: row.kind,
|
|
12978
|
+
...lineOf$2("old", row.oldLine),
|
|
12979
|
+
...lineOf$2("new", row.newLine),
|
|
12980
|
+
text: row.text
|
|
12981
|
+
};
|
|
12982
|
+
shownHunk = (hunk) => ({
|
|
12983
|
+
header: hunk.marker,
|
|
12984
|
+
scope: hunk.scope,
|
|
12985
|
+
skipped: hunk.skipped,
|
|
12986
|
+
rows: hunk.rows.map((row) => shownRow(hunk, row))
|
|
12987
|
+
});
|
|
12988
|
+
shownFile = (patch, generated) => ({
|
|
12989
|
+
path: patch.path,
|
|
12990
|
+
previousPath: patch.previousPath,
|
|
12991
|
+
status: patch.status,
|
|
12992
|
+
binary: patch.binary,
|
|
12993
|
+
generated: generated.has(patch.path) || GENERATED_NAME.test(patch.path),
|
|
12994
|
+
added: patch.added,
|
|
12995
|
+
removed: patch.removed,
|
|
12996
|
+
hunks: patch.hunks.map(shownHunk)
|
|
12997
|
+
});
|
|
12998
|
+
show$2 = fn("Review.Diff.show")(function* (based, showing) {
|
|
12999
|
+
const git = yield* Git;
|
|
13000
|
+
const { worktree } = based;
|
|
13001
|
+
const patches$3 = yield* patches(worktree, linesAround(showing.context), showing.file);
|
|
13002
|
+
const generated = yield* git.generated(worktree, patches$3.map((patch) => patch.path));
|
|
13003
|
+
return {
|
|
13004
|
+
branch: worktree.branch,
|
|
13005
|
+
base: based.base,
|
|
13006
|
+
mergeBase: worktree.base,
|
|
13007
|
+
head: worktree.head,
|
|
13008
|
+
files: patches$3.map((patch) => shownFile(patch, generated))
|
|
13009
|
+
};
|
|
13010
|
+
});
|
|
12898
13011
|
}));
|
|
12899
13012
|
//#endregion
|
|
12900
13013
|
//#region src/domain/layers/model.ts
|
|
@@ -13392,6 +13505,7 @@ var init_threads$1 = __esmMin((() => {
|
|
|
13392
13505
|
side: comment.anchor.side,
|
|
13393
13506
|
start: sits.start,
|
|
13394
13507
|
end: sits.end,
|
|
13508
|
+
snippet: comment.anchor.snippet,
|
|
13395
13509
|
body: comment.body,
|
|
13396
13510
|
state: stateOf$2(turns, mine.at(-1)?.asks === true, settled, Object.hasOwn(conversation.removed, comment.id)),
|
|
13397
13511
|
stale: batch.head !== conversation.head,
|
|
@@ -15117,29 +15231,33 @@ const helpUnder = (noun) => {
|
|
|
15117
15231
|
};
|
|
15118
15232
|
//#endregion
|
|
15119
15233
|
//#region src/tui/watch.ts
|
|
15120
|
-
var OUTBOX, SETTLE_MS, WatchUnavailable, answered, opened, holding$1, answers;
|
|
15234
|
+
var OUTBOX, FILED, SETTLE_MS, WatchUnavailable, answered, filed, opened, holding$1, changesTo, answers, filings;
|
|
15121
15235
|
var init_watch = __esmMin((() => {
|
|
15122
15236
|
init_dist();
|
|
15123
15237
|
OUTBOX = "outbox.jsonl";
|
|
15238
|
+
FILED = ["inbox.jsonl", "state.json"];
|
|
15124
15239
|
SETTLE_MS = 120;
|
|
15125
15240
|
WatchUnavailable = class extends TaggedError("WatchUnavailable") {};
|
|
15126
|
-
answered = (name) => name
|
|
15127
|
-
|
|
15241
|
+
answered = (name) => name.endsWith(OUTBOX);
|
|
15242
|
+
filed = (name) => FILED.some((file) => name.endsWith(file));
|
|
15243
|
+
opened = (branches, wanted, queue) => {
|
|
15128
15244
|
mkdirSync(branches, { recursive: true });
|
|
15129
15245
|
const watcher = watch(branches, { recursive: true }, (_event, name) => {
|
|
15130
|
-
if (
|
|
15246
|
+
if (name !== null && wanted(name)) offerUnsafe(queue, void 0);
|
|
15131
15247
|
});
|
|
15132
15248
|
watcher.on("error", () => void 0);
|
|
15133
15249
|
return watcher;
|
|
15134
15250
|
};
|
|
15135
|
-
holding$1 = (branches, queue) => acquireRelease(try_({
|
|
15136
|
-
try: () => opened(branches, queue),
|
|
15251
|
+
holding$1 = (branches, wanted, queue) => acquireRelease(try_({
|
|
15252
|
+
try: () => opened(branches, wanted, queue),
|
|
15137
15253
|
catch: (cause) => new WatchUnavailable({
|
|
15138
15254
|
root: branches,
|
|
15139
15255
|
reason: String(cause)
|
|
15140
15256
|
})
|
|
15141
15257
|
}), (watcher) => sync(() => watcher.close()));
|
|
15142
|
-
|
|
15258
|
+
changesTo = (root, wanted) => callback((queue) => holding$1(join(root, "branches"), wanted, queue).pipe(catchTag("WatchUnavailable", () => void_))).pipe(debounce(SETTLE_MS));
|
|
15259
|
+
answers = (root) => changesTo(root, answered);
|
|
15260
|
+
filings = (root) => changesTo(root, filed);
|
|
15143
15261
|
}));
|
|
15144
15262
|
//#endregion
|
|
15145
15263
|
//#region src/tui/command.ts
|
|
@@ -22423,7 +22541,7 @@ var init_remarks = __esmMin((() => {
|
|
|
22423
22541
|
}));
|
|
22424
22542
|
//#endregion
|
|
22425
22543
|
//#region src/tui/branches.ts
|
|
22426
|
-
var openedPull, openedOn, resumeAt, openBranch, readBranch, fillBranches, reloadList, reloadBranch, goBack, loadPulls, loadHeld, showPull, openBases, basedOnRef, clearBaseHere, afterBase, setBaseHere, noticeAnswers, noticeOnList;
|
|
22544
|
+
var openedPull, openedOn, resumeAt, openBranch, readBranch, fillBranches, reloadList, reloadBranch, goBack, loadPulls, loadHeld, showPull, openBases, basedOnRef, clearBaseHere, afterBase, setBaseHere, noticeAnswers, sameSent, noticeFiled, noticeOnList;
|
|
22427
22545
|
var init_branches = __esmMin((() => {
|
|
22428
22546
|
init_dist();
|
|
22429
22547
|
init_forge();
|
|
@@ -22645,6 +22763,19 @@ var init_branches = __esmMin((() => {
|
|
|
22645
22763
|
app.commit(withWaiting(withArrived(app.state, sent), `${said} answered · press r`));
|
|
22646
22764
|
});
|
|
22647
22765
|
};
|
|
22766
|
+
sameSent = (one, other) => JSON.stringify(one) === JSON.stringify(other);
|
|
22767
|
+
noticeFiled = (app) => {
|
|
22768
|
+
return gen(function* () {
|
|
22769
|
+
const branch = selectedBranch(app.state);
|
|
22770
|
+
if (branch === void 0) return;
|
|
22771
|
+
const sent = yield* loadSent(app, branch.branch);
|
|
22772
|
+
if (sameSent(app.state.sent, sent)) return;
|
|
22773
|
+
app.commit({
|
|
22774
|
+
...app.state,
|
|
22775
|
+
sent
|
|
22776
|
+
});
|
|
22777
|
+
});
|
|
22778
|
+
};
|
|
22648
22779
|
noticeOnList = (app) => {
|
|
22649
22780
|
return sync(() => app.commit(withWaiting(app.state, "the agent answered · press r")));
|
|
22650
22781
|
};
|
|
@@ -23987,7 +24118,7 @@ var init_vouching = __esmMin((() => {
|
|
|
23987
24118
|
}));
|
|
23988
24119
|
//#endregion
|
|
23989
24120
|
//#region src/tui/app.ts
|
|
23990
|
-
var LEAVING_MS, LOOK_MS, AGE_TICK_MS, NOTICE_MS, WORTH_TIMING_MS, TIMES_KEPT, SLOWEST_KEPT, KEY_HISTORY, TRAIL_HISTORY, DRAIN_PASSES, LEAVING_SAID, leavingSaid, clockOf, momentOf, noticeOf, turnedOver, unmoved, chosenIn, EFFECTS, App, settingsHeld, firstBranches, missing, openingOn, sessionToResume, asidesMade, treeSitterFreed, shownOn, painting, ticking, noticing, launch, untilDestroyed, runOn, rendererMade, runTui;
|
|
24121
|
+
var LEAVING_MS, LOOK_MS, AGE_TICK_MS, NOTICE_MS, WORTH_TIMING_MS, TIMES_KEPT, SLOWEST_KEPT, KEY_HISTORY, TRAIL_HISTORY, DRAIN_PASSES, LEAVING_SAID, leavingSaid, clockOf, momentOf, noticeOf, turnedOver, unmoved, chosenIn, EFFECTS, App, settingsHeld, firstBranches, missing, openingOn, sessionToResume, asidesMade, treeSitterFreed, shownOn, painting, ticking, noticing, noticingFiled, launch, untilDestroyed, runOn, rendererMade, runTui;
|
|
23991
24122
|
var init_app = __esmMin((() => {
|
|
23992
24123
|
init_dist();
|
|
23993
24124
|
init_preferences$1();
|
|
@@ -24199,6 +24330,9 @@ var init_app = __esmMin((() => {
|
|
|
24199
24330
|
answered() {
|
|
24200
24331
|
this.dispatch(noticeAnswers(this));
|
|
24201
24332
|
}
|
|
24333
|
+
filed() {
|
|
24334
|
+
this.dispatch(noticeFiled(this));
|
|
24335
|
+
}
|
|
24202
24336
|
ticked() {
|
|
24203
24337
|
this.commit({
|
|
24204
24338
|
...this.state,
|
|
@@ -24605,6 +24739,7 @@ var init_app = __esmMin((() => {
|
|
|
24605
24739
|
painting = (screen, state) => runForEach(changes(state), shownOn(screen));
|
|
24606
24740
|
ticking = (app) => repeat(sync(() => app.ticked()), spaced(AGE_TICK_MS));
|
|
24607
24741
|
noticing = (app, root) => runForEach(answers(root), () => sync(() => app.answered()));
|
|
24742
|
+
noticingFiled = (app, root) => runForEach(filings(root), () => sync(() => app.filed()));
|
|
24608
24743
|
launch = fn("Tui.launch")(function* (asked, renderer, options = {}) {
|
|
24609
24744
|
const repo = yield* (yield* Git).realPathOf(asked);
|
|
24610
24745
|
const branches = yield* firstBranches(repo, options.branch, options.base);
|
|
@@ -24641,6 +24776,7 @@ var init_app = __esmMin((() => {
|
|
|
24641
24776
|
yield* forkScoped(app.consume());
|
|
24642
24777
|
yield* forkScoped(ticking(app));
|
|
24643
24778
|
yield* forkScoped(noticing(app, store.root));
|
|
24779
|
+
yield* forkScoped(noticingFiled(app, store.root));
|
|
24644
24780
|
yield* treeSitterFreed;
|
|
24645
24781
|
app.open(opensOn, session, options.branch !== void 0 && branches.length === 1);
|
|
24646
24782
|
return app;
|
|
@@ -24885,6 +25021,14 @@ const layersShow = fn("Main.layersShow")(function* (options) {
|
|
|
24885
25021
|
const layers = yield* show(yield* worktreeNamed(options));
|
|
24886
25022
|
yield* answer(options, { layers });
|
|
24887
25023
|
});
|
|
25024
|
+
const patchShow = fn("Main.patchShow")(function* (options) {
|
|
25025
|
+
const based = yield* basedAt(yield* required(options, "worktree"), options["base"]);
|
|
25026
|
+
const patch = yield* show$2(based, {
|
|
25027
|
+
file: options["file"],
|
|
25028
|
+
context: yield* around$1(options, "context")
|
|
25029
|
+
});
|
|
25030
|
+
yield* answer(options, { patch });
|
|
25031
|
+
});
|
|
24888
25032
|
const configList = fn("Main.configList")(function* (options) {
|
|
24889
25033
|
yield* answer(options, { preferences: yield* list$1() });
|
|
24890
25034
|
});
|
|
@@ -24944,6 +25088,7 @@ const routes = {
|
|
|
24944
25088
|
"review progress": reviewStatus,
|
|
24945
25089
|
"layers set": layersSet,
|
|
24946
25090
|
"layers show": layersShow,
|
|
25091
|
+
"patch show": patchShow,
|
|
24947
25092
|
upgrade: fn("Main.upgrade")(function* (options) {
|
|
24948
25093
|
const check = options["check"] !== void 0;
|
|
24949
25094
|
const quiet = options["json"] !== void 0;
|
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.184",
|
|
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": {
|