@eliya-oss/agent-diff 0.1.0-alpha.193 → 0.1.0-alpha.194
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 +27 -0
- package/dist/main.js +52 -31
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,32 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.194
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(store): marking several files at the same moment never fails on a half-written review state.
|
|
8
|
+
|
|
9
|
+
<details><summary>What was wrong</summary>
|
|
10
|
+
|
|
11
|
+
adiff wrote the review's state over the old file in place, and marking a file read that state
|
|
12
|
+
before taking the lock. A mark that read it mid-write saw half a file and exited with an error.
|
|
13
|
+
Each write now goes to a file beside it and is renamed into place, so a reader sees the old
|
|
14
|
+
state or the new one, never a mix.
|
|
15
|
+
|
|
16
|
+
</details>
|
|
17
|
+
|
|
18
|
+
- fix(marks): a file marked reviewed stays reviewed when git starts printing longer hashes.
|
|
19
|
+
|
|
20
|
+
<details><summary>What was wrong</summary>
|
|
21
|
+
|
|
22
|
+
git lengthens its short hashes as a repository grows, so the same content printed as `defbbd93c`
|
|
23
|
+
one month prints as `defbbd93c6` the next. adiff compared the hash a mark was made under with the
|
|
24
|
+
one it reads now as plain text, so every older mark lapsed: `review progress` listed the file as
|
|
25
|
+
changed since review with no line changed. Two hashes now count as the same file when one starts
|
|
26
|
+
with the other, and a new mark records the full hash.
|
|
27
|
+
|
|
28
|
+
</details>
|
|
29
|
+
|
|
3
30
|
## 0.1.0-alpha.193
|
|
4
31
|
|
|
5
32
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -2686,7 +2686,7 @@ var init_references = __esmMin((() => {
|
|
|
2686
2686
|
};
|
|
2687
2687
|
};
|
|
2688
2688
|
spanCleaner = /*#__PURE__*/ makeStackCleaner(3);
|
|
2689
|
-
})), Interrupt, causeInterrupt, findFail, findError$1, findDefect, hasInterrupts, causeFilterInterruptors, hasInterruptsOnly$1, 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, fiberJoin, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$1, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die$1, 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$3, mapEager$1, mapErrorEager$1, catchEager$1, exitInterrupt$1, exitIsSuccess, exitIsFailure, exitFilterCause, exitHasInterrupts, exitVoid, exitMap, exitMapError, exitAsVoidAll, updateContext, updateService, context$1, getContext, contextWith$1, provideContext, provideService$1, provideServiceImpl, when$1, forever$2, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchDefect$1, catchIf, catchFilter, catchTag$1, catchTags$1, mapError$1, orDie$1, orElseSucceed$1, ignore$1, option$3, result$1, matchCauseEffect, OnSuccessAndFailureProto, matchEffect$1, match, matchEager, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scoped$1, scopedWith, acquireRelease$1, addFinalizer$2, onExitPrimitive, onExit$1, ensuring$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, acquireUseRelease$1, interrupt$1, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask$1, all$1, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, filter$2, forkUnsafe$1, forkIn$1, forkScoped$1, runForkWith$1, 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((() => {
|
|
2689
|
+
})), Interrupt, causeInterrupt, findFail, findError$1, findDefect, hasInterrupts, causeFilterInterruptors, hasInterruptsOnly$1, 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, fiberJoin, fiberInterrupt, fiberInterruptAs, fiberInterruptAll, succeed$5, failCause$3, fail$2, sync$1, suspend$1, yieldNowWith, yieldNow, succeedNone$1, failCauseSync$1, die$1, 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$3, mapEager$1, mapErrorEager$1, catchEager$1, exitInterrupt$1, exitIsSuccess, exitIsFailure, exitFilterCause, exitHasInterrupts, exitVoid, exitMap, exitMapError, exitAsVoidAll, updateContext, updateService, context$1, getContext, contextWith$1, provideContext, provideService$1, provideServiceImpl, when$1, forever$2, catchCause$1, OnFailureProto, catchCauseFilter, catch_, catchDefect$1, tapCauseFilter, tapError$1, catchIf, catchFilter, catchTag$1, catchTags$1, mapError$1, orDie$1, orElseSucceed$1, ignore$1, option$3, result$1, matchCauseEffect, OnSuccessAndFailureProto, matchEffect$1, match, matchEager, exit$1, exitPrimitive, ScopeTypeId, ScopeCloseableTypeId, scopeTag, scopeClose, scopeCloseUnsafe, scopeCloseFinalizers, scopeForkUnsafe, scopeAddFinalizerExit, scopeAddFinalizer, scopeAddFinalizerUnsafe, scopeRemoveFinalizerUnsafe, scopeMakeUnsafe, constScopeEmpty, scope, provideScope, scoped$1, scopedWith, acquireRelease$1, addFinalizer$2, onExitPrimitive, onExit$1, ensuring$1, onExitFilter, onError$1, onErrorFilter, onInterrupt$1, acquireUseRelease$1, interrupt$1, uninterruptible$1, setInterruptible, setInterruptibleTrue, setInterruptibleFalse, setFiberInterruptible, interruptible, uninterruptibleMask$1, all$1, whileLoop$1, forEach$1, forEachSequential, iterateEagerImpl, iterateEager, forEachConcurrent, filter$2, forkUnsafe$1, forkIn$1, forkScoped$1, runForkWith$1, 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((() => {
|
|
2690
2690
|
init_Array();
|
|
2691
2691
|
init_Context();
|
|
2692
2692
|
init_Duration();
|
|
@@ -3502,6 +3502,12 @@ var init_references = __esmMin((() => {
|
|
|
3502
3502
|
}));
|
|
3503
3503
|
catch_ = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findError$1, (e) => f(e)));
|
|
3504
3504
|
catchDefect$1 = /*#__PURE__*/ dual(2, (self, f) => catchCauseFilter(self, findDefect, f));
|
|
3505
|
+
tapCauseFilter = /*#__PURE__*/ dual(3, (self, filter, f) => catchCause$1(self, (cause) => {
|
|
3506
|
+
const result = filter(cause);
|
|
3507
|
+
if (isFailure$1(result)) return failCause$3(cause);
|
|
3508
|
+
return andThen$1(internalCall(() => f(result.success, cause)), failCause$3(cause));
|
|
3509
|
+
}));
|
|
3510
|
+
tapError$1 = /*#__PURE__*/ dual(2, (self, f) => tapCauseFilter(self, findError$1, (e) => f(e)));
|
|
3505
3511
|
catchIf = /*#__PURE__*/ dual((args) => isEffect$1(args[0]), (self, predicate, f, orElse) => catchCause$1(self, (cause) => {
|
|
3506
3512
|
const error = findError$1(cause);
|
|
3507
3513
|
if (isFailure$1(error)) return failCause$3(error.failure);
|
|
@@ -4807,7 +4813,7 @@ var repeatOrElse, retryOrElse, repeat$1, retry$1, passthroughForever, buildFromO
|
|
|
4807
4813
|
if (options.times !== void 0) schedule = while_(schedule, ({ attempt }) => succeed$5(attempt <= options.times));
|
|
4808
4814
|
return schedule;
|
|
4809
4815
|
};
|
|
4810
|
-
})), isEffect, all, forEach, whileLoop, promise, tryPromise, succeed$1, succeedNone, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, die, try_, withFiber, flatMap, andThen, tap, result, option$2, exit, map$1, as, asVoid, catchTag, catchTags, catchCause, catchDefect, mapError, orDie, retry, ignore, orElseSucceed, sleep, raceFirst, filter$1, when, context, contextWith, provide, provideService, scoped, acquireRelease, acquireUseRelease, addFinalizer, ensuring, onError, onExit, interrupt, onInterrupt, uninterruptible, uninterruptibleMask, forever, repeat, withSpan, forkIn, forkScoped, runFork, runForkWith, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, mapErrorEager, flatMapEager, catchEager, fnUntracedEager;
|
|
4816
|
+
})), isEffect, all, forEach, whileLoop, promise, tryPromise, succeed$1, succeedNone, suspend, sync, void_, callback$1, gen, fail, failCause, failCauseSync, die, try_, withFiber, flatMap, andThen, tap, result, option$2, exit, map$1, as, asVoid, catchTag, catchTags, catchCause, catchDefect, mapError, orDie, tapError, retry, ignore, orElseSucceed, sleep, raceFirst, filter$1, when, context, contextWith, provide, provideService, scoped, acquireRelease, acquireUseRelease, addFinalizer, ensuring, onError, onExit, interrupt, onInterrupt, uninterruptible, uninterruptibleMask, forever, repeat, withSpan, forkIn, forkScoped, runFork, runForkWith, runPromise, runSync, runSyncExit, fnUntraced, fn, mapEager, mapErrorEager, flatMapEager, catchEager, fnUntracedEager;
|
|
4811
4817
|
var init_Effect = __esmMin((() => {
|
|
4812
4818
|
init_Context();
|
|
4813
4819
|
init_core();
|
|
@@ -4848,6 +4854,7 @@ var init_Effect = __esmMin((() => {
|
|
|
4848
4854
|
catchDefect = catchDefect$1;
|
|
4849
4855
|
mapError = mapError$1;
|
|
4850
4856
|
orDie = orDie$1;
|
|
4857
|
+
tapError = tapError$1;
|
|
4851
4858
|
retry = retry$1;
|
|
4852
4859
|
ignore = ignore$1;
|
|
4853
4860
|
orElseSucceed = orElseSucceed$1;
|
|
@@ -10076,7 +10083,7 @@ var init_config = __esmMin((() => {
|
|
|
10076
10083
|
//#region package.json
|
|
10077
10084
|
init_pane();
|
|
10078
10085
|
init_config();
|
|
10079
|
-
var version$1 = "0.1.0-alpha.
|
|
10086
|
+
var version$1 = "0.1.0-alpha.194";
|
|
10080
10087
|
//#endregion
|
|
10081
10088
|
//#region src/cli/error.ts
|
|
10082
10089
|
var UnknownCommand, MissingOption, UnknownField, UnknownOption, BadOption, RegistryUnanswered, NotServed, BadRequest;
|
|
@@ -12663,7 +12670,7 @@ var init_paths = __esmMin((() => {
|
|
|
12663
12670
|
}));
|
|
12664
12671
|
//#endregion
|
|
12665
12672
|
//#region src/service/store/service.ts
|
|
12666
|
-
var Store, ensureDir, readOptional, missing$2, damaged, jsonOf$2, decoded, unwritable, wrote, added$1, INDENT, DRAFTS_VERSION, encoded, writes, appends, writeSettings, writeUpgradeCheck, writeState, writeLayers, writeRemarks, writeDrafts, writeBatch, writeAnswer, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, asRemarks, asDrafts, asWatching, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, parseRemarks, idsIn$1, takes, cursorOps, settingsOps, upgradeOps, reportOps, branchKeyIn, branchKeyOf, wasKeyOf, there, moved, adopt, SPLIT, ADOPT_SIZE, adopting, keyIn, answerOps, layersOps, remarksOps, inboxOps, STATE_LOCK, DRAFTS_LOCK, held$2, stale$1, stolen, taken, freed, alone, watchOps, draftsOps, stateOps, makeStore, madeStore, storeAt;
|
|
12673
|
+
var Store, ensureDir, readOptional, missing$2, damaged, jsonOf$2, decoded, unwritable, besideOf, wrote, added$1, INDENT, DRAFTS_VERSION, encoded, writes, appends, writeSettings, writeUpgradeCheck, writeState, writeLayers, writeRemarks, writeDrafts, writeBatch, writeAnswer, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, asRemarks, asDrafts, asWatching, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, parseRemarks, idsIn$1, takes, cursorOps, settingsOps, upgradeOps, reportOps, branchKeyIn, branchKeyOf, wasKeyOf, there, moved, adopt, SPLIT, ADOPT_SIZE, adopting, keyIn, answerOps, layersOps, remarksOps, inboxOps, STATE_LOCK, DRAFTS_LOCK, held$2, stale$1, stolen, taken, freed, alone, watchOps, draftsOps, stateOps, makeStore, madeStore, storeAt;
|
|
12667
12674
|
var init_service$1 = __esmMin((() => {
|
|
12668
12675
|
init_dist();
|
|
12669
12676
|
init_git();
|
|
@@ -12707,10 +12714,17 @@ var init_service$1 = __esmMin((() => {
|
|
|
12707
12714
|
path,
|
|
12708
12715
|
reason: String(reason)
|
|
12709
12716
|
});
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12717
|
+
besideOf = (path) => `${path}.${process.pid}.${Math.random().toString(36).slice(2)}.tmp`;
|
|
12718
|
+
wrote = (path, body) => {
|
|
12719
|
+
const beside = besideOf(path);
|
|
12720
|
+
return tryPromise({
|
|
12721
|
+
try: () => writeFile(beside, body, "utf8"),
|
|
12722
|
+
catch: unwritable(path)
|
|
12723
|
+
}).pipe(andThen(tryPromise({
|
|
12724
|
+
try: () => rename(beside, path),
|
|
12725
|
+
catch: unwritable(path)
|
|
12726
|
+
})), tapError(() => promise(() => rm(beside, { force: true }))));
|
|
12727
|
+
};
|
|
12714
12728
|
added$1 = (path, body) => tryPromise({
|
|
12715
12729
|
try: () => appendFile(path, `${body}\n`, "utf8"),
|
|
12716
12730
|
catch: unwritable(path)
|
|
@@ -12995,13 +13009,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
12995
13009
|
const key = yield* keyOf(worktreePath);
|
|
12996
13010
|
const path = watchPath(root, key);
|
|
12997
13011
|
yield* ensureDir(branchDir(root, key));
|
|
12998
|
-
yield*
|
|
12999
|
-
try: () => writeFile(path, JSON.stringify({ lookedAt: at }), "utf8"),
|
|
13000
|
-
catch: (cause) => new StoreUnwritable({
|
|
13001
|
-
path,
|
|
13002
|
-
reason: String(cause)
|
|
13003
|
-
})
|
|
13004
|
-
});
|
|
13012
|
+
yield* wrote(path, JSON.stringify({ lookedAt: at }));
|
|
13005
13013
|
})
|
|
13006
13014
|
};
|
|
13007
13015
|
};
|
|
@@ -14904,9 +14912,16 @@ var init_remarks$1 = __esmMin((() => {
|
|
|
14904
14912
|
}));
|
|
14905
14913
|
//#endregion
|
|
14906
14914
|
//#region src/domain/review/vouch.ts
|
|
14907
|
-
var isVouched, vouch$1, partOf, isPartVouched, vouchPart$1;
|
|
14915
|
+
var SHORTEST_BLOB, sameBlob, isVouched, vouch$1, partOf, isPartVouched, vouchPart$1;
|
|
14908
14916
|
var init_vouch = __esmMin((() => {
|
|
14909
|
-
|
|
14917
|
+
SHORTEST_BLOB = 7;
|
|
14918
|
+
sameBlob = (left, right) => {
|
|
14919
|
+
if (left === void 0 || right === void 0) return false;
|
|
14920
|
+
if (left === right) return true;
|
|
14921
|
+
if (left.length < SHORTEST_BLOB || right.length < SHORTEST_BLOB) return false;
|
|
14922
|
+
return left.startsWith(right) || right.startsWith(left);
|
|
14923
|
+
};
|
|
14924
|
+
isVouched = (vouches, path, blob) => sameBlob(vouches[path], blob);
|
|
14910
14925
|
vouch$1 = (vouches, path, blob) => {
|
|
14911
14926
|
if (isVouched(vouches, path, blob)) {
|
|
14912
14927
|
const { [path]: _cleared, ...rest } = vouches;
|
|
@@ -14920,7 +14935,7 @@ var init_vouch = __esmMin((() => {
|
|
|
14920
14935
|
partOf = (path, runs) => {
|
|
14921
14936
|
return `${path}@${[...runs].toSorted((left, right) => left.start - right.start || left.end - right.end).map((run) => `${run.start}-${run.end}`).join(",")}`;
|
|
14922
14937
|
};
|
|
14923
|
-
isPartVouched = (vouches, part, blob) => vouches[part]
|
|
14938
|
+
isPartVouched = (vouches, part, blob) => sameBlob(vouches[part], blob);
|
|
14924
14939
|
vouchPart$1 = (vouches, part, blob) => vouch$1(vouches, part, blob);
|
|
14925
14940
|
}));
|
|
14926
14941
|
//#endregion
|
|
@@ -14930,7 +14945,7 @@ var init_review$1 = __esmMin((() => {
|
|
|
14930
14945
|
}));
|
|
14931
14946
|
//#endregion
|
|
14932
14947
|
//#region src/review/vouching.ts
|
|
14933
|
-
var pathOfMark, changedSince, readParts, restamped, now, keepMarked, blobIn, stateAfter, toggle, marksOf, newestFirst, speaking, contentNow, diffSince, placesIn, counted$1, reportSince, isGone, goneSince, lapsedIn, sinceReview, progress, unchanged, markOf, since;
|
|
14948
|
+
var pathOfMark, changedSince, readParts, restamped, now, keepMarked, fullBlob, blobIn, stateAfter, toggle, marksOf, newestFirst, speaking, contentNow, diffSince, placesIn, counted$1, reportSince, isGone, goneSince, lapsedIn, sinceReview, progress, unchanged, markOf, since;
|
|
14934
14949
|
var init_vouching$1 = __esmMin((() => {
|
|
14935
14950
|
init_dist();
|
|
14936
14951
|
init_patch();
|
|
@@ -14946,13 +14961,13 @@ var init_vouching$1 = __esmMin((() => {
|
|
|
14946
14961
|
const blobsOf = (file) => recorded.filter(([mark]) => pathOfMark(mark) === file.path).map(([, blob]) => blob);
|
|
14947
14962
|
const lapsed = (file) => {
|
|
14948
14963
|
const blobs = blobsOf(file);
|
|
14949
|
-
return blobs.length > 0 && !blobs.
|
|
14964
|
+
return blobs.length > 0 && !blobs.some((blob) => sameBlob(blob, file.blob));
|
|
14950
14965
|
};
|
|
14951
14966
|
return files.filter(lapsed).map((file) => file.path);
|
|
14952
14967
|
};
|
|
14953
14968
|
readParts = (parts, files) => {
|
|
14954
14969
|
const blobs = new Map(files.map((file) => [file.path, file.blob]));
|
|
14955
|
-
return Object.entries(parts).filter(([part, blob]) => blobs.get(pathOfMark(part))
|
|
14970
|
+
return Object.entries(parts).filter(([part, blob]) => sameBlob(blobs.get(pathOfMark(part)), blob)).map(([part]) => part);
|
|
14956
14971
|
};
|
|
14957
14972
|
restamped = (stamps, before, after, at) => {
|
|
14958
14973
|
const still = Object.entries(stamps).filter(([key]) => key in after && after[key] === before[key]);
|
|
@@ -14962,9 +14977,13 @@ var init_vouching$1 = __esmMin((() => {
|
|
|
14962
14977
|
now = sync(() => (/* @__PURE__ */ new Date()).toISOString());
|
|
14963
14978
|
keepMarked = fn("Review.Vouch.keepMarked")(function* (worktree, file, marked) {
|
|
14964
14979
|
const git = yield* Git;
|
|
14965
|
-
if (marked.blob
|
|
14980
|
+
if (sameBlob(marked.blob, marked.onDisk)) yield* git.keep(worktree, [file]);
|
|
14966
14981
|
return marked.at ?? (yield* now);
|
|
14967
14982
|
});
|
|
14983
|
+
fullBlob = fn("Review.Vouch.fullBlob")(function* (worktree, blob) {
|
|
14984
|
+
const git = yield* Git;
|
|
14985
|
+
return getOrElse(yield* git.kept(worktree, blob), () => blob);
|
|
14986
|
+
});
|
|
14968
14987
|
blobIn = fn("Review.Vouch.blobIn")(function* (reading, file) {
|
|
14969
14988
|
return yield* match$3(blobOf(reading.patches, file), {
|
|
14970
14989
|
onNone: () => new UnknownFile({
|
|
@@ -14994,12 +15013,13 @@ var init_vouching$1 = __esmMin((() => {
|
|
|
14994
15013
|
const store = yield* Store;
|
|
14995
15014
|
const patches = reading.patches;
|
|
14996
15015
|
const onDisk = yield* blobIn(reading, file);
|
|
14997
|
-
const
|
|
15016
|
+
const asked = marking.blob ?? onDisk;
|
|
14998
15017
|
const at = yield* keepMarked(reading.worktree, file, {
|
|
14999
|
-
blob,
|
|
15018
|
+
blob: asked,
|
|
15000
15019
|
onDisk,
|
|
15001
15020
|
at: marking.at
|
|
15002
15021
|
});
|
|
15022
|
+
const blob = yield* fullBlob(reading.worktree, asked);
|
|
15003
15023
|
const current = yield* store.state(reading.worktree.path);
|
|
15004
15024
|
const next = vouch$1(current.vouches, file, blob);
|
|
15005
15025
|
yield* store.changeState(reading.worktree.path, (was) => stateAfter(was, file, blob, at));
|
|
@@ -15021,7 +15041,7 @@ var init_vouching$1 = __esmMin((() => {
|
|
|
15021
15041
|
}));
|
|
15022
15042
|
newestFirst = (left, right) => right.at.localeCompare(left.at);
|
|
15023
15043
|
speaking = (marks, path, blob) => {
|
|
15024
|
-
const own = marks.filter((mark) => mark.path === path && mark.blob
|
|
15044
|
+
const own = marks.filter((mark) => mark.path === path && (blob === void 0 || !sameBlob(mark.blob, blob)));
|
|
15025
15045
|
const whole = own.find((mark) => mark.key === path);
|
|
15026
15046
|
return fromNullishOr(whole ?? own.toSorted(newestFirst)[0]);
|
|
15027
15047
|
};
|
|
@@ -15505,17 +15525,18 @@ var init_layers = __esmMin((() => {
|
|
|
15505
15525
|
vouchPart = fn("Review.Layers.vouchPart")(function* (reading, file, part, marking = {}) {
|
|
15506
15526
|
const store = yield* Store;
|
|
15507
15527
|
const onDisk = reading.patches.find((one) => one.path === file)?.blob ?? "";
|
|
15508
|
-
const
|
|
15528
|
+
const asked = marking.blob ?? onDisk;
|
|
15529
|
+
const at = yield* keepMarked(reading.worktree, file, {
|
|
15530
|
+
blob: asked,
|
|
15531
|
+
onDisk,
|
|
15532
|
+
at: marking.at
|
|
15533
|
+
});
|
|
15534
|
+
const blob = yield* fullBlob(reading.worktree, asked);
|
|
15509
15535
|
const held = yield* read(reading);
|
|
15510
15536
|
const wanted = partsOfFile(held.layers, file);
|
|
15511
15537
|
const current = yield* store.state(reading.worktree.path);
|
|
15512
15538
|
const parts = vouchPart$1(current.parts, part, blob);
|
|
15513
15539
|
const vouches = (wanted.length > 0 && wanted.every((one) => isPartVouched(parts, one, blob))) === isVouched(current.vouches, file, blob) ? current.vouches : vouch$1(current.vouches, file, blob);
|
|
15514
|
-
const at = yield* keepMarked(reading.worktree, file, {
|
|
15515
|
-
blob,
|
|
15516
|
-
onDisk,
|
|
15517
|
-
at: marking.at
|
|
15518
|
-
});
|
|
15519
15540
|
yield* store.changeState(reading.worktree.path, (was) => ({
|
|
15520
15541
|
...was,
|
|
15521
15542
|
parts,
|
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.194",
|
|
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": {
|