@eliya-oss/agent-diff 0.1.0-alpha.76 → 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 +16 -0
- package/dist/main.js +152 -97
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
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
|
+
|
|
13
|
+
## 0.1.0-alpha.77
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Copying reaches the clipboard inside tmux and screen, and on Linux and Windows rather than only on a Mac. The terminal is handed back if the review fails to open. The parser the diff is coloured by is shut down with the screen.
|
|
18
|
+
|
|
3
19
|
## 0.1.0-alpha.76
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -2565,7 +2565,7 @@ var CurrentStackFrame, TracerEnabled, TracerTimingEnabled, TracerSpanAnnotations
|
|
|
2565
2565
|
};
|
|
2566
2566
|
};
|
|
2567
2567
|
spanCleaner = /*#__PURE__*/ makeStackCleaner(3);
|
|
2568
|
-
})), Interrupt, causeInterrupt, findFail, findError$1, hasInterrupts, causeFilterInterruptors, causeCombine, causeMap, causePartition, causeSquash, causePrettyErrors, causePrettyError, causePrettyMessage, locationRegExp, cleanErrorStack, addStackAnnotations, interruptCauseStack, currentStackTrace, causePretty, renderPrettyError, renderErrorCause, FiberTypeId, fiberVariance, fiberIdStore, getCurrentFiber, FiberImpl, deferredInterruptCont, fiberMiddleware, fiberStackAnnotations, fiberAwait, fiberAwaitAll, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$2, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die, failSync, void_$2, try_$1, promise$1, tryPromise$1, withFiberId, callbackOptions, asyncFinalizer, callback$2, never, gen$1, fnUntraced$1, defineFunctionLength, fnStackCleaner, fn$1, makeFn, fnUntracedEager$1, fromIteratorEagerUnsafe, fromIteratorUnsafe, as$1, asSome, andThen$1, tap$1, asVoid$1, raceAllFirst, raceFirst$1, flatMap$1, OnSuccessProto, effectIsExit, flatMapEager$1, map$2, mapEager$1, exitInterrupt$1, exitIsSuccess, exitFilterCause, exitVoid, exitMap, exitAsVoidAll, updateContext, updateService, contextWith$1, provideContext, provideService, provideServiceImpl, when$1, forever$1, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchIf, catchTag$1, mapError$1, orElseSucceed$1, ignore$1, option$2, matchCauseEffect, OnSuccessAndFailureProto, matchEffect, match, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scopedWith, acquireRelease$1, onExitPrimitive, onExit$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, interrupt$2, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, forkUnsafe$1, forkDetach$1, forkIn$1, runForkWith, runFork$1, runPromiseExitWith, runPromiseWith, runPromise$1, runSyncExitWith, runSyncExit$1, runSyncWith, runSync$1, succeedTrue, succeedFalse, Latch, makeLatchUnsafe, bigint0, NoopSpanProto, noopSpan, filterDisablePropagation, makeSpanUnsafe, provideSpanStackFrame, endSpan, useSpan, provideParentSpan, withParentSpan, withSpan$1, ClockRef, MAX_TIMER_MILLIS, ClockImpl, nanosPerMilli, monotonicNowNanos, wallTimeNanos, clockWith, sleep$1, AsyncFiberErrorTypeId, AsyncFiberError, UnknownErrorTypeId, UnknownError, ConsoleRef, logLevelToOrder, LogLevelOrder, isLogLevelGreaterThan, CurrentLoggers, LogToStderr, LoggerTypeId, LoggerProto, loggerMake, formatLabel, formatLogSpan, logWithLevel, colors, defaultDateFormat, defaultLogger, tracerLogger, init_effect = __esmMin((() => {
|
|
2568
|
+
})), Interrupt, causeInterrupt, findFail, findError$1, hasInterrupts, causeFilterInterruptors, causeCombine, causeMap, causePartition, causeSquash, causePrettyErrors, causePrettyError, causePrettyMessage, locationRegExp, cleanErrorStack, addStackAnnotations, interruptCauseStack, currentStackTrace, causePretty, renderPrettyError, renderErrorCause, FiberTypeId, fiberVariance, fiberIdStore, getCurrentFiber, FiberImpl, deferredInterruptCont, fiberMiddleware, fiberStackAnnotations, fiberAwait, fiberAwaitAll, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$2, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die, failSync, void_$2, try_$1, promise$1, tryPromise$1, withFiberId, callbackOptions, asyncFinalizer, callback$2, never, gen$1, fnUntraced$1, defineFunctionLength, fnStackCleaner, fn$1, makeFn, fnUntracedEager$1, fromIteratorEagerUnsafe, fromIteratorUnsafe, as$1, asSome, andThen$1, tap$1, asVoid$1, raceAllFirst, raceFirst$1, flatMap$1, OnSuccessProto, effectIsExit, flatMapEager$1, map$2, mapEager$1, exitInterrupt$1, exitIsSuccess, exitFilterCause, exitVoid, exitMap, exitAsVoidAll, updateContext, updateService, contextWith$1, provideContext, provideService, provideServiceImpl, when$1, forever$1, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchIf, catchTag$1, mapError$1, orElseSucceed$1, ignore$1, option$2, matchCauseEffect, OnSuccessAndFailureProto, matchEffect, match, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scopedWith, acquireRelease$1, onExitPrimitive, onExit$1, ensuring$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, interrupt$2, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, forkUnsafe$1, forkDetach$1, forkIn$1, runForkWith, runFork$1, runPromiseExitWith, runPromiseWith, runPromise$1, runSyncExitWith, runSyncExit$1, runSyncWith, runSync$1, succeedTrue, succeedFalse, Latch, makeLatchUnsafe, bigint0, NoopSpanProto, noopSpan, filterDisablePropagation, makeSpanUnsafe, provideSpanStackFrame, endSpan, useSpan, provideParentSpan, withParentSpan, withSpan$1, ClockRef, MAX_TIMER_MILLIS, ClockImpl, nanosPerMilli, monotonicNowNanos, wallTimeNanos, clockWith, sleep$1, AsyncFiberErrorTypeId, AsyncFiberError, UnknownErrorTypeId, UnknownError, ConsoleRef, logLevelToOrder, LogLevelOrder, isLogLevelGreaterThan, CurrentLoggers, LogToStderr, LoggerTypeId, LoggerProto, loggerMake, formatLabel, formatLogSpan, logWithLevel, colors, defaultDateFormat, defaultLogger, tracerLogger, init_effect = __esmMin((() => {
|
|
2569
2569
|
init_Array();
|
|
2570
2570
|
init_Context();
|
|
2571
2571
|
init_Duration();
|
|
@@ -3517,6 +3517,7 @@ var CurrentStackFrame, TracerEnabled, TracerTimingEnabled, TracerSpanAnnotations
|
|
|
3517
3517
|
}
|
|
3518
3518
|
});
|
|
3519
3519
|
onExit$1 = /*#__PURE__*/ dual(2, onExitPrimitive);
|
|
3520
|
+
ensuring$1 = /*#__PURE__*/ dual(2, (self, finalizer) => onExit$1(self, (_) => finalizer));
|
|
3520
3521
|
onExitFilter = /*#__PURE__*/ dual(3, (self, filter, f) => onExit$1(self, (exit) => {
|
|
3521
3522
|
const b = filter(exit);
|
|
3522
3523
|
return isFailure(b) ? void_$2 : f(b.success, exit);
|
|
@@ -4414,7 +4415,7 @@ var init_Pull = __esmMin((() => {
|
|
|
4414
4415
|
init_effect();
|
|
4415
4416
|
provideLayer = (self, layer, options) => scopedWith((scope) => flatMap$1(options?.local ? buildWithMemoMap(layer, makeMemoMapUnsafe(), scope) : buildWithScope(layer, scope), (context) => provideContext(self, context)));
|
|
4416
4417
|
provide$1 = /*#__PURE__*/ dual((args) => isEffect(args[0]), (self, source, options) => isContext(source) ? provideContext(self, source) : provideLayer(self, Array.isArray(source) ? mergeAll(...source) : source, options));
|
|
4417
|
-
})), forEach, whileLoop, promise, tryPromise, succeed$1, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, try_, withFiber, flatMap, andThen, tap, option$1, exit, map, as, asVoid, catchTag, catchCause, mapError, ignore, orElseSucceed, sleep, raceFirst, when, contextWith, provide, acquireRelease, onError, onExit, interrupt$1, onInterrupt, uninterruptible, forever, withSpan, forkIn, forkDetach, runFork, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, flatMapEager, fnUntracedEager;
|
|
4418
|
+
})), forEach, whileLoop, promise, tryPromise, succeed$1, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, try_, withFiber, flatMap, andThen, tap, option$1, exit, map, as, asVoid, catchTag, catchCause, mapError, ignore, orElseSucceed, sleep, raceFirst, when, contextWith, provide, acquireRelease, ensuring, onError, onExit, interrupt$1, onInterrupt, uninterruptible, forever, withSpan, forkIn, forkDetach, runFork, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, flatMapEager, fnUntracedEager;
|
|
4418
4419
|
var init_Effect = __esmMin((() => {
|
|
4419
4420
|
init_Context();
|
|
4420
4421
|
init_core();
|
|
@@ -4454,6 +4455,7 @@ var init_Effect = __esmMin((() => {
|
|
|
4454
4455
|
contextWith = contextWith$1;
|
|
4455
4456
|
provide = provide$1;
|
|
4456
4457
|
acquireRelease = acquireRelease$1;
|
|
4458
|
+
ensuring = ensuring$1;
|
|
4457
4459
|
onError = onError$1;
|
|
4458
4460
|
onExit = onExit$1;
|
|
4459
4461
|
interrupt$1 = interrupt$2;
|
|
@@ -4498,16 +4500,16 @@ var init_annotations = __esmMin((() => {
|
|
|
4498
4500
|
}));
|
|
4499
4501
|
//#endregion
|
|
4500
4502
|
//#region node_modules/.pnpm/effect@4.0.0-rc.110/node_modules/effect/dist/internal/schema/parser.js
|
|
4501
|
-
var missing$
|
|
4503
|
+
var missing$2, succeed, missingExit, sameExit, toOption, fromOptionExit;
|
|
4502
4504
|
var init_parser = __esmMin((() => {
|
|
4503
4505
|
init_Exit();
|
|
4504
4506
|
init_Option();
|
|
4505
4507
|
init_core();
|
|
4506
|
-
missing$
|
|
4508
|
+
missing$2 = /*#__PURE__*/ Symbol();
|
|
4507
4509
|
succeed = succeed$4;
|
|
4508
|
-
missingExit = /*#__PURE__*/ succeed(missing$
|
|
4509
|
-
sameExit = /*#__PURE__*/ succeed(missing$
|
|
4510
|
-
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);
|
|
4511
4513
|
fromOptionExit = (option) => option._tag === "None" ? missingExit : succeed(option.value);
|
|
4512
4514
|
}));
|
|
4513
4515
|
//#endregion
|
|
@@ -4697,7 +4699,7 @@ var init_SchemaIssue = __esmMin((() => {
|
|
|
4697
4699
|
Base$1 = class {
|
|
4698
4700
|
[TypeId$9] = TypeId$9;
|
|
4699
4701
|
constructor(input, options) {
|
|
4700
|
-
if (options?.reportInput === true && input !== missing$
|
|
4702
|
+
if (options?.reportInput === true && input !== missing$2) this.input = input;
|
|
4701
4703
|
}
|
|
4702
4704
|
};
|
|
4703
4705
|
Filter$1 = class extends Base$1 {
|
|
@@ -5683,14 +5685,14 @@ function containsUndefined(ast) {
|
|
|
5683
5685
|
function fromConst(ast, value) {
|
|
5684
5686
|
const succeed$9 = succeed(value);
|
|
5685
5687
|
return (input, options) => {
|
|
5686
|
-
if (input === missing$
|
|
5688
|
+
if (input === missing$2) return missingExit;
|
|
5687
5689
|
if (input === value) return succeed$9;
|
|
5688
5690
|
return fail(new InvalidType(ast, input, options));
|
|
5689
5691
|
};
|
|
5690
5692
|
}
|
|
5691
5693
|
function fromRefinement(ast, refinement) {
|
|
5692
5694
|
return (input, options) => {
|
|
5693
|
-
if (input === missing$
|
|
5695
|
+
if (input === missing$2) return missingExit;
|
|
5694
5696
|
if (refinement(input)) return sameExit;
|
|
5695
5697
|
return fail(new InvalidType(ast, input, options));
|
|
5696
5698
|
};
|
|
@@ -5962,7 +5964,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
5962
5964
|
return rest[0];
|
|
5963
5965
|
}
|
|
5964
5966
|
return fnUntracedEager(function* (input, options) {
|
|
5965
|
-
if (input === missing$
|
|
5967
|
+
if (input === missing$2) return missing$2;
|
|
5966
5968
|
if (!Array.isArray(input)) return yield* fail(new InvalidType(ast, input, options));
|
|
5967
5969
|
if (!elements) {
|
|
5968
5970
|
elements = ast.elements.map((ast) => ({
|
|
@@ -6022,13 +6024,13 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6022
6024
|
};
|
|
6023
6025
|
parseArray = /*#__PURE__*/ iterateEager()({
|
|
6024
6026
|
onItem(s, item, i) {
|
|
6025
|
-
const value = i < s.len ? item : missing$
|
|
6027
|
+
const value = i < s.len ? item : missing$2;
|
|
6026
6028
|
return s.getParser(s.tailThreshold, i).parser(value, s.options);
|
|
6027
6029
|
},
|
|
6028
6030
|
step(s, item, exit, i) {
|
|
6029
6031
|
if (exit._tag === "Failure") return wrapPropertyKeyIssue(s, s.ast, i, exit);
|
|
6030
6032
|
const value = exit === sameExit ? item : exit[args];
|
|
6031
|
-
if (value !== missing$
|
|
6033
|
+
if (value !== missing$2) s.output[i] = value;
|
|
6032
6034
|
else {
|
|
6033
6035
|
const p = s.getParser(s.tailThreshold, i);
|
|
6034
6036
|
if (isOptional(p.ast)) return;
|
|
@@ -6098,7 +6100,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6098
6100
|
const finishIndex = (s, key, k2, inputValue, exitValue) => {
|
|
6099
6101
|
if (exitValue._tag === "Failure") return wrapPropertyKeyIssue(s, ast, key, exitValue) ?? void_$1;
|
|
6100
6102
|
const value = exitValue === sameExit ? inputValue : exitValue[args];
|
|
6101
|
-
if (k2 !== missing$
|
|
6103
|
+
if (k2 !== missing$2 && value !== missing$2) {
|
|
6102
6104
|
if (hasProperties && (expectedKeysSet.has(key) || expectedKeysSet.has(k2))) return void_$1;
|
|
6103
6105
|
assignProperty(s.out, k2, value);
|
|
6104
6106
|
}
|
|
@@ -6126,7 +6128,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6126
6128
|
step: (_s, _, exit) => exit._tag === "Failure" ? exit : void 0
|
|
6127
6129
|
}) : void 0;
|
|
6128
6130
|
return fnUntracedEager(function* (input, options) {
|
|
6129
|
-
if (input === missing$
|
|
6131
|
+
if (input === missing$2) return missing$2;
|
|
6130
6132
|
if (!(typeof input === "object" && input !== null && !Array.isArray(input))) return yield* fail(new InvalidType(ast, input, options));
|
|
6131
6133
|
if (!properties) {
|
|
6132
6134
|
properties = ast.propertySignatures.map((ps) => ({
|
|
@@ -6232,7 +6234,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6232
6234
|
};
|
|
6233
6235
|
parseProperties = /*#__PURE__*/ iterateEager()({
|
|
6234
6236
|
onItem(s, p) {
|
|
6235
|
-
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);
|
|
6236
6238
|
const value = s.input[p.name];
|
|
6237
6239
|
assignProperty(s.out, p.name, value);
|
|
6238
6240
|
return p.parser(value, s.options);
|
|
@@ -6241,7 +6243,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6241
6243
|
if (exit._tag === "Failure") return wrapPropertyKeyIssue(s, s.ast, p.name, exit);
|
|
6242
6244
|
if (exit === sameExit) return;
|
|
6243
6245
|
const value = exit[args];
|
|
6244
|
-
if (value !== missing$
|
|
6246
|
+
if (value !== missing$2) {
|
|
6245
6247
|
assignProperty(s.out, p.name, value);
|
|
6246
6248
|
return;
|
|
6247
6249
|
}
|
|
@@ -6282,7 +6284,7 @@ var init_SchemaAST = __esmMin((() => {
|
|
|
6282
6284
|
getParser(compile, compileConstructorDefault) {
|
|
6283
6285
|
const ast = this;
|
|
6284
6286
|
return (input, options) => {
|
|
6285
|
-
if (input === missing$
|
|
6287
|
+
if (input === missing$2) return missingExit;
|
|
6286
6288
|
const candidates = getCandidates(input, ast.types, compileConstructorDefault !== void 0);
|
|
6287
6289
|
if (candidates.length === 1) {
|
|
6288
6290
|
const result = compile(candidates[0])(input, options);
|
|
@@ -7467,7 +7469,7 @@ function runWithCompiler(compiler, ast) {
|
|
|
7467
7469
|
const result = (parser ??= compiler(ast))(input, options ?? defaultParseOptions);
|
|
7468
7470
|
if (result === sameExit) return succeed$1(input);
|
|
7469
7471
|
if (!effectIsExit(result)) return flatMapEager(result, getValue);
|
|
7470
|
-
return result[args] === missing$
|
|
7472
|
+
return result[args] === missing$2 ? getValue(missing$2) : result;
|
|
7471
7473
|
};
|
|
7472
7474
|
}
|
|
7473
7475
|
function compileConstructorDefault(ast) {
|
|
@@ -7485,7 +7487,7 @@ function applyTransformation(result, current, transformation, options) {
|
|
|
7485
7487
|
function makeConstructorParser(descriptor, compile) {
|
|
7486
7488
|
let sourceParser;
|
|
7487
7489
|
return (input, options) => {
|
|
7488
|
-
if (input === missing$
|
|
7490
|
+
if (input === missing$2) return missingExit;
|
|
7489
7491
|
if (descriptor.isConstructed(input)) return sameExit;
|
|
7490
7492
|
return applyTransformation((sourceParser ??= compile(descriptor.link.to))(input, options), input, descriptor.link.transformation, options);
|
|
7491
7493
|
};
|
|
@@ -7507,13 +7509,13 @@ function makeParser(ast, compile, compileConstructorDefault, constructorDefault)
|
|
|
7507
7509
|
if (encodingChecks && !options.disableChecks) if (effectIsExit(result)) {
|
|
7508
7510
|
if (result._tag === "Success") {
|
|
7509
7511
|
const output = result === sameExit ? input : result[args];
|
|
7510
|
-
if (input !== missing$
|
|
7512
|
+
if (input !== missing$2 && output !== missing$2) {
|
|
7511
7513
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
7512
7514
|
if (issues) result = fail(new Composite(ast, issues, input, options));
|
|
7513
7515
|
}
|
|
7514
7516
|
}
|
|
7515
7517
|
} else result = flatMap(result, (value) => {
|
|
7516
|
-
if (input !== missing$
|
|
7518
|
+
if (input !== missing$2 && value !== missing$2) {
|
|
7517
7519
|
const issues = collectIssues(encodingChecks, input, void 0, ast, options);
|
|
7518
7520
|
if (issues) return fail(new Composite(ast, issues, input, options));
|
|
7519
7521
|
}
|
|
@@ -7522,12 +7524,12 @@ function makeParser(ast, compile, compileConstructorDefault, constructorDefault)
|
|
|
7522
7524
|
if (checks && !options.disableChecks) if (effectIsExit(result)) {
|
|
7523
7525
|
if (result._tag === "Success") {
|
|
7524
7526
|
const value = result === sameExit ? input : result[args];
|
|
7525
|
-
if (value === missing$
|
|
7527
|
+
if (value === missing$2) return result;
|
|
7526
7528
|
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
7527
7529
|
if (issues) result = fail(new Composite(ast, issues, value, options));
|
|
7528
7530
|
}
|
|
7529
7531
|
} else result = flatMap(result, (value) => {
|
|
7530
|
-
if (value !== missing$
|
|
7532
|
+
if (value !== missing$2) {
|
|
7531
7533
|
const issues = collectIssues(checks, value, void 0, ast, options);
|
|
7532
7534
|
if (issues) return fail(new Composite(ast, issues, value, options));
|
|
7533
7535
|
}
|
|
@@ -7583,7 +7585,7 @@ var init_SchemaParser = __esmMin((() => {
|
|
|
7583
7585
|
...overrideOptions
|
|
7584
7586
|
} : options;
|
|
7585
7587
|
getValue = (value) => {
|
|
7586
|
-
if (value === missing$
|
|
7588
|
+
if (value === missing$2) return fail(new InvalidValue());
|
|
7587
7589
|
return succeed$1(value);
|
|
7588
7590
|
};
|
|
7589
7591
|
normalCompiler = /*#__PURE__*/ memoize((ast) => makeParser(ast, normalCompiler));
|
|
@@ -8724,7 +8726,7 @@ var init_paths = __esmMin((() => {
|
|
|
8724
8726
|
upgradePath = (root) => join(root, "upgrade.json");
|
|
8725
8727
|
reportsDir = (root) => join(root, "reports");
|
|
8726
8728
|
reportPath = (root, stamp) => join(reportsDir(root), `${stamp}.md`);
|
|
8727
|
-
})), 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;
|
|
8728
8730
|
var init_service$1 = __esmMin((() => {
|
|
8729
8731
|
init_dist();
|
|
8730
8732
|
init_error$2();
|
|
@@ -8748,9 +8750,9 @@ var init_service$1 = __esmMin((() => {
|
|
|
8748
8750
|
path,
|
|
8749
8751
|
reason: String(cause)
|
|
8750
8752
|
})
|
|
8751
|
-
}).pipe(map(some), catchTag("StoreUnreadable", () => missing));
|
|
8753
|
+
}).pipe(map(some), catchTag("StoreUnreadable", () => missing$1));
|
|
8752
8754
|
});
|
|
8753
|
-
missing = succeed$1(none());
|
|
8755
|
+
missing$1 = succeed$1(none());
|
|
8754
8756
|
damaged = (path) => (reason) => new StoreUnreadable({
|
|
8755
8757
|
path,
|
|
8756
8758
|
reason: String(reason)
|
|
@@ -9049,7 +9051,7 @@ var init_error$1 = __esmMin((() => {
|
|
|
9049
9051
|
}));
|
|
9050
9052
|
//#endregion
|
|
9051
9053
|
//#region src/cli/commands.ts
|
|
9052
|
-
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;
|
|
9053
9055
|
var init_commands = __esmMin((() => {
|
|
9054
9056
|
init_dist();
|
|
9055
9057
|
init_patch();
|
|
@@ -9157,31 +9159,31 @@ var init_commands = __esmMin((() => {
|
|
|
9157
9159
|
})
|
|
9158
9160
|
};
|
|
9159
9161
|
});
|
|
9160
|
-
|
|
9162
|
+
AT_ONCE = 8;
|
|
9163
|
+
summaryOf = fn("Cli.summaryOf")(function* (repo, found, base) {
|
|
9161
9164
|
const git = yield* Git;
|
|
9162
|
-
const
|
|
9163
|
-
const
|
|
9164
|
-
|
|
9165
|
-
|
|
9166
|
-
|
|
9167
|
-
|
|
9168
|
-
|
|
9169
|
-
|
|
9170
|
-
|
|
9171
|
-
|
|
9172
|
-
|
|
9173
|
-
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
|
|
9177
|
-
|
|
9178
|
-
|
|
9179
|
-
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
|
|
9183
|
-
}
|
|
9184
|
-
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);
|
|
9185
9187
|
});
|
|
9186
9188
|
blobOf = (patches, file) => map$4(findPatch(patches, file), (patch) => patch.blob);
|
|
9187
9189
|
toggleVouch = fn("Cli.toggleVouch")(function* (request) {
|
|
@@ -9661,7 +9663,7 @@ var init_pane = __esmMin((() => {
|
|
|
9661
9663
|
init_commands();
|
|
9662
9664
|
init_init();
|
|
9663
9665
|
init_pane();
|
|
9664
|
-
var version$1 = "0.1.0-alpha.
|
|
9666
|
+
var version$1 = "0.1.0-alpha.78";
|
|
9665
9667
|
//#endregion
|
|
9666
9668
|
//#region src/cli/upgrade.ts
|
|
9667
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;
|
|
@@ -11394,7 +11396,7 @@ var init_tree = __esmMin((() => {
|
|
|
11394
11396
|
return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
|
|
11395
11397
|
};
|
|
11396
11398
|
crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
|
|
11397
|
-
})), 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;
|
|
11398
11400
|
var init_model = __esmMin((() => {
|
|
11399
11401
|
init_dist();
|
|
11400
11402
|
init_patch();
|
|
@@ -11429,7 +11431,6 @@ var init_model = __esmMin((() => {
|
|
|
11429
11431
|
anchorRow: 0,
|
|
11430
11432
|
selecting: false,
|
|
11431
11433
|
draft: "",
|
|
11432
|
-
caret: 0,
|
|
11433
11434
|
notice: "",
|
|
11434
11435
|
waiting: "",
|
|
11435
11436
|
query: "",
|
|
@@ -11462,6 +11463,7 @@ var init_model = __esmMin((() => {
|
|
|
11462
11463
|
rail: "tree"
|
|
11463
11464
|
});
|
|
11464
11465
|
TREE_MAX = 34;
|
|
11466
|
+
TREE_ROOMY = 40;
|
|
11465
11467
|
TREE_MIN = 18;
|
|
11466
11468
|
TREE_SHARE = .3;
|
|
11467
11469
|
DIFF_MIN = 26;
|
|
@@ -11469,7 +11471,8 @@ var init_model = __esmMin((() => {
|
|
|
11469
11471
|
bodyRoom = (columns) => Math.max(0, columns - 2);
|
|
11470
11472
|
treeWidth = (columns) => {
|
|
11471
11473
|
const room = bodyRoom(columns);
|
|
11472
|
-
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)));
|
|
11473
11476
|
return Math.max(0, Math.min(wanted, room - DIFF_MIN));
|
|
11474
11477
|
};
|
|
11475
11478
|
reviewWidth = () => 36;
|
|
@@ -11901,6 +11904,10 @@ var init_model = __esmMin((() => {
|
|
|
11901
11904
|
}
|
|
11902
11905
|
return starts;
|
|
11903
11906
|
};
|
|
11907
|
+
openingRow = (state, patchIndex) => {
|
|
11908
|
+
const at = (state.patches[patchIndex]?.rows ?? []).findIndex((row) => carriesLine(row));
|
|
11909
|
+
return at === -1 ? 0 : at;
|
|
11910
|
+
};
|
|
11904
11911
|
changeAround = (state) => {
|
|
11905
11912
|
const rows = selectedPatch(state)?.rows ?? [];
|
|
11906
11913
|
const changed = (at) => {
|
|
@@ -11920,7 +11927,7 @@ var init_model = __esmMin((() => {
|
|
|
11920
11927
|
return [...order.slice(start + 1), ...order.slice(0, start + 1)].find((index) => !isReviewed(state, index));
|
|
11921
11928
|
};
|
|
11922
11929
|
reviewedCount = (state) => `${state.vouched.length}/${state.patches.length} reviewed`;
|
|
11923
|
-
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]);
|
|
11924
11931
|
layerFile = (state, delta) => {
|
|
11925
11932
|
const order = fileOrder(state);
|
|
11926
11933
|
const position = order.indexOf(state.patchIndex);
|
|
@@ -12650,7 +12657,7 @@ var init_match = __esmMin((() => {
|
|
|
12650
12657
|
}));
|
|
12651
12658
|
//#endregion
|
|
12652
12659
|
//#region src/tui/reduce.ts
|
|
12653
|
-
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;
|
|
12654
12661
|
var init_reduce = __esmMin((() => {
|
|
12655
12662
|
init_dist();
|
|
12656
12663
|
init_patch();
|
|
@@ -12898,11 +12905,30 @@ var init_reduce = __esmMin((() => {
|
|
|
12898
12905
|
...state,
|
|
12899
12906
|
branchIndex: clamp(state.branchIndex + delta, 0, Math.max(0, state.branches.length - 1))
|
|
12900
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
|
+
};
|
|
12901
12926
|
moveFile = (state, delta) => ({
|
|
12902
12927
|
...state,
|
|
12928
|
+
closed: revealing(state, layerFile(state, delta)),
|
|
12903
12929
|
patchIndex: layerFile(state, delta),
|
|
12904
12930
|
top: 0,
|
|
12905
|
-
cursor:
|
|
12931
|
+
cursor: landingOn(state, layerFile(state, delta)),
|
|
12906
12932
|
anchorRow: 0,
|
|
12907
12933
|
selecting: false
|
|
12908
12934
|
});
|
|
@@ -12950,7 +12976,6 @@ var init_reduce = __esmMin((() => {
|
|
|
12950
12976
|
...state,
|
|
12951
12977
|
screen: "compose",
|
|
12952
12978
|
draft: "",
|
|
12953
|
-
caret: 0,
|
|
12954
12979
|
anchorRow: state.selecting ? state.anchorRow : state.cursor
|
|
12955
12980
|
};
|
|
12956
12981
|
};
|
|
@@ -12964,8 +12989,7 @@ var init_reduce = __esmMin((() => {
|
|
|
12964
12989
|
if (state.screen === "report") return {
|
|
12965
12990
|
...state,
|
|
12966
12991
|
screen: state.returnTo,
|
|
12967
|
-
draft: ""
|
|
12968
|
-
caret: 0
|
|
12992
|
+
draft: ""
|
|
12969
12993
|
};
|
|
12970
12994
|
if (state.screen === "palette") return {
|
|
12971
12995
|
...state,
|
|
@@ -12980,8 +13004,7 @@ var init_reduce = __esmMin((() => {
|
|
|
12980
13004
|
if (state.screen === "compose") return {
|
|
12981
13005
|
...state,
|
|
12982
13006
|
screen: "review",
|
|
12983
|
-
draft: ""
|
|
12984
|
-
caret: 0
|
|
13007
|
+
draft: ""
|
|
12985
13008
|
};
|
|
12986
13009
|
if (state.selecting) return {
|
|
12987
13010
|
...state,
|
|
@@ -13028,7 +13051,11 @@ var init_reduce = __esmMin((() => {
|
|
|
13028
13051
|
"branch.open": (state) => state,
|
|
13029
13052
|
"branch.pull": (state) => state,
|
|
13030
13053
|
"cursor.next": (state) => layerDown(state, 1),
|
|
13031
|
-
"cursor.top": (state) =>
|
|
13054
|
+
"cursor.top": (state) => ({
|
|
13055
|
+
...atRow(state, landingOn(state, state.patchIndex)),
|
|
13056
|
+
top: 0,
|
|
13057
|
+
scroll: -1
|
|
13058
|
+
}),
|
|
13032
13059
|
"cursor.bottom": (state) => atRow(state, lastRow(selectedPatch(state))),
|
|
13033
13060
|
"cursor.pageDown": (state) => moveCursor(state, Math.max(1, Math.floor(state.viewport / 2))),
|
|
13034
13061
|
"cursor.pageUp": (state) => moveCursor(state, -Math.max(1, Math.floor(state.viewport / 2))),
|
|
@@ -13103,7 +13130,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13103
13130
|
...state,
|
|
13104
13131
|
screen: "report",
|
|
13105
13132
|
draft: "",
|
|
13106
|
-
caret: 0,
|
|
13107
13133
|
returnTo: state.screen
|
|
13108
13134
|
}),
|
|
13109
13135
|
"report.send": (state) => state,
|
|
@@ -13123,8 +13149,9 @@ var init_reduce = __esmMin((() => {
|
|
|
13123
13149
|
reduce = (state, action) => transitions[action](state);
|
|
13124
13150
|
atFile = (state, patchIndex) => ({
|
|
13125
13151
|
...state,
|
|
13152
|
+
closed: revealing(state, patchIndex),
|
|
13126
13153
|
patchIndex,
|
|
13127
|
-
cursor:
|
|
13154
|
+
cursor: landingOn(state, patchIndex),
|
|
13128
13155
|
anchorRow: 0,
|
|
13129
13156
|
selecting: false
|
|
13130
13157
|
});
|
|
@@ -13261,22 +13288,27 @@ var init_reduce = __esmMin((() => {
|
|
|
13261
13288
|
top: clamp(cursor - Math.floor(height / 2), 0, room)
|
|
13262
13289
|
});
|
|
13263
13290
|
};
|
|
13264
|
-
withPatches = (state, patches) =>
|
|
13265
|
-
|
|
13266
|
-
|
|
13267
|
-
patches,
|
|
13268
|
-
full: [],
|
|
13269
|
-
revealed: [],
|
|
13270
|
-
closed: crowdedOf(patches),
|
|
13271
|
-
patchIndex: fileOrder({
|
|
13291
|
+
withPatches = (state, patches) => {
|
|
13292
|
+
const closed = crowdedOf(patches);
|
|
13293
|
+
const opened = {
|
|
13272
13294
|
...state,
|
|
13273
13295
|
patches,
|
|
13274
|
-
closed
|
|
13275
|
-
}
|
|
13276
|
-
|
|
13277
|
-
|
|
13278
|
-
|
|
13279
|
-
|
|
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
|
+
};
|
|
13280
13312
|
TAB_WIDTH = 2;
|
|
13281
13313
|
SPACE_CODE = 32;
|
|
13282
13314
|
ERASED_FROM = 127;
|
|
@@ -13289,8 +13321,7 @@ var init_reduce = __esmMin((() => {
|
|
|
13289
13321
|
legible = (text) => Array.from(text.replace(/\r\n?/g, "\n").replace(/\t/g, " ".repeat(TAB_WIDTH))).filter(readable).join("");
|
|
13290
13322
|
withDraft = (state, draft) => ({
|
|
13291
13323
|
...state,
|
|
13292
|
-
draft
|
|
13293
|
-
caret: draft.length
|
|
13324
|
+
draft
|
|
13294
13325
|
});
|
|
13295
13326
|
paletteMoved = (state, delta) => movePalette(state, delta);
|
|
13296
13327
|
paletteClosed = (state) => ({
|
|
@@ -13318,7 +13349,6 @@ var init_reduce = __esmMin((() => {
|
|
|
13318
13349
|
...state,
|
|
13319
13350
|
screen: "review",
|
|
13320
13351
|
draft: "",
|
|
13321
|
-
caret: 0,
|
|
13322
13352
|
selecting: false,
|
|
13323
13353
|
notice
|
|
13324
13354
|
});
|
|
@@ -14115,7 +14145,7 @@ var init_diffview = __esmMin((() => {
|
|
|
14115
14145
|
}));
|
|
14116
14146
|
//#endregion
|
|
14117
14147
|
//#region src/tui/render.ts
|
|
14118
|
-
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;
|
|
14119
14149
|
var init_render = __esmMin((() => {
|
|
14120
14150
|
init_command();
|
|
14121
14151
|
init_patch();
|
|
@@ -14562,8 +14592,9 @@ var init_render = __esmMin((() => {
|
|
|
14562
14592
|
}, []);
|
|
14563
14593
|
return kept.length === 0 ? clipHead(label, room) : `…/${kept.join("/")}`;
|
|
14564
14594
|
};
|
|
14595
|
+
INDENT_MAX = 3;
|
|
14565
14596
|
treeLabel = (state, row, room) => {
|
|
14566
|
-
const indent = " ".repeat(row.depth);
|
|
14597
|
+
const indent = " ".repeat(Math.min(row.depth, INDENT_MAX));
|
|
14567
14598
|
if (row.kind === "file") {
|
|
14568
14599
|
const lead = `${indent} ${marks().file} `;
|
|
14569
14600
|
return `${lead}${clipMiddle(row.name, Math.max(4, room - lead.length))}`;
|
|
@@ -15518,7 +15549,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
15518
15549
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
15519
15550
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
15520
15551
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
15521
|
-
})), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, handOver, 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;
|
|
15522
15553
|
var init_app = __esmMin((() => {
|
|
15523
15554
|
init_dist();
|
|
15524
15555
|
init_report();
|
|
@@ -15548,9 +15579,23 @@ var init_app = __esmMin((() => {
|
|
|
15548
15579
|
return `${clockOf(elapsed)} ${named.padEnd(16)} ${place.padEnd(16)} row ${String(state.cursor + 1).padStart(5)} ${file}`;
|
|
15549
15580
|
};
|
|
15550
15581
|
noticeOf = (notice, elapsed) => `${clockOf(elapsed)} ${"said".padEnd(16)} ${notice}`;
|
|
15582
|
+
COPIERS = {
|
|
15583
|
+
darwin: ["pbcopy"],
|
|
15584
|
+
linux: [
|
|
15585
|
+
"xclip",
|
|
15586
|
+
"-selection",
|
|
15587
|
+
"clipboard"
|
|
15588
|
+
],
|
|
15589
|
+
win32: ["clip"]
|
|
15590
|
+
};
|
|
15591
|
+
wayland = () => process.env["WAYLAND_DISPLAY"] === void 0 ? void 0 : ["wl-copy"];
|
|
15551
15592
|
handOver = (text) => {
|
|
15552
|
-
if (
|
|
15553
|
-
const
|
|
15593
|
+
if (!process.stdout.isTTY) return;
|
|
15594
|
+
const named = wayland() ?? COPIERS[platform()];
|
|
15595
|
+
if (named === void 0) return;
|
|
15596
|
+
const [command, ...rest] = named;
|
|
15597
|
+
if (command === void 0) return;
|
|
15598
|
+
const pipe = spawn(command, [...rest], { stdio: [
|
|
15554
15599
|
"pipe",
|
|
15555
15600
|
"ignore",
|
|
15556
15601
|
"ignore"
|
|
@@ -15559,9 +15604,13 @@ var init_app = __esmMin((() => {
|
|
|
15559
15604
|
pipe.stdin.on("error", () => void 0);
|
|
15560
15605
|
pipe.stdin.end(text);
|
|
15561
15606
|
};
|
|
15607
|
+
throughMultiplexer = (sequence) => {
|
|
15608
|
+
if (process.env["TMUX"] !== void 0) return `\u001BPtmux;\u001B${sequence}\u001B\\`;
|
|
15609
|
+
return process.env["STY"] === void 0 ? sequence : `\u001BP${sequence}\u001B\\`;
|
|
15610
|
+
};
|
|
15562
15611
|
copyToClipboard = (text) => {
|
|
15563
15612
|
const encoded = Buffer.from(text, "utf8").toString("base64");
|
|
15564
|
-
process.stdout.write(`\u001B]52;c;${encoded}\u0007`);
|
|
15613
|
+
process.stdout.write(throughMultiplexer(`\u001B]52;c;${encoded}\u0007`));
|
|
15565
15614
|
handOver(text);
|
|
15566
15615
|
};
|
|
15567
15616
|
lineUnder = (state) => {
|
|
@@ -15651,6 +15700,7 @@ var init_app = __esmMin((() => {
|
|
|
15651
15700
|
renderer.on("destroy", () => this.stopWatching());
|
|
15652
15701
|
renderer.on("destroy", () => this.stopFading());
|
|
15653
15702
|
renderer.on("destroy", () => this.stopLighting());
|
|
15703
|
+
renderer.on("destroy", () => void getTreeSitterClient().destroy());
|
|
15654
15704
|
renderer.on("destroy", () => this.stopPainting());
|
|
15655
15705
|
renderer.on("destroy", () => this.stopConsuming());
|
|
15656
15706
|
renderer.on("frame", () => this.syncGeometry());
|
|
@@ -16445,8 +16495,7 @@ var init_app = __esmMin((() => {
|
|
|
16445
16495
|
const closed = {
|
|
16446
16496
|
...this.state,
|
|
16447
16497
|
screen: this.state.returnTo,
|
|
16448
|
-
draft: ""
|
|
16449
|
-
caret: 0
|
|
16498
|
+
draft: ""
|
|
16450
16499
|
};
|
|
16451
16500
|
this.commit(withNotice(closed, `report copied — ${path}`));
|
|
16452
16501
|
});
|
|
@@ -16469,7 +16518,7 @@ var init_app = __esmMin((() => {
|
|
|
16469
16518
|
side: anchor.value.side,
|
|
16470
16519
|
start: anchor.value.start,
|
|
16471
16520
|
end: anchor.value.end,
|
|
16472
|
-
body: this.
|
|
16521
|
+
body: yield* this.display.written,
|
|
16473
16522
|
id: randomUUID(),
|
|
16474
16523
|
at: (/* @__PURE__ */ new Date()).toISOString()
|
|
16475
16524
|
});
|
|
@@ -16487,6 +16536,7 @@ var init_app = __esmMin((() => {
|
|
|
16487
16536
|
anchorRow: state.cursor
|
|
16488
16537
|
});
|
|
16489
16538
|
settledPath = (path) => promise(() => realpath(path).catch(() => resolve(path)));
|
|
16539
|
+
missing = (branch, found) => branch !== void 0 && isNone(found) ? `no worktree here is on ${branch}` : "";
|
|
16490
16540
|
openingOn = (branches, branch) => {
|
|
16491
16541
|
if (branch === void 0) return none();
|
|
16492
16542
|
const at = branches.findIndex((candidate) => candidate.branch === branch);
|
|
@@ -16502,6 +16552,7 @@ var init_app = __esmMin((() => {
|
|
|
16502
16552
|
const repo = yield* settledPath(asked);
|
|
16503
16553
|
const branches = yield* listBranches(repo);
|
|
16504
16554
|
const asOpened = openingOn(branches, options.branch);
|
|
16555
|
+
const missed = missing(options.branch, asOpened);
|
|
16505
16556
|
const resume = isSome(asOpened) ? asOpened : sessionPath === void 0 ? none() : yield* readSession(sessionPath);
|
|
16506
16557
|
const store = yield* Store;
|
|
16507
16558
|
const settings = yield* store.settings;
|
|
@@ -16513,7 +16564,8 @@ var init_app = __esmMin((() => {
|
|
|
16513
16564
|
...initialState(branches),
|
|
16514
16565
|
wrap,
|
|
16515
16566
|
sticky,
|
|
16516
|
-
waiting
|
|
16567
|
+
waiting,
|
|
16568
|
+
notice: missed
|
|
16517
16569
|
});
|
|
16518
16570
|
const painting = yield* forkDetach(runForEach(changes(state), display.paint));
|
|
16519
16571
|
const intents = yield* unbounded();
|
|
@@ -16549,9 +16601,12 @@ var init_app = __esmMin((() => {
|
|
|
16549
16601
|
runTui = fn("Tui.run")(function* (repo, sessionPath, branch) {
|
|
16550
16602
|
const renderer = yield* promise(() => createCliRenderer({
|
|
16551
16603
|
exitOnCtrlC: true,
|
|
16552
|
-
useKittyKeyboard: {
|
|
16604
|
+
useKittyKeyboard: {
|
|
16605
|
+
events: true,
|
|
16606
|
+
allKeysAsEscapes: true
|
|
16607
|
+
}
|
|
16553
16608
|
}));
|
|
16554
|
-
yield* runOn(repo, renderer, sessionPath, branch);
|
|
16609
|
+
yield* ensuring(runOn(repo, renderer, sessionPath, branch), sync(() => renderer.destroy()));
|
|
16555
16610
|
});
|
|
16556
16611
|
}));
|
|
16557
16612
|
//#endregion
|
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": {
|