@eliya-oss/agent-diff 0.1.0-alpha.110 → 0.1.0-alpha.111
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 +6 -0
- package/dist/main.js +95 -163
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
package/dist/main.js
CHANGED
|
@@ -4690,16 +4690,11 @@ var init_Effect = __esmMin((() => {
|
|
|
4690
4690
|
function resolve$2(ast) {
|
|
4691
4691
|
return ast.checks ? ast.checks[ast.checks.length - 1].annotations : ast.annotations;
|
|
4692
4692
|
}
|
|
4693
|
-
|
|
4694
|
-
function resolveAt(key) {
|
|
4695
|
-
return (ast) => resolve$2(ast)?.[key];
|
|
4696
|
-
}
|
|
4697
|
-
var SENTINELS_ANNOTATION_KEY, CONSTRUCTOR_ANNOTATION_KEY, resolveBrands, getExpected;
|
|
4693
|
+
var SENTINELS_ANNOTATION_KEY, CONSTRUCTOR_ANNOTATION_KEY, getExpected;
|
|
4698
4694
|
var init_annotations = __esmMin((() => {
|
|
4699
4695
|
init_Function();
|
|
4700
4696
|
SENTINELS_ANNOTATION_KEY = "~sentinels";
|
|
4701
4697
|
CONSTRUCTOR_ANNOTATION_KEY = "~constructor";
|
|
4702
|
-
resolveBrands = /*#__PURE__*/ resolveAt("brands");
|
|
4703
4698
|
getExpected = /*#__PURE__*/ memoize((ast) => {
|
|
4704
4699
|
const identifier = resolve$2(ast)?.identifier;
|
|
4705
4700
|
if (typeof identifier === "string") return identifier;
|
|
@@ -5772,11 +5767,6 @@ function appendTransformation(from, transformation, to) {
|
|
|
5772
5767
|
const link = new Link(from, transformation);
|
|
5773
5768
|
return replaceEncoding(to, to.encoding ? [...to.encoding, link] : [link]);
|
|
5774
5769
|
}
|
|
5775
|
-
/** @internal */
|
|
5776
|
-
function brand$1(ast, brand) {
|
|
5777
|
-
const existing = resolveBrands(ast);
|
|
5778
|
-
return annotate(ast, { brands: existing ? [...existing, brand] : [brand] });
|
|
5779
|
-
}
|
|
5780
5770
|
function mapOrSame(as, f) {
|
|
5781
5771
|
let changed = false;
|
|
5782
5772
|
const out = new Array(as.length);
|
|
@@ -8056,31 +8046,6 @@ function Literals(literals) {
|
|
|
8056
8046
|
}
|
|
8057
8047
|
});
|
|
8058
8048
|
}
|
|
8059
|
-
/**
|
|
8060
|
-
* Adds a nominal brand to a schema, intersecting the output type with
|
|
8061
|
-
* `Brand.Brand<B>` to prevent accidental mixing of structurally identical types.
|
|
8062
|
-
*
|
|
8063
|
-
* **When to use**
|
|
8064
|
-
*
|
|
8065
|
-
* Use to make values decoded by an existing schema nominally distinct when the
|
|
8066
|
-
* schema already carries the runtime validation you need.
|
|
8067
|
-
*
|
|
8068
|
-
* **Gotchas**
|
|
8069
|
-
*
|
|
8070
|
-
* `brand` adds brand metadata and narrows the TypeScript output type, but it
|
|
8071
|
-
* does not add runtime checks.
|
|
8072
|
-
*
|
|
8073
|
-
* @see {@link fromBrand} for applying a Brand constructor's checks along with the brand tag
|
|
8074
|
-
*
|
|
8075
|
-
* @category branding
|
|
8076
|
-
* @since 3.10.0
|
|
8077
|
-
*/
|
|
8078
|
-
function brand(identifier) {
|
|
8079
|
-
return (schema) => make$1(brand$1(schema.ast, identifier), {
|
|
8080
|
-
schema,
|
|
8081
|
-
identifier
|
|
8082
|
-
});
|
|
8083
|
-
}
|
|
8084
8049
|
function decodeTo(to, transformation) {
|
|
8085
8050
|
return (from) => {
|
|
8086
8051
|
return make$1(decodeTo$1(from.ast, to.ast, transformation ? make$8(transformation) : passthrough()), {
|
|
@@ -8580,7 +8545,7 @@ var init_error$2 = __esmMin((() => {
|
|
|
8580
8545
|
//#endregion
|
|
8581
8546
|
//#region src/service/store/model.ts
|
|
8582
8547
|
var emptyBranchState;
|
|
8583
|
-
var init_model$
|
|
8548
|
+
var init_model$4 = __esmMin((() => {
|
|
8584
8549
|
emptyBranchState = {
|
|
8585
8550
|
vouches: {},
|
|
8586
8551
|
consumed: 0,
|
|
@@ -8698,11 +8663,14 @@ var init_paths = __esmMin((() => {
|
|
|
8698
8663
|
upgradePath = (root) => join(root, "upgrade.json");
|
|
8699
8664
|
reportsDir = (root) => join(root, "reports");
|
|
8700
8665
|
reportPath = (root, stamp) => join(reportsDir(root), `${stamp}.md`);
|
|
8701
|
-
}))
|
|
8666
|
+
}));
|
|
8667
|
+
//#endregion
|
|
8668
|
+
//#region src/service/store/service.ts
|
|
8669
|
+
var Store, ensureDir, readOptional, missing$1, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, asDrafts, 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, draftsOps, layersOps, inboxOps, LOCK_TRIES, LOCK_WAIT_MS, LOCK_STALE_MS, held$1, stale$1, stolen, taken, freed, stateOps, makeStore, storeAt;
|
|
8702
8670
|
var init_service$1 = __esmMin((() => {
|
|
8703
8671
|
init_dist();
|
|
8704
8672
|
init_error$2();
|
|
8705
|
-
init_model$
|
|
8673
|
+
init_model$4();
|
|
8706
8674
|
init_schema();
|
|
8707
8675
|
init_paths();
|
|
8708
8676
|
Store = class extends Service()("adiff/Store") {};
|
|
@@ -8855,7 +8823,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
8855
8823
|
return named?.[1] === void 0 ? raw.trim() : named[1];
|
|
8856
8824
|
}).catch(() => "");
|
|
8857
8825
|
repoOf$2 = (worktreePath) => gitDirOf(worktreePath).then((dir) => readFile(join(dir, "commondir"), "utf8").then((raw) => resolve(dir, raw.trim())).catch(() => dir));
|
|
8858
|
-
keyOf$2 = (worktreePath) => promise(() =>
|
|
8826
|
+
keyOf$2 = (worktreePath) => map(all([promise(() => repoOf$2(worktreePath)), promise(() => headOf$1(worktreePath))], { concurrency: 2 }), ([repo, head]) => `${repo}#${head}`);
|
|
8859
8827
|
wasKeyOf = (worktreePath) => promise(() => headOf$1(worktreePath).then((head) => `${worktreePath}#${head}`));
|
|
8860
8828
|
there = (path) => stat(path).then(() => true, () => false);
|
|
8861
8829
|
adopted = /* @__PURE__ */ new Set();
|
|
@@ -9054,7 +9022,6 @@ var init_service$1 = __esmMin((() => {
|
|
|
9054
9022
|
};
|
|
9055
9023
|
};
|
|
9056
9024
|
storeAt = (root) => succeed$2(Store)(makeStore(root));
|
|
9057
|
-
storeAt(defaultRoot());
|
|
9058
9025
|
}));
|
|
9059
9026
|
//#endregion
|
|
9060
9027
|
//#region src/service/store/index.ts
|
|
@@ -9062,20 +9029,21 @@ var init_store = __esmMin((() => {
|
|
|
9062
9029
|
init_service$1();
|
|
9063
9030
|
init_error$2();
|
|
9064
9031
|
init_paths();
|
|
9065
|
-
init_model$
|
|
9066
|
-
}))
|
|
9067
|
-
|
|
9068
|
-
|
|
9069
|
-
|
|
9070
|
-
|
|
9032
|
+
init_model$4();
|
|
9033
|
+
}));
|
|
9034
|
+
//#endregion
|
|
9035
|
+
//#region src/domain/patch/model.ts
|
|
9036
|
+
var WHOLE_FILE, lineOn;
|
|
9037
|
+
var init_model$3 = __esmMin((() => {
|
|
9038
|
+
WHOLE_FILE = 1e5;
|
|
9071
9039
|
lineOn = (row, side) => side === "new" ? row.newLine : row.oldLine;
|
|
9072
9040
|
}));
|
|
9073
9041
|
//#endregion
|
|
9074
9042
|
//#region src/domain/patch/anchor.ts
|
|
9075
|
-
var sideOf, linesOn, anchorFor;
|
|
9043
|
+
var sideOf, linesOn, anchorFor, rowsForRange;
|
|
9076
9044
|
var init_anchor = __esmMin((() => {
|
|
9077
9045
|
init_dist();
|
|
9078
|
-
init_model$
|
|
9046
|
+
init_model$3();
|
|
9079
9047
|
sideOf = (rows) => rows.some((row) => isSome(row.newLine)) ? "new" : "old";
|
|
9080
9048
|
linesOn = (rows, side) => rows.flatMap((row) => match$3(lineOn(row, side), {
|
|
9081
9049
|
onNone: () => [],
|
|
@@ -9098,6 +9066,16 @@ var init_anchor = __esmMin((() => {
|
|
|
9098
9066
|
snippet: onSide.map((row) => row.text).join("\n")
|
|
9099
9067
|
});
|
|
9100
9068
|
};
|
|
9069
|
+
rowsForRange = (patch, range) => {
|
|
9070
|
+
const covered = patch.rows.filter((row) => match$3(lineOn(row, range.side), {
|
|
9071
|
+
onNone: () => false,
|
|
9072
|
+
onSome: (line) => line >= range.start && line <= range.end
|
|
9073
|
+
}));
|
|
9074
|
+
const first = covered[0];
|
|
9075
|
+
const last = covered.at(-1);
|
|
9076
|
+
if (first === void 0 || last === void 0) return none();
|
|
9077
|
+
return some([first.index, last.index]);
|
|
9078
|
+
};
|
|
9101
9079
|
}));
|
|
9102
9080
|
//#endregion
|
|
9103
9081
|
//#region src/domain/patch/parse.ts
|
|
@@ -9193,11 +9171,6 @@ var init_parse$1 = __esmMin((() => {
|
|
|
9193
9171
|
};
|
|
9194
9172
|
}));
|
|
9195
9173
|
//#endregion
|
|
9196
|
-
//#region src/domain/patch/render.ts
|
|
9197
|
-
var init_render$1 = __esmMin((() => {
|
|
9198
|
-
init_model$4();
|
|
9199
|
-
}));
|
|
9200
|
-
//#endregion
|
|
9201
9174
|
//#region src/domain/patch/sticky.ts
|
|
9202
9175
|
var CLOSER, COMMENT, LOOKAHEAD, indentOf, pinnable, limitFrom, stickyChain;
|
|
9203
9176
|
var init_sticky = __esmMin((() => {
|
|
@@ -9238,9 +9211,8 @@ var init_sticky = __esmMin((() => {
|
|
|
9238
9211
|
var init_patch = __esmMin((() => {
|
|
9239
9212
|
init_anchor();
|
|
9240
9213
|
init_parse$1();
|
|
9241
|
-
init_render$1();
|
|
9242
9214
|
init_sticky();
|
|
9243
|
-
init_model$
|
|
9215
|
+
init_model$3();
|
|
9244
9216
|
})), GitCommandFailed, FileUnreadable;
|
|
9245
9217
|
var init_error$1 = __esmMin((() => {
|
|
9246
9218
|
init_dist();
|
|
@@ -9273,16 +9245,12 @@ var init_run = __esmMin((() => {
|
|
|
9273
9245
|
gitOrEmpty = fn("Git.runOrEmpty")(function* (cwd, args) {
|
|
9274
9246
|
return yield* git(cwd, args).pipe(catchTag("GitCommandFailed", () => succeed$1("")));
|
|
9275
9247
|
});
|
|
9276
|
-
}));
|
|
9277
|
-
//#endregion
|
|
9278
|
-
//#region src/service/git/service.ts
|
|
9279
|
-
var GREP_CONTEXT, AT_ONCE$1, DEFAULT_BRANCH_CANDIDATES, STAT, Git, parseStat, readEntries, baseNames, mergeBases, findDefaultBranch, defaultBranch, mergeBaseOf, toWorktree, branchTips, parents, parentOf, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, shape, GitLive;
|
|
9248
|
+
})), GREP_CONTEXT, DEFAULT_BRANCH_CANDIDATES, STAT, Git, parseStat, readEntries, baseNames, mergeBases, findDefaultBranch, defaultBranch, mergeBaseOf, toWorktree, branchTips, parents, parentOf, splitLines, absent, readText, settled, seenAs, listWorktrees, readDiff, readStat, readSource, readBlob, readGrep, shape, GitLive;
|
|
9280
9249
|
var init_service = __esmMin((() => {
|
|
9281
9250
|
init_dist();
|
|
9282
9251
|
init_error$1();
|
|
9283
9252
|
init_run();
|
|
9284
9253
|
GREP_CONTEXT = 2;
|
|
9285
|
-
AT_ONCE$1 = 8;
|
|
9286
9254
|
DEFAULT_BRANCH_CANDIDATES = [
|
|
9287
9255
|
"origin/master",
|
|
9288
9256
|
"origin/main",
|
|
@@ -9414,7 +9382,7 @@ var init_service = __esmMin((() => {
|
|
|
9414
9382
|
const entries = readEntries(porcelain);
|
|
9415
9383
|
const opened = yield* settled(repo);
|
|
9416
9384
|
const read = (entry) => seenAs(entry, base, opened);
|
|
9417
|
-
return yield* forEach(entries, read, { concurrency:
|
|
9385
|
+
return yield* forEach(entries, read, { concurrency: 8 });
|
|
9418
9386
|
});
|
|
9419
9387
|
readDiff = fn("Git.diff")(function* (worktree, context, only) {
|
|
9420
9388
|
const target = worktree.base.length > 0 ? worktree.base : "HEAD";
|
|
@@ -9514,16 +9482,10 @@ var init_vouch = __esmMin((() => {
|
|
|
9514
9482
|
};
|
|
9515
9483
|
};
|
|
9516
9484
|
}));
|
|
9517
|
-
var init_model$3 = __esmMin((() => {
|
|
9518
|
-
init_dist();
|
|
9519
|
-
String$1.pipe(brand("@adiff/CommentId"));
|
|
9520
|
-
}));
|
|
9521
9485
|
//#endregion
|
|
9522
9486
|
//#region src/domain/review/index.ts
|
|
9523
9487
|
var init_review = __esmMin((() => {
|
|
9524
|
-
init_dist();
|
|
9525
9488
|
init_vouch();
|
|
9526
|
-
init_model$3();
|
|
9527
9489
|
}));
|
|
9528
9490
|
//#endregion
|
|
9529
9491
|
//#region src/domain/preferences/model.ts
|
|
@@ -9600,7 +9562,10 @@ var init_error = __esmMin((() => {
|
|
|
9600
9562
|
PullMoved = class extends TaggedError("PullMoved") {};
|
|
9601
9563
|
NoLayers = class extends TaggedError("NoLayers") {};
|
|
9602
9564
|
InitUnwritable = class extends TaggedError("InitUnwritable") {};
|
|
9603
|
-
}))
|
|
9565
|
+
}));
|
|
9566
|
+
//#endregion
|
|
9567
|
+
//#region src/cli/commands.ts
|
|
9568
|
+
var CONTEXT, POLL, AUTO, askedFor$1, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, waitingOn, summaryOf, summaryFor, listBranches, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, sentIn, listSent, anchorIn, commentIn, submitComment, without$1, submitReply, listPatches, patchIn, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, readPreferences, readPreference, ON, OFF, preferenceValue, savePreference, setBase, clearBase, markRead;
|
|
9604
9569
|
var init_commands = __esmMin((() => {
|
|
9605
9570
|
init_dist();
|
|
9606
9571
|
init_patch();
|
|
@@ -9610,7 +9575,6 @@ var init_commands = __esmMin((() => {
|
|
|
9610
9575
|
init_preferences();
|
|
9611
9576
|
init_error();
|
|
9612
9577
|
CONTEXT = 3;
|
|
9613
|
-
WHOLE_FILE$1 = 1e5;
|
|
9614
9578
|
POLL = "500 millis";
|
|
9615
9579
|
AUTO = "auto";
|
|
9616
9580
|
askedFor$1 = (asked, held) => {
|
|
@@ -9689,10 +9653,6 @@ var init_commands = __esmMin((() => {
|
|
|
9689
9653
|
return parsePatches(raw);
|
|
9690
9654
|
});
|
|
9691
9655
|
findPatch = (patches, file) => fromNullishOr(patches.find((patch) => patch.path === file));
|
|
9692
|
-
rowsCovering = (patch, side, start, end) => patch.rows.filter((row) => match$3(lineOn(row, side), {
|
|
9693
|
-
onNone: () => false,
|
|
9694
|
-
onSome: (line) => line >= start && line <= end
|
|
9695
|
-
})).map((row) => row.index);
|
|
9696
9656
|
waitingOn = fn("Cli.waitingOn")(function* (worktree) {
|
|
9697
9657
|
const store = yield* Store;
|
|
9698
9658
|
const owed = yield* store.take(worktree.path);
|
|
@@ -9709,7 +9669,6 @@ var init_commands = __esmMin((() => {
|
|
|
9709
9669
|
})
|
|
9710
9670
|
};
|
|
9711
9671
|
});
|
|
9712
|
-
AT_ONCE = 8;
|
|
9713
9672
|
summaryOf = fn("Cli.summaryOf")(function* (repo, found, base) {
|
|
9714
9673
|
const git = yield* Git;
|
|
9715
9674
|
const based = yield* basedOn(repo, found, base);
|
|
@@ -9737,7 +9696,7 @@ var init_commands = __esmMin((() => {
|
|
|
9737
9696
|
});
|
|
9738
9697
|
listBranches = fn("Cli.listBranches")(function* (repo, base) {
|
|
9739
9698
|
const worktrees = yield* (yield* Git).worktrees(repo);
|
|
9740
|
-
return (yield* forEach(worktrees, (found) => summaryOf(repo, found, base), { concurrency:
|
|
9699
|
+
return (yield* forEach(worktrees, (found) => summaryOf(repo, found, base), { concurrency: 8 })).filter((summary) => summary.files > 0);
|
|
9741
9700
|
});
|
|
9742
9701
|
blobOf = (patches, file) => map$4(findPatch(patches, file), (patch) => patch.blob);
|
|
9743
9702
|
vouchIn = fn("Cli.vouchIn")(function* (reading, file) {
|
|
@@ -9848,8 +9807,8 @@ var init_commands = __esmMin((() => {
|
|
|
9848
9807
|
return yield* sentIn(yield* readingOf(repo, branch, base));
|
|
9849
9808
|
});
|
|
9850
9809
|
anchorIn = fn("Cli.anchorIn")(function* (worktree, request) {
|
|
9851
|
-
const only = yield* patchesOf(worktree, WHOLE_FILE
|
|
9852
|
-
const patches = only.length > 0 ? only : yield* patchesOf(worktree, WHOLE_FILE
|
|
9810
|
+
const only = yield* patchesOf(worktree, WHOLE_FILE, request.file);
|
|
9811
|
+
const patches = only.length > 0 ? only : yield* patchesOf(worktree, WHOLE_FILE);
|
|
9853
9812
|
const patch = findPatch(patches, request.file);
|
|
9854
9813
|
const resolved = yield* match$3(patch, {
|
|
9855
9814
|
onNone: () => new UnknownFile({
|
|
@@ -9858,10 +9817,7 @@ var init_commands = __esmMin((() => {
|
|
|
9858
9817
|
}),
|
|
9859
9818
|
onSome: succeed$1
|
|
9860
9819
|
});
|
|
9861
|
-
const
|
|
9862
|
-
const first = rows[0];
|
|
9863
|
-
const last = rows.at(-1);
|
|
9864
|
-
const anchor = first === void 0 || last === void 0 ? none() : anchorFor(resolved, first, last, request.side);
|
|
9820
|
+
const anchor = flatMap$2(rowsForRange(resolved, request), ([first, last]) => anchorFor(resolved, first, last, request.side));
|
|
9865
9821
|
return yield* match$3(anchor, {
|
|
9866
9822
|
onNone: () => new UnselectableRange({
|
|
9867
9823
|
file: request.file,
|
|
@@ -10038,22 +9994,6 @@ var init_commands = __esmMin((() => {
|
|
|
10038
9994
|
byDefault: known.byDefault
|
|
10039
9995
|
};
|
|
10040
9996
|
});
|
|
10041
|
-
fn("Cli.saveWrap")(function* (wrap) {
|
|
10042
|
-
const store = yield* Store;
|
|
10043
|
-
const current = yield* store.settings;
|
|
10044
|
-
yield* store.saveSettings({
|
|
10045
|
-
...current,
|
|
10046
|
-
wrap
|
|
10047
|
-
});
|
|
10048
|
-
});
|
|
10049
|
-
fn("Cli.saveSticky")(function* (sticky) {
|
|
10050
|
-
const store = yield* Store;
|
|
10051
|
-
const current = yield* store.settings;
|
|
10052
|
-
yield* store.saveSettings({
|
|
10053
|
-
...current,
|
|
10054
|
-
sticky
|
|
10055
|
-
});
|
|
10056
|
-
});
|
|
10057
9997
|
setBase = fn("Cli.setBase")(function* (repo, branch, base) {
|
|
10058
9998
|
const store = yield* Store;
|
|
10059
9999
|
const based = yield* baseFor(repo, branch, base);
|
|
@@ -10457,7 +10397,7 @@ var init_pane = __esmMin((() => {
|
|
|
10457
10397
|
init_drafts();
|
|
10458
10398
|
init_init();
|
|
10459
10399
|
init_pane();
|
|
10460
|
-
var version$1 = "0.1.0-alpha.
|
|
10400
|
+
var version$1 = "0.1.0-alpha.111";
|
|
10461
10401
|
//#endregion
|
|
10462
10402
|
//#region src/cli/upgrade.ts
|
|
10463
10403
|
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;
|
|
@@ -10653,13 +10593,13 @@ var init_upgrade$1 = __esmMin((() => {
|
|
|
10653
10593
|
}));
|
|
10654
10594
|
//#endregion
|
|
10655
10595
|
//#region src/cli/search.ts
|
|
10656
|
-
var HIT, NEAR
|
|
10596
|
+
var HIT, NEAR, rowOf, readRows, near, byChangedFirst, searchIn, searchBranch;
|
|
10657
10597
|
var init_search = __esmMin((() => {
|
|
10658
10598
|
init_dist();
|
|
10659
10599
|
init_git();
|
|
10660
10600
|
init_commands();
|
|
10661
10601
|
HIT = /^(.+?):(\d+):(.*)$/;
|
|
10662
|
-
NEAR
|
|
10602
|
+
NEAR = /^(.+?)-(\d+)-(.*)$/;
|
|
10663
10603
|
rowOf = (line) => {
|
|
10664
10604
|
const hit = HIT.exec(line);
|
|
10665
10605
|
if (hit !== null) return {
|
|
@@ -10668,7 +10608,7 @@ var init_search = __esmMin((() => {
|
|
|
10668
10608
|
text: hit[3] ?? "",
|
|
10669
10609
|
hit: true
|
|
10670
10610
|
};
|
|
10671
|
-
const near = NEAR
|
|
10611
|
+
const near = NEAR.exec(line);
|
|
10672
10612
|
if (near === null) return void 0;
|
|
10673
10613
|
return {
|
|
10674
10614
|
path: near[1] ?? "",
|
|
@@ -10849,7 +10789,10 @@ var init_layers$1 = __esmMin((() => {
|
|
|
10849
10789
|
init_coverage();
|
|
10850
10790
|
init_version();
|
|
10851
10791
|
init_model$1();
|
|
10852
|
-
}))
|
|
10792
|
+
}));
|
|
10793
|
+
//#endregion
|
|
10794
|
+
//#region src/cli/layers.ts
|
|
10795
|
+
var STALE_ADVICE, unique, spansOfLayer, tidyPath, spanFault, blockFault, codeBlockOf, tidyBlock, blocksOf, layerFault, layerOf, parsed, readLayers, fromStored, toStored, reportedLayers, reportOf, resolve$1, resolveAll, worktreeAt, storedLayers, setLayers, showLayers, layersIn;
|
|
10853
10796
|
var init_layers = __esmMin((() => {
|
|
10854
10797
|
init_dist();
|
|
10855
10798
|
init_layers$1();
|
|
@@ -11057,9 +11000,6 @@ var init_layers = __esmMin((() => {
|
|
|
11057
11000
|
summary: found.value.summary
|
|
11058
11001
|
};
|
|
11059
11002
|
});
|
|
11060
|
-
fn("Cli.listLayers")(function* (repo, branch) {
|
|
11061
|
-
return yield* layersIn(yield* readingOf(repo, branch));
|
|
11062
|
-
});
|
|
11063
11003
|
}));
|
|
11064
11004
|
//#endregion
|
|
11065
11005
|
//#region src/cli/threads.ts
|
|
@@ -11311,7 +11251,7 @@ var init_parse = __esmMin((() => {
|
|
|
11311
11251
|
}));
|
|
11312
11252
|
//#endregion
|
|
11313
11253
|
//#region src/cli/catalog.ts
|
|
11314
|
-
var worktreeOf, repoOf, branchOf, fieldsOption, addressing, baseOf, based, repo, opening$2, file, range, READ_A_BRANCH, WRITE_COMMENTS, ANSWER_COMMENTS, FOLLOW_UP, DRAFTS, SET_UP, withFields, commands$1, catalog, commandNames, findCommand, VALUED_ANYWHERE, KNOWN_ANYWHERE, valuedIn, knownIn, verbsUnder, groups,
|
|
11254
|
+
var worktreeOf, repoOf, branchOf, fieldsOption, addressing, baseOf, based, repo, opening$2, file, range, READ_A_BRANCH, WRITE_COMMENTS, ANSWER_COMMENTS, FOLLOW_UP, DRAFTS, SET_UP, withFields, commands$1, catalog, commandNames, findCommand, VALUED_ANYWHERE, KNOWN_ANYWHERE, valuedIn, knownIn, verbsUnder, groups, MIN_EDITS, distance, CHARS_PER_EDIT, nearestCommand;
|
|
11315
11255
|
var init_catalog = __esmMin((() => {
|
|
11316
11256
|
worktreeOf = {
|
|
11317
11257
|
name: "worktree",
|
|
@@ -11855,7 +11795,7 @@ var init_catalog = __esmMin((() => {
|
|
|
11855
11795
|
knownIn = (name) => /* @__PURE__ */ new Set([...KNOWN_ANYWHERE, ...(findCommand(name)?.options ?? []).map((option) => option.name)]);
|
|
11856
11796
|
verbsUnder = (noun) => commandNames.filter((name) => name.startsWith(`${noun} `));
|
|
11857
11797
|
groups = [...new Set(catalog.map((command) => command.group))];
|
|
11858
|
-
|
|
11798
|
+
MIN_EDITS = 3;
|
|
11859
11799
|
distance = (left, right) => {
|
|
11860
11800
|
const previous = Array.from({ length: right.length + 1 }, (_, at) => at);
|
|
11861
11801
|
for (let row = 1; row <= left.length; row += 1) {
|
|
@@ -11870,12 +11810,12 @@ var init_catalog = __esmMin((() => {
|
|
|
11870
11810
|
}
|
|
11871
11811
|
return previous[right.length] ?? 0;
|
|
11872
11812
|
};
|
|
11873
|
-
|
|
11813
|
+
CHARS_PER_EDIT = 3;
|
|
11874
11814
|
nearestCommand = (name) => {
|
|
11875
11815
|
const noun = name.split(" ")[0] ?? "";
|
|
11876
11816
|
const under = verbsUnder(noun);
|
|
11877
11817
|
const candidates = under.length === 0 ? commandNames : under;
|
|
11878
|
-
const room = Math.max(
|
|
11818
|
+
const room = Math.max(MIN_EDITS, Math.floor(name.length / CHARS_PER_EDIT));
|
|
11879
11819
|
const scored = candidates.map((known) => ({
|
|
11880
11820
|
known,
|
|
11881
11821
|
gap: distance(name, known)
|
|
@@ -12457,7 +12397,7 @@ var init_tree = __esmMin((() => {
|
|
|
12457
12397
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
12458
12398
|
};
|
|
12459
12399
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
12460
|
-
})), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip
|
|
12400
|
+
})), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, layerBody, layerRows, nearFirst, layerFitted, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, pickedText, selectedLines, shownMatches, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
|
|
12461
12401
|
var init_model = __esmMin((() => {
|
|
12462
12402
|
init_dist();
|
|
12463
12403
|
init_patch();
|
|
@@ -12581,13 +12521,13 @@ var init_model = __esmMin((() => {
|
|
|
12581
12521
|
const width = Math.max(1, room);
|
|
12582
12522
|
return text.split(/\s+/).filter((word) => word.length > 0).flatMap((word) => chunked(word, width)).reduce((lines, word) => packed(lines, word, width), []);
|
|
12583
12523
|
};
|
|
12584
|
-
clip
|
|
12524
|
+
clip = (label, room) => label.length > room ? `${label.slice(0, Math.max(0, room - 1))}…` : label;
|
|
12585
12525
|
TITLE_ROWS = 2;
|
|
12586
12526
|
titleRows = (state, layerIndex, room) => {
|
|
12587
12527
|
const lines = wordWrapped(state.layers[layerIndex]?.title ?? "", room);
|
|
12588
12528
|
const kept = lines.slice(0, TITLE_ROWS);
|
|
12589
12529
|
const last = kept.at(-1) ?? "";
|
|
12590
|
-
return (lines.length > TITLE_ROWS ? [...kept.slice(0, -1), clip
|
|
12530
|
+
return (lines.length > TITLE_ROWS ? [...kept.slice(0, -1), clip(`${last} …`, room)] : kept).map((text, at) => ({
|
|
12591
12531
|
index: layerIndex,
|
|
12592
12532
|
kind: "title",
|
|
12593
12533
|
text,
|
|
@@ -12598,7 +12538,7 @@ var init_model = __esmMin((() => {
|
|
|
12598
12538
|
const whole = `${dir}/`;
|
|
12599
12539
|
if (whole.length <= room) return whole;
|
|
12600
12540
|
const parts = dir.split("/");
|
|
12601
|
-
if (parts.length < 3) return `${clip
|
|
12541
|
+
if (parts.length < 3) return `${clip(dir, Math.max(1, room - 1))}/`;
|
|
12602
12542
|
return `${parts[0] ?? ""}/…/${parts.at(-1) ?? ""}/`;
|
|
12603
12543
|
};
|
|
12604
12544
|
fileRow$1 = (state, layerIndex, at, room) => {
|
|
@@ -12607,7 +12547,7 @@ var init_model = __esmMin((() => {
|
|
|
12607
12547
|
return {
|
|
12608
12548
|
index: layerIndex,
|
|
12609
12549
|
kind: "file",
|
|
12610
|
-
text: clip
|
|
12550
|
+
text: clip(name, room),
|
|
12611
12551
|
lead: false,
|
|
12612
12552
|
fileIndex: at,
|
|
12613
12553
|
reviewed: isReviewed(state, at),
|
|
@@ -12653,7 +12593,7 @@ var init_model = __esmMin((() => {
|
|
|
12653
12593
|
return [{
|
|
12654
12594
|
index,
|
|
12655
12595
|
kind: "count",
|
|
12656
|
-
text: clip
|
|
12596
|
+
text: clip(said, room),
|
|
12657
12597
|
lead: false
|
|
12658
12598
|
}];
|
|
12659
12599
|
};
|
|
@@ -12707,11 +12647,12 @@ var init_model = __esmMin((() => {
|
|
|
12707
12647
|
kept = (state, at) => !state.hideReviewed || at === state.patchIndex || !isReviewed(state, at);
|
|
12708
12648
|
treeOf = (state) => buildTree(state.patches.map((patch, at) => kept(state, at) ? patch.path : ""));
|
|
12709
12649
|
reviewedCountIn = (state) => state.patches.filter((_, at) => isReviewed(state, at)).length;
|
|
12650
|
+
CROWDED = 8;
|
|
12710
12651
|
treeRows = (state) => {
|
|
12711
12652
|
const tree = treeOf(state);
|
|
12712
12653
|
return flattenTree(tree, state.closed);
|
|
12713
12654
|
};
|
|
12714
|
-
crowdedOf = (patches) => crowdedDirectories(buildTree(patches.map((patch) => patch.path)),
|
|
12655
|
+
crowdedOf = (patches) => crowdedDirectories(buildTree(patches.map((patch) => patch.path)), CROWDED);
|
|
12715
12656
|
foldersOfFile = (state, fileIndex) => {
|
|
12716
12657
|
const patch = state.patches[fileIndex];
|
|
12717
12658
|
if (patch === void 0) return [];
|
|
@@ -12864,7 +12805,6 @@ var init_model = __esmMin((() => {
|
|
|
12864
12805
|
const lines = selectedRows(state).length;
|
|
12865
12806
|
return `${patch.path} ${lines} ${lines === 1 ? "line" : "lines"}`;
|
|
12866
12807
|
};
|
|
12867
|
-
WHOLE_FILE = 1e5;
|
|
12868
12808
|
CONTEXT_STEPS = [
|
|
12869
12809
|
3,
|
|
12870
12810
|
10,
|
|
@@ -13365,7 +13305,7 @@ var init_command = __esmMin((() => {
|
|
|
13365
13305
|
command({
|
|
13366
13306
|
action: "select.shrink",
|
|
13367
13307
|
panes: ["diff"],
|
|
13368
|
-
title: "
|
|
13308
|
+
title: "Drop the last line from the selection",
|
|
13369
13309
|
category: "Selecting",
|
|
13370
13310
|
keys: ["shift+up"],
|
|
13371
13311
|
screens: ["review"],
|
|
@@ -14549,20 +14489,21 @@ var init_reduce = __esmMin((() => {
|
|
|
14549
14489
|
selecting: false,
|
|
14550
14490
|
notice
|
|
14551
14491
|
});
|
|
14552
|
-
})),
|
|
14492
|
+
})), ring, sets, chosen, useMarks, marks;
|
|
14553
14493
|
var init_marks = __esmMin((() => {
|
|
14494
|
+
ring = {
|
|
14495
|
+
comment: "○",
|
|
14496
|
+
sent: "✓",
|
|
14497
|
+
rule: "│",
|
|
14498
|
+
cursor: "▎",
|
|
14499
|
+
tally: "•",
|
|
14500
|
+
reviewed: "✓",
|
|
14501
|
+
folder: "",
|
|
14502
|
+
folderOpen: "",
|
|
14503
|
+
file: ""
|
|
14504
|
+
};
|
|
14554
14505
|
sets = {
|
|
14555
|
-
ring
|
|
14556
|
-
comment: "○",
|
|
14557
|
-
sent: "✓",
|
|
14558
|
-
rule: "│",
|
|
14559
|
-
cursor: "▎",
|
|
14560
|
-
tally: "•",
|
|
14561
|
-
reviewed: "✓",
|
|
14562
|
-
folder: "",
|
|
14563
|
-
folderOpen: "",
|
|
14564
|
-
file: ""
|
|
14565
|
-
},
|
|
14506
|
+
ring,
|
|
14566
14507
|
bubble: {
|
|
14567
14508
|
comment: "◗",
|
|
14568
14509
|
sent: "◖",
|
|
@@ -14606,29 +14547,18 @@ var init_marks = __esmMin((() => {
|
|
|
14606
14547
|
folder: "",
|
|
14607
14548
|
folderOpen: "",
|
|
14608
14549
|
file: ""
|
|
14550
|
+
},
|
|
14551
|
+
plain: {
|
|
14552
|
+
...ring,
|
|
14553
|
+
folder: "▸",
|
|
14554
|
+
folderOpen: "▾",
|
|
14555
|
+
file: "·"
|
|
14609
14556
|
}
|
|
14610
14557
|
};
|
|
14611
14558
|
Object.keys(sets);
|
|
14612
|
-
ring = {
|
|
14613
|
-
folder: "",
|
|
14614
|
-
folderOpen: "",
|
|
14615
|
-
file: "",
|
|
14616
|
-
comment: "○",
|
|
14617
|
-
sent: "✓",
|
|
14618
|
-
rule: "│",
|
|
14619
|
-
cursor: "▎",
|
|
14620
|
-
tally: "•",
|
|
14621
|
-
reviewed: "✓"
|
|
14622
|
-
};
|
|
14623
|
-
plain = {
|
|
14624
|
-
...ring,
|
|
14625
|
-
folder: "▸",
|
|
14626
|
-
folderOpen: "▾",
|
|
14627
|
-
file: "·"
|
|
14628
|
-
};
|
|
14629
14559
|
chosen = ring;
|
|
14630
14560
|
useMarks = (name) => {
|
|
14631
|
-
chosen =
|
|
14561
|
+
chosen = sets[name] ?? ring;
|
|
14632
14562
|
};
|
|
14633
14563
|
marks = () => chosen;
|
|
14634
14564
|
useMarks(process.env["ADIFF_MARKS"] ?? "ring");
|
|
@@ -15366,7 +15296,7 @@ var init_diffview = __esmMin((() => {
|
|
|
15366
15296
|
}));
|
|
15367
15297
|
//#endregion
|
|
15368
15298
|
//#region src/tui/render.ts
|
|
15369
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP,
|
|
15299
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, 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, DIFF_FLOOR, CRAMPED, CRAMPED_ROWS, DIFF_CHROME_MOST, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, keysOf, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, PLAIN_PICKED, PICKED, PLAIN_CURSOR, UNDER_CURSOR, GAP_PAINT, frameRoot, crampedBar, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, chipWidth, WAYS_OUT, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, GUTTER, DIR_LEAD, TITLE_LEAD, FILE_LEAD, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerMark, layerLead, layerGutter, layerText, litRow, leftOver, titlePaint, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, foundTitle, fileRow, blockOf, aroundRow, windowedBlocks, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
15370
15300
|
var init_render = __esmMin((() => {
|
|
15371
15301
|
init_command();
|
|
15372
15302
|
init_layers$1();
|
|
@@ -15381,7 +15311,6 @@ var init_render = __esmMin((() => {
|
|
|
15381
15311
|
COMPOSE_WIDTH = 72;
|
|
15382
15312
|
GUTTER_X = 2;
|
|
15383
15313
|
CHIP_GAP = 4;
|
|
15384
|
-
FRAME_PAD = 1;
|
|
15385
15314
|
MODAL_ROOM = 8;
|
|
15386
15315
|
COMPOSE_CHROME = 3;
|
|
15387
15316
|
COMPOSE_ACTION_ROWS = 2;
|
|
@@ -15476,8 +15405,8 @@ var init_render = __esmMin((() => {
|
|
|
15476
15405
|
};
|
|
15477
15406
|
frameRoot = (renderer) => {
|
|
15478
15407
|
renderer.root.flexDirection = "column";
|
|
15479
|
-
renderer.root.paddingLeft =
|
|
15480
|
-
renderer.root.paddingRight =
|
|
15408
|
+
renderer.root.paddingLeft = 1;
|
|
15409
|
+
renderer.root.paddingRight = 1;
|
|
15481
15410
|
renderer.root.paddingTop = 0;
|
|
15482
15411
|
renderer.root.paddingBottom = 0;
|
|
15483
15412
|
};
|
|
@@ -15839,7 +15768,6 @@ var init_render = __esmMin((() => {
|
|
|
15839
15768
|
paddingBottom: 1,
|
|
15840
15769
|
flexDirection: "column"
|
|
15841
15770
|
});
|
|
15842
|
-
clip = (label, room) => label.length > room ? `${label.slice(0, Math.max(0, room - 1))}…` : label;
|
|
15843
15771
|
clipHead = (label, room) => label.length > room ? `…${label.slice(label.length - Math.max(0, room - 1))}` : label;
|
|
15844
15772
|
clipMiddle = (label, room) => {
|
|
15845
15773
|
if (label.length <= room) return label;
|
|
@@ -16410,7 +16338,7 @@ var init_render = __esmMin((() => {
|
|
|
16410
16338
|
this.paletteChoices.content = listText(matches.map((entry) => commandRow(entry, room - MODAL_ROOM)), Math.min(state.paletteIndex, Math.max(0, matches.length - 1)), paletteRoom - PALETTE_CHROME);
|
|
16411
16339
|
this.palette.height = paletteRoom;
|
|
16412
16340
|
this.palette.width = room;
|
|
16413
|
-
this.palette.left = Math.max(
|
|
16341
|
+
this.palette.left = Math.max(1, Math.floor((this.renderer.width - room) / 2));
|
|
16414
16342
|
this.palette.top = panelTop(this.renderer.height, PANEL_QUARTER);
|
|
16415
16343
|
}
|
|
16416
16344
|
paintKeys(state) {
|
|
@@ -16427,7 +16355,7 @@ var init_render = __esmMin((() => {
|
|
|
16427
16355
|
this.keysChoices.content = listText(rows.map((entry) => commandRow(entry, room - MODAL_ROOM)), Math.min(state.paletteIndex, Math.max(0, rows.length - 1)), keysRoom - PENDING_CHROME);
|
|
16428
16356
|
this.keys.height = keysRoom;
|
|
16429
16357
|
this.keys.width = room;
|
|
16430
|
-
this.keys.left = Math.max(
|
|
16358
|
+
this.keys.left = Math.max(1, Math.floor((this.renderer.width - room) / 2));
|
|
16431
16359
|
this.keys.top = panelTop(this.renderer.height, PANEL_QUARTER);
|
|
16432
16360
|
}
|
|
16433
16361
|
headerText(state) {
|
|
@@ -16720,7 +16648,7 @@ var init_render = __esmMin((() => {
|
|
|
16720
16648
|
this.foundPeek.height = 0;
|
|
16721
16649
|
this.found.height = Math.min(most, Math.max(FOUND_LEAST, window.rows) + PALETTE_CHROME);
|
|
16722
16650
|
this.found.width = room;
|
|
16723
|
-
this.found.left = Math.max(
|
|
16651
|
+
this.found.left = Math.max(1, Math.floor((this.renderer.width - room) / 2));
|
|
16724
16652
|
this.found.top = panelTop(this.renderer.height, PANEL_FIFTH);
|
|
16725
16653
|
}
|
|
16726
16654
|
paintReport(state) {
|
|
@@ -16736,7 +16664,7 @@ var init_render = __esmMin((() => {
|
|
|
16736
16664
|
this.composeActions.content = reportActions(state.reportFull);
|
|
16737
16665
|
this.compose.height = lead.length + written + COMPOSE_ACTION_ROWS + COMPOSE_CHROME;
|
|
16738
16666
|
this.compose.width = room.box;
|
|
16739
|
-
this.compose.left = Math.max(
|
|
16667
|
+
this.compose.left = Math.max(1, Math.floor((this.renderer.width - room.box) / 2));
|
|
16740
16668
|
this.compose.top = Math.max(2, Math.floor(this.renderer.height / 4));
|
|
16741
16669
|
}
|
|
16742
16670
|
paintGutter(state, top, height) {
|
|
@@ -16797,7 +16725,7 @@ var init_render = __esmMin((() => {
|
|
|
16797
16725
|
const height = quoted.length + 1 + written + COMPOSE_ACTION_ROWS + COMPOSE_CHROME;
|
|
16798
16726
|
this.compose.height = height;
|
|
16799
16727
|
this.compose.width = room.box;
|
|
16800
|
-
this.compose.left = Math.max(
|
|
16728
|
+
this.compose.left = Math.max(1, Math.floor((this.renderer.width - room.box) / 2));
|
|
16801
16729
|
this.compose.top = Math.max(2, Math.floor((this.renderer.height - height) / 2));
|
|
16802
16730
|
}
|
|
16803
16731
|
};
|
|
@@ -16943,7 +16871,10 @@ var init_upgrade = __esmMin((() => {
|
|
|
16943
16871
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
16944
16872
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
16945
16873
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
16946
|
-
}))
|
|
16874
|
+
}));
|
|
16875
|
+
//#endregion
|
|
16876
|
+
//#region src/tui/app.ts
|
|
16877
|
+
var LEAVING_MS, LOOK_MS, LEAVING_SAID, NOTHING_WRITTEN, layersAsk, askedFor, alongFrom, NOTICE_MS, KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, seedFor, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, OVER, overReview, writesInto, listens, LETTER, laidOut, ARROWS, SHIFTED, keyName, App, sentAway, turnedOver, settledPath, restsWhereItLanded, lonelyGaps, chosenIn, settingsHeld, firstBranches, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
16947
16878
|
var init_app = __esmMin((() => {
|
|
16948
16879
|
init_dist();
|
|
16949
16880
|
init_report();
|
|
@@ -16961,6 +16892,7 @@ var init_app = __esmMin((() => {
|
|
|
16961
16892
|
init_intent();
|
|
16962
16893
|
init_session();
|
|
16963
16894
|
init_upgrade();
|
|
16895
|
+
LEAVING_MS = 3e3;
|
|
16964
16896
|
LOOK_MS = 110;
|
|
16965
16897
|
LEAVING_SAID = "press ctrl+c again to leave";
|
|
16966
16898
|
NOTHING_WRITTEN = "nothing written yet";
|
|
@@ -17958,7 +17890,7 @@ var init_app = __esmMin((() => {
|
|
|
17958
17890
|
this.commit(reduce(this.measured(), "back"));
|
|
17959
17891
|
return;
|
|
17960
17892
|
}
|
|
17961
|
-
if (this.leaving !== void 0 && Date.now() - this.leaving <
|
|
17893
|
+
if (this.leaving !== void 0 && Date.now() - this.leaving < LEAVING_MS) {
|
|
17962
17894
|
this.renderer.destroy();
|
|
17963
17895
|
return;
|
|
17964
17896
|
}
|
|
@@ -18004,13 +17936,13 @@ var init_app = __esmMin((() => {
|
|
|
18004
17936
|
this.commit(withNoticeHere(this.state, "no pull request for this branch"));
|
|
18005
17937
|
return;
|
|
18006
17938
|
}
|
|
18007
|
-
const opened = yield* (yield*
|
|
17939
|
+
const opened = yield* (yield* Forge).openPull(this.repo, branch.branch).pipe(as(true), catchTag("ForgeUnavailable", () => succeed$1(false)));
|
|
18008
17940
|
this.commit(withNoticeHere(this.state, openedPull(pullHere(this.state), opened)));
|
|
18009
17941
|
});
|
|
18010
17942
|
}
|
|
18011
17943
|
loadPulls() {
|
|
18012
17944
|
return gen({ self: this }, function* () {
|
|
18013
|
-
const answered = yield* (yield*
|
|
17945
|
+
const answered = yield* (yield* Forge).pulls(this.repo).pipe(map(some), catchTag("ForgeUnavailable", () => succeed$1(none())));
|
|
18014
17946
|
this.commit(match$3(answered, {
|
|
18015
17947
|
onNone: () => withSilentForge(this.state),
|
|
18016
17948
|
onSome: (pulls) => withPulls(this.state, Object.fromEntries(pulls.map((pull) => [pull.branch, pull.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.111",
|
|
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": {
|