@eliya-oss/agent-diff 0.1.0-alpha.77 → 0.1.0-alpha.78
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 +10 -0
- package/dist/main.js +120 -78
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.78
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Naming a branch no worktree here is on says so, rather than landing on the worktree list with no word about it.
|
|
8
|
+
|
|
9
|
+
- A file opens on a line rather than on the row standing for the ones it hides, so the first `c` in a file has something to comment on. `]` and `[` walk every file the branch changed, even when the folder holding them is closed.
|
|
10
|
+
|
|
11
|
+
- The worktree list is read all at once rather than one worktree after another, so it arrives in about a third of the time on a machine with a dozen of them. The file tree gives its width to names rather than to indenting, and keeps more of them whole.
|
|
12
|
+
|
|
3
13
|
## 0.1.0-alpha.77
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -4500,16 +4500,16 @@ var init_annotations = __esmMin((() => {
|
|
|
4500
4500
|
}));
|
|
4501
4501
|
//#endregion
|
|
4502
4502
|
//#region node_modules/.pnpm/effect@4.0.0-rc.110/node_modules/effect/dist/internal/schema/parser.js
|
|
4503
|
-
var missing$
|
|
4503
|
+
var missing$2, succeed, missingExit, sameExit, toOption, fromOptionExit;
|
|
4504
4504
|
var init_parser = __esmMin((() => {
|
|
4505
4505
|
init_Exit();
|
|
4506
4506
|
init_Option();
|
|
4507
4507
|
init_core();
|
|
4508
|
-
missing$
|
|
4508
|
+
missing$2 = /*#__PURE__*/ Symbol();
|
|
4509
4509
|
succeed = succeed$4;
|
|
4510
|
-
missingExit = /*#__PURE__*/ succeed(missing$
|
|
4511
|
-
sameExit = /*#__PURE__*/ succeed(missing$
|
|
4512
|
-
toOption = (value) => value === missing$
|
|
4510
|
+
missingExit = /*#__PURE__*/ succeed(missing$2);
|
|
4511
|
+
sameExit = /*#__PURE__*/ succeed(missing$2);
|
|
4512
|
+
toOption = (value) => value === missing$2 ? none() : some(value);
|
|
4513
4513
|
fromOptionExit = (option) => option._tag === "None" ? missingExit : succeed(option.value);
|
|
4514
4514
|
}));
|
|
4515
4515
|
//#endregion
|
|
@@ -4699,7 +4699,7 @@ var init_SchemaIssue = __esmMin((() => {
|
|
|
4699
4699
|
Base$1 = class {
|
|
4700
4700
|
[TypeId$9] = TypeId$9;
|
|
4701
4701
|
constructor(input, options) {
|
|
4702
|
-
if (options?.reportInput === true && input !== missing$
|
|
4702
|
+
if (options?.reportInput === true && input !== missing$2) this.input = input;
|
|
4703
4703
|
}
|
|
4704
4704
|
};
|
|
4705
4705
|
Filter$1 = class extends Base$1 {
|
|
@@ -5685,14 +5685,14 @@ function containsUndefined(ast) {
|
|
|
5685
5685
|
function fromConst(ast, value) {
|
|
5686
5686
|
const succeed$9 = succeed(value);
|
|
5687
5687
|
return (input, options) => {
|
|
5688
|
-
if (input === missing$
|
|
5688
|
+
if (input === missing$2) return missingExit;
|
|
5689
5689
|
if (input === value) return succeed$9;
|
|
5690
5690
|
return fail(new InvalidType(ast, input, options));
|
|
5691
5691
|
};
|
|
5692
5692
|
}
|
|
5693
5693
|
function fromRefinement(ast, refinement) {
|
|
5694
5694
|
return (input, options) => {
|
|
5695
|
-
if (input === missing$
|
|
5695
|
+
if (input === missing$2) return missingExit;
|
|
5696
5696
|
if (refinement(input)) return sameExit;
|
|
5697
5697
|
return fail(new InvalidType(ast, input, options));
|
|
5698
5698
|
};
|
|
@@ -5964,7 +5964,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
5964
5964
|
return rest[0];
|
|
5965
5965
|
}
|
|
5966
5966
|
return fnUntracedEager(function* (input, options) {
|
|
5967
|
-
if (input === missing$
|
|
5967
|
+
if (input === missing$2) return missing$2;
|
|
5968
5968
|
if (!Array.isArray(input)) return yield* fail(new InvalidType(ast, input, options));
|
|
5969
5969
|
if (!elements) {
|
|
5970
5970
|
elements = ast.elements.map((ast) => ({
|
|
@@ -6024,13 +6024,13 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6024
6024
|
};
|
|
6025
6025
|
parseArray = /*#__PURE__*/ iterateEager()({
|
|
6026
6026
|
onItem(s, item, i) {
|
|
6027
|
-
const value = i < s.len ? item : missing$
|
|
6027
|
+
const value = i < s.len ? item : missing$2;
|
|
6028
6028
|
return s.getParser(s.tailThreshold, i).parser(value, s.options);
|
|
6029
6029
|
},
|
|
6030
6030
|
step(s, item, exit, i) {
|
|
6031
6031
|
if (exit._tag === "Failure") return wrapPropertyKeyIssue(s, s.ast, i, exit);
|
|
6032
6032
|
const value = exit === sameExit ? item : exit[args];
|
|
6033
|
-
if (value !== missing$
|
|
6033
|
+
if (value !== missing$2) s.output[i] = value;
|
|
6034
6034
|
else {
|
|
6035
6035
|
const p = s.getParser(s.tailThreshold, i);
|
|
6036
6036
|
if (isOptional(p.ast)) return;
|
|
@@ -6100,7 +6100,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6100
6100
|
const finishIndex = (s, key, k2, inputValue, exitValue) => {
|
|
6101
6101
|
if (exitValue._tag === "Failure") return wrapPropertyKeyIssue(s, ast, key, exitValue) ?? void_$1;
|
|
6102
6102
|
const value = exitValue === sameExit ? inputValue : exitValue[args];
|
|
6103
|
-
if (k2 !== missing$
|
|
6103
|
+
if (k2 !== missing$2 && value !== missing$2) {
|
|
6104
6104
|
if (hasProperties && (expectedKeysSet.has(key) || expectedKeysSet.has(k2))) return void_$1;
|
|
6105
6105
|
assignProperty(s.out, k2, value);
|
|
6106
6106
|
}
|
|
@@ -6128,7 +6128,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6128
6128
|
step: (_s, _, exit) => exit._tag === "Failure" ? exit : void 0
|
|
6129
6129
|
}) : void 0;
|
|
6130
6130
|
return fnUntracedEager(function* (input, options) {
|
|
6131
|
-
if (input === missing$
|
|
6131
|
+
if (input === missing$2) return missing$2;
|
|
6132
6132
|
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) return yield* fail(new InvalidType(ast, input, options));
|
|
6133
6133
|
if (!properties) {
|
|
6134
6134
|
properties = ast.propertySignatures.map((ps) => ({
|
|
@@ -6234,7 +6234,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6234
6234
|
};
|
|
6235
6235
|
parseProperties = /*#__PURE__*/ iterateEager()({
|
|
6236
6236
|
onItem(s, p) {
|
|
6237
|
-
if (!Object.hasOwn(s.input, p.name)) return p.parser(missing$
|
|
6237
|
+
if (!Object.hasOwn(s.input, p.name)) return p.parser(missing$2, s.options);
|
|
6238
6238
|
const value = s.input[p.name];
|
|
6239
6239
|
assignProperty(s.out, p.name, value);
|
|
6240
6240
|
return p.parser(value, s.options);
|
|
@@ -6243,7 +6243,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6243
6243
|
if (exit._tag === "Failure") return wrapPropertyKeyIssue(s, s.ast, p.name, exit);
|
|
6244
6244
|
if (exit === sameExit) return;
|
|
6245
6245
|
const value = exit[args];
|
|
6246
|
-
if (value !== missing$
|
|
6246
|
+
if (value !== missing$2) {
|
|
6247
6247
|
assignProperty(s.out, p.name, value);
|
|
6248
6248
|
return;
|
|
6249
6249
|
}
|
|
@@ -6284,7 +6284,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6284
6284
|
getParser(compile, compileConstructorDefault) {
|
|
6285
6285
|
const ast = this;
|
|
6286
6286
|
return (input, options) => {
|
|
6287
|
-
if (input === missing$
|
|
6287
|
+
if (input === missing$2) return missingExit;
|
|
6288
6288
|
const candidates = getCandidates(input, ast.types, compileConstructorDefault !== void 0);
|
|
6289
6289
|
if (candidates.length === 1) {
|
|
6290
6290
|
const result = compile(candidates[0])(input, options);
|
|
@@ -7469,7 +7469,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
7469
7469
|
const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
7470
7470
|
if (result === sameExit) return succeed$1(input);
|
|
7471
7471
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
7472
|
-
return result[args] === missing$
|
|
7472
|
+
return result[args] === missing$2 ? getValue(missing$2) : result;
|
|
7473
7473
|
};
|
|
7474
7474
|
}
|
|
7475
7475
|
function compileConstructorDefault(ast) {
|
|
@@ -7487,7 +7487,7 @@ function applyTransformation(result, current, transformation, options) {
|
|
|
7487
7487
|
function makeConstructorParser(descriptor, compile) {
|
|
7488
7488
|
let sourceParser;
|
|
7489
7489
|
return (input, options) => {
|
|
7490
|
-
if (input === missing$
|
|
7490
|
+
if (input === missing$2) return missingExit;
|
|
7491
7491
|
if (descriptor.isConstructed(input)) return sameExit;
|
|
7492
7492
|
return applyTransformation((sourceParser ??= compile(descriptor.link.to))(input, options), input, descriptor.link.transformation, options);
|
|
7493
7493
|
};
|
|
@@ -7509,13 +7509,13 @@ function makeParser(ast, compile, compileConstructorDefault, constructorDefault)
|
|
|
7509
7509
|
if (encodingChecks && !options.disableChecks) if (effectIsExit(result)) {
|
|
7510
7510
|
if (result._tag === "Success") {
|
|
7511
7511
|
const output = result === sameExit ? input : result[args];
|
|
7512
|
-
if (input !== missing$
|
|
7512
|
+
if (input !== missing$2 && output !== missing$2) {
|
|
7513
7513
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
7514
7514
|
if (issues) result = fail(new Composite(ast, issues, input, options));
|
|
7515
7515
|
}
|
|
7516
7516
|
}
|
|
7517
7517
|
} else result = flatMap(result, (value) => {
|
|
7518
|
-
if (input !== missing$
|
|
7518
|
+
if (input !== missing$2 && value !== missing$2) {
|
|
7519
7519
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
7520
7520
|
if (issues) return fail(new Composite(ast, issues, input, options));
|
|
7521
7521
|
}
|
|
@@ -7524,12 +7524,12 @@ function makeParser(ast, compile, compileConstructorDefault, constructorDefault)
|
|
|
7524
7524
|
if (checks && !options.disableChecks) if (effectIsExit(result)) {
|
|
7525
7525
|
if (result._tag === "Success") {
|
|
7526
7526
|
const value = result === sameExit ? input : result[args];
|
|
7527
|
-
if (value === missing$
|
|
7527
|
+
if (value === missing$2) return result;
|
|
7528
7528
|
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
7529
7529
|
if (issues) result = fail(new Composite(ast, issues, value, options));
|
|
7530
7530
|
}
|
|
7531
7531
|
} else result = flatMap(result, (value) => {
|
|
7532
|
-
if (value !== missing$
|
|
7532
|
+
if (value !== missing$2) {
|
|
7533
7533
|
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
7534
7534
|
if (issues) return fail(new Composite(ast, issues, value, options));
|
|
7535
7535
|
}
|
|
@@ -7585,7 +7585,7 @@ var init_SchemaParser = __esmMin((() => {
|
|
|
7585
7585
|
...overrideOptions
|
|
7586
7586
|
} : options;
|
|
7587
7587
|
getValue = (value) => {
|
|
7588
|
-
if (value === missing$
|
|
7588
|
+
if (value === missing$2) return fail(new InvalidValue());
|
|
7589
7589
|
return succeed$1(value);
|
|
7590
7590
|
};
|
|
7591
7591
|
normalCompiler = /*#__PURE__*/ memoize((ast) => makeParser(ast, normalCompiler));
|
|
@@ -8726,7 +8726,7 @@ var init_paths = __esmMin((() => {
|
|
|
8726
8726
|
upgradePath = (root) => join(root, "upgrade.json");
|
|
8727
8727
|
reportsDir = (root) => join(root, "reports");
|
|
8728
8728
|
reportPath = (root, stamp) => join(reportsDir(root), `${stamp}.md`);
|
|
8729
|
-
})), Store, ensureDir, readOptional, missing, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, 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, layersOps, inboxOps, stateOps, makeStore, storeAt;
|
|
8729
|
+
})), Store, ensureDir, readOptional, missing$1, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, 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, layersOps, inboxOps, stateOps, makeStore, storeAt;
|
|
8730
8730
|
var init_service$1 = __esmMin((() => {
|
|
8731
8731
|
init_dist();
|
|
8732
8732
|
init_error$2();
|
|
@@ -8750,9 +8750,9 @@ var init_service$1 = __esmMin((() => {
|
|
|
8750
8750
|
path,
|
|
8751
8751
|
reason: String(cause)
|
|
8752
8752
|
})
|
|
8753
|
-
}).pipe(map(some), catchTag("StoreUnreadable", () => missing));
|
|
8753
|
+
}).pipe(map(some), catchTag("StoreUnreadable", () => missing$1));
|
|
8754
8754
|
});
|
|
8755
|
-
missing = succeed$1(none());
|
|
8755
|
+
missing$1 = succeed$1(none());
|
|
8756
8756
|
damaged = (path) => (reason) => new StoreUnreadable({
|
|
8757
8757
|
path,
|
|
8758
8758
|
reason: String(reason)
|
|
@@ -9051,7 +9051,7 @@ var init_error$1 = __esmMin((() => {
|
|
|
9051
9051
|
}));
|
|
9052
9052
|
//#endregion
|
|
9053
9053
|
//#region src/cli/commands.ts
|
|
9054
|
-
var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, listBranches, blobOf, toggleVouch, reviewProgress, bodyOf, sentOf, listSent, submitComment, listPatches, flatten, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, saveSticky, setBase, clearBase, markRead;
|
|
9054
|
+
var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, AT_ONCE, summaryOf, listBranches, blobOf, toggleVouch, reviewProgress, bodyOf, sentOf, listSent, submitComment, listPatches, flatten, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, saveSticky, setBase, clearBase, markRead;
|
|
9055
9055
|
var init_commands = __esmMin((() => {
|
|
9056
9056
|
init_dist();
|
|
9057
9057
|
init_patch();
|
|
@@ -9159,31 +9159,31 @@ var init_commands = __esmMin((() => {
|
|
|
9159
9159
|
})
|
|
9160
9160
|
};
|
|
9161
9161
|
});
|
|
9162
|
-
|
|
9162
|
+
AT_ONCE = 8;
|
|
9163
|
+
summaryOf = fn("Cli.summaryOf")(function* (repo, found, base) {
|
|
9163
9164
|
const git = yield* Git;
|
|
9164
|
-
const
|
|
9165
|
-
const
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
|
|
9184
|
-
|
|
9185
|
-
}
|
|
9186
|
-
return summaries.filter((summary) => summary.files > 0);
|
|
9165
|
+
const based = yield* basedOn(repo, found, base);
|
|
9166
|
+
const worktree = based.worktree;
|
|
9167
|
+
const stat = yield* git.stat(worktree);
|
|
9168
|
+
const waiting = yield* waitingOn(worktree);
|
|
9169
|
+
return {
|
|
9170
|
+
branch: worktree.branch,
|
|
9171
|
+
path: worktree.path,
|
|
9172
|
+
head: worktree.head,
|
|
9173
|
+
files: stat.files,
|
|
9174
|
+
added: stat.added,
|
|
9175
|
+
removed: stat.removed,
|
|
9176
|
+
unread: waiting.unread,
|
|
9177
|
+
layers: waiting.layers,
|
|
9178
|
+
stale: waiting.stale,
|
|
9179
|
+
own: worktree.own,
|
|
9180
|
+
base: based.base,
|
|
9181
|
+
basis: based.basis
|
|
9182
|
+
};
|
|
9183
|
+
});
|
|
9184
|
+
listBranches = fn("Cli.listBranches")(function* (repo, base) {
|
|
9185
|
+
const worktrees = yield* (yield* Git).worktrees(repo);
|
|
9186
|
+
return (yield* forEach(worktrees, (found) => summaryOf(repo, found, base), { concurrency: AT_ONCE })).filter((summary) => summary.files > 0);
|
|
9187
9187
|
});
|
|
9188
9188
|
blobOf = (patches, file) => map$4(findPatch(patches, file), (patch) => patch.blob);
|
|
9189
9189
|
toggleVouch = fn("Cli.toggleVouch")(function* (request) {
|
|
@@ -9663,7 +9663,7 @@ var init_pane = __esmMin((() => {
|
|
|
9663
9663
|
init_commands();
|
|
9664
9664
|
init_init();
|
|
9665
9665
|
init_pane();
|
|
9666
|
-
var version$1 = "0.1.0-alpha.
|
|
9666
|
+
var version$1 = "0.1.0-alpha.78";
|
|
9667
9667
|
//#endregion
|
|
9668
9668
|
//#region src/cli/upgrade.ts
|
|
9669
9669
|
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;
|
|
@@ -11396,7 +11396,7 @@ var init_tree = __esmMin((() => {
|
|
|
11396
11396
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
11397
11397
|
};
|
|
11398
11398
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
11399
|
-
})), nothingReviewed, initialState, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, 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, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
|
|
11399
|
+
})), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, 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, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
|
|
11400
11400
|
var init_model = __esmMin((() => {
|
|
11401
11401
|
init_dist();
|
|
11402
11402
|
init_patch();
|
|
@@ -11463,6 +11463,7 @@ var init_model = __esmMin((() => {
|
|
|
11463
11463
|
rail: "tree"
|
|
11464
11464
|
});
|
|
11465
11465
|
TREE_MAX = 34;
|
|
11466
|
+
TREE_ROOMY = 40;
|
|
11466
11467
|
TREE_MIN = 18;
|
|
11467
11468
|
TREE_SHARE = .3;
|
|
11468
11469
|
DIFF_MIN = 26;
|
|
@@ -11470,7 +11471,8 @@ var init_model = __esmMin((() => {
|
|
|
11470
11471
|
bodyRoom = (columns) => Math.max(0, columns - 2);
|
|
11471
11472
|
treeWidth = (columns) => {
|
|
11472
11473
|
const room = bodyRoom(columns);
|
|
11473
|
-
const
|
|
11474
|
+
const most = room - reviewWidth() - DIFF_ROOMY >= TREE_ROOMY ? TREE_ROOMY : TREE_MAX;
|
|
11475
|
+
const wanted = Math.min(most, Math.max(TREE_MIN, Math.floor(room * TREE_SHARE)));
|
|
11474
11476
|
return Math.max(0, Math.min(wanted, room - DIFF_MIN));
|
|
11475
11477
|
};
|
|
11476
11478
|
reviewWidth = () => 36;
|
|
@@ -11902,6 +11904,10 @@ var init_model = __esmMin((() => {
|
|
|
11902
11904
|
}
|
|
11903
11905
|
return starts;
|
|
11904
11906
|
};
|
|
11907
|
+
openingRow = (state, patchIndex) => {
|
|
11908
|
+
const at = (state.patches[patchIndex]?.rows ?? []).findIndex((row) => carriesLine(row));
|
|
11909
|
+
return at === -1 ? 0 : at;
|
|
11910
|
+
};
|
|
11905
11911
|
changeAround = (state) => {
|
|
11906
11912
|
const rows = selectedPatch(state)?.rows ?? [];
|
|
11907
11913
|
const changed = (at) => {
|
|
@@ -11921,7 +11927,7 @@ var init_model = __esmMin((() => {
|
|
|
11921
11927
|
return [...order.slice(start + 1), ...order.slice(0, start + 1)].find((index) => !isReviewed(state, index));
|
|
11922
11928
|
};
|
|
11923
11929
|
reviewedCount = (state) => `${state.vouched.length}/${state.patches.length} reviewed`;
|
|
11924
|
-
fileOrder = (state) => onLayers(state) ? layerFiles(state, state.layerIndex) :
|
|
11930
|
+
fileOrder = (state) => onLayers(state) ? layerFiles(state, state.layerIndex) : flattenTree(treeOf(state), []).flatMap((row) => row.fileIndex === void 0 ? [] : [row.fileIndex]);
|
|
11925
11931
|
layerFile = (state, delta) => {
|
|
11926
11932
|
const order = fileOrder(state);
|
|
11927
11933
|
const position = order.indexOf(state.patchIndex);
|
|
@@ -12651,7 +12657,7 @@ var init_match = __esmMin((() => {
|
|
|
12651
12657
|
}));
|
|
12652
12658
|
//#endregion
|
|
12653
12659
|
//#region src/tui/reduce.ts
|
|
12654
|
-
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12660
|
+
var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
|
|
12655
12661
|
var init_reduce = __esmMin((() => {
|
|
12656
12662
|
init_dist();
|
|
12657
12663
|
init_patch();
|
|
@@ -12899,11 +12905,30 @@ var init_reduce = __esmMin((() => {
|
|
|
12899
12905
|
...state,
|
|
12900
12906
|
branchIndex: clamp(state.branchIndex + delta, 0, Math.max(0, state.branches.length - 1))
|
|
12901
12907
|
});
|
|
12908
|
+
landingOn = (state, patchIndex) => {
|
|
12909
|
+
const held = {
|
|
12910
|
+
...state,
|
|
12911
|
+
patchIndex
|
|
12912
|
+
};
|
|
12913
|
+
const drawn = shownOf(held);
|
|
12914
|
+
if (drawn === void 0) return openingRow(state, patchIndex);
|
|
12915
|
+
const hidden = gapRowSet(drawn);
|
|
12916
|
+
const at = drawn.patch.rows.findIndex((row) => !hidden.has(row.index) && carriesLine(row));
|
|
12917
|
+
return at === -1 ? openingRow(state, patchIndex) : at;
|
|
12918
|
+
};
|
|
12919
|
+
revealing = (state, patchIndex) => {
|
|
12920
|
+
const wanted = foldersOfFile({
|
|
12921
|
+
...state,
|
|
12922
|
+
patchIndex
|
|
12923
|
+
}, patchIndex);
|
|
12924
|
+
return state.closed.filter((path) => !wanted.includes(path));
|
|
12925
|
+
};
|
|
12902
12926
|
moveFile = (state, delta) => ({
|
|
12903
12927
|
...state,
|
|
12928
|
+
closed: revealing(state, layerFile(state, delta)),
|
|
12904
12929
|
patchIndex: layerFile(state, delta),
|
|
12905
12930
|
top: 0,
|
|
12906
|
-
cursor:
|
|
12931
|
+
cursor: landingOn(state, layerFile(state, delta)),
|
|
12907
12932
|
anchorRow: 0,
|
|
12908
12933
|
selecting: false
|
|
12909
12934
|
});
|
|
@@ -13026,7 +13051,11 @@ var init_reduce = __esmMin((() => {
|
|
|
13026
13051
|
"branch.open": (state) => state,
|
|
13027
13052
|
"branch.pull": (state) => state,
|
|
13028
13053
|
"cursor.next": (state) => layerDown(state, 1),
|
|
13029
|
-
"cursor.top": (state) =>
|
|
13054
|
+
"cursor.top": (state) => ({
|
|
13055
|
+
...atRow(state, landingOn(state, state.patchIndex)),
|
|
13056
|
+
top: 0,
|
|
13057
|
+
scroll: -1
|
|
13058
|
+
}),
|
|
13030
13059
|
"cursor.bottom": (state) => atRow(state, lastRow(selectedPatch(state))),
|
|
13031
13060
|
"cursor.pageDown": (state) => moveCursor(state, Math.max(1, Math.floor(state.viewport / 2))),
|
|
13032
13061
|
"cursor.pageUp": (state) => moveCursor(state, -Math.max(1, Math.floor(state.viewport / 2))),
|
|
@@ -13120,8 +13149,9 @@ var init_reduce = __esmMin((() => {
|
|
|
13120
13149
|
reduce = (state, action) => transitions[action](state);
|
|
13121
13150
|
atFile = (state, patchIndex) => ({
|
|
13122
13151
|
...state,
|
|
13152
|
+
closed: revealing(state, patchIndex),
|
|
13123
13153
|
patchIndex,
|
|
13124
|
-
cursor:
|
|
13154
|
+
cursor: landingOn(state, patchIndex),
|
|
13125
13155
|
anchorRow: 0,
|
|
13126
13156
|
selecting: false
|
|
13127
13157
|
});
|
|
@@ -13258,22 +13288,27 @@ var init_reduce = __esmMin((() => {
|
|
|
13258
13288
|
top: clamp(cursor - Math.floor(height / 2), 0, room)
|
|
13259
13289
|
});
|
|
13260
13290
|
};
|
|
13261
|
-
withPatches = (state, patches) =>
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
patches,
|
|
13265
|
-
full: [],
|
|
13266
|
-
revealed: [],
|
|
13267
|
-
closed: crowdedOf(patches),
|
|
13268
|
-
patchIndex: fileOrder({
|
|
13291
|
+
withPatches = (state, patches) => {
|
|
13292
|
+
const closed = crowdedOf(patches);
|
|
13293
|
+
const opened = {
|
|
13269
13294
|
...state,
|
|
13270
13295
|
patches,
|
|
13271
|
-
closed
|
|
13272
|
-
}
|
|
13273
|
-
|
|
13274
|
-
|
|
13275
|
-
|
|
13276
|
-
|
|
13296
|
+
closed
|
|
13297
|
+
};
|
|
13298
|
+
const patchIndex = fileOrder(opened)[0] ?? 0;
|
|
13299
|
+
return {
|
|
13300
|
+
...state,
|
|
13301
|
+
screen: "review",
|
|
13302
|
+
patches,
|
|
13303
|
+
full: [],
|
|
13304
|
+
revealed: [],
|
|
13305
|
+
closed,
|
|
13306
|
+
patchIndex,
|
|
13307
|
+
cursor: landingOn(opened, patchIndex),
|
|
13308
|
+
anchorRow: 0,
|
|
13309
|
+
selecting: false
|
|
13310
|
+
};
|
|
13311
|
+
};
|
|
13277
13312
|
TAB_WIDTH = 2;
|
|
13278
13313
|
SPACE_CODE = 32;
|
|
13279
13314
|
ERASED_FROM = 127;
|
|
@@ -14110,7 +14145,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14110
14145
|
}));
|
|
14111
14146
|
//#endregion
|
|
14112
14147
|
//#region src/tui/render.ts
|
|
14113
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, 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, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, 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, clip, clipHead, clipMiddle, clipPath, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, 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, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14148
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, 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, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, 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, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, 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, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
|
|
14114
14149
|
var init_render = __esmMin((() => {
|
|
14115
14150
|
init_command();
|
|
14116
14151
|
init_patch();
|
|
@@ -14557,8 +14592,9 @@ var init_render = __esmMin((() => {
|
|
|
14557
14592
|
}, []);
|
|
14558
14593
|
return kept.length === 0 ? clipHead(label, room) : `…/${kept.join("/")}`;
|
|
14559
14594
|
};
|
|
14595
|
+
INDENT_MAX = 3;
|
|
14560
14596
|
treeLabel = (state, row, room) => {
|
|
14561
|
-
const indent = " ".repeat(row.depth);
|
|
14597
|
+
const indent = " ".repeat(Math.min(row.depth, INDENT_MAX));
|
|
14562
14598
|
if (row.kind === "file") {
|
|
14563
14599
|
const lead = `${indent} ${marks().file} `;
|
|
14564
14600
|
return `${lead}${clipMiddle(row.name, Math.max(4, room - lead.length))}`;
|
|
@@ -15513,7 +15549,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
15513
15549
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
15514
15550
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
15515
15551
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
15516
|
-
})), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15552
|
+
})), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15517
15553
|
var init_app = __esmMin((() => {
|
|
15518
15554
|
init_dist();
|
|
15519
15555
|
init_report();
|
|
@@ -16500,6 +16536,7 @@ var init_app = __esmMin((() => {
|
|
|
16500
16536
|
anchorRow: state.cursor
|
|
16501
16537
|
});
|
|
16502
16538
|
settledPath = (path) => promise(() => realpath(path).catch(() => resolve(path)));
|
|
16539
|
+
missing = (branch, found) => branch !== void 0 && isNone(found) ? `no worktree here is on ${branch}` : "";
|
|
16503
16540
|
openingOn = (branches, branch) => {
|
|
16504
16541
|
if (branch === void 0) return none();
|
|
16505
16542
|
const at = branches.findIndex((candidate) => candidate.branch === branch);
|
|
@@ -16515,6 +16552,7 @@ var init_app = __esmMin((() => {
|
|
|
16515
16552
|
const repo = yield* settledPath(asked);
|
|
16516
16553
|
const branches = yield* listBranches(repo);
|
|
16517
16554
|
const asOpened = openingOn(branches, options.branch);
|
|
16555
|
+
const missed = missing(options.branch, asOpened);
|
|
16518
16556
|
const resume = isSome(asOpened) ? asOpened : sessionPath === void 0 ? none() : yield* readSession(sessionPath);
|
|
16519
16557
|
const store = yield* Store;
|
|
16520
16558
|
const settings = yield* store.settings;
|
|
@@ -16526,7 +16564,8 @@ var init_app = __esmMin((() => {
|
|
|
16526
16564
|
...initialState(branches),
|
|
16527
16565
|
wrap,
|
|
16528
16566
|
sticky,
|
|
16529
|
-
waiting
|
|
16567
|
+
waiting,
|
|
16568
|
+
notice: missed
|
|
16530
16569
|
});
|
|
16531
16570
|
const painting = yield* forkDetach(runForEach(changes(state), display.paint));
|
|
16532
16571
|
const intents = yield* unbounded();
|
|
@@ -16562,7 +16601,10 @@ var init_app = __esmMin((() => {
|
|
|
16562
16601
|
runTui = fn("Tui.run")(function* (repo, sessionPath, branch) {
|
|
16563
16602
|
const renderer = yield* promise(() => createCliRenderer({
|
|
16564
16603
|
exitOnCtrlC: true,
|
|
16565
|
-
useKittyKeyboard: {
|
|
16604
|
+
useKittyKeyboard: {
|
|
16605
|
+
events: true,
|
|
16606
|
+
allKeysAsEscapes: true
|
|
16607
|
+
}
|
|
16566
16608
|
}));
|
|
16567
16609
|
yield* ensuring(runOn(repo, renderer, sessionPath, branch), sync(() => renderer.destroy()));
|
|
16568
16610
|
});
|
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.78",
|
|
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": {
|