@eliya-oss/agent-diff 0.1.0-alpha.122 → 0.1.0-alpha.124
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 +14 -0
- package/dist/main.js +123 -52
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.124
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- `draft send` keeps the comments the forge did not take. A send the forge only partly accepted deleted every draft it had asked about and reported success, so comments the pull request never received were gone from disk. Only drafts the forge names back are cleared; the rest stay held, the answer says how many landed and how many are still waiting, and sending again sends only those. A reply adiff cannot read confirms nothing rather than everything.
|
|
8
|
+
|
|
9
|
+
Two sends at once post one review. They used to race, each read the whole set, and each post it, so the pull request got two identical reviews. A send now holds a lock across the whole cycle, and a second one finds nothing left to send.
|
|
10
|
+
|
|
11
|
+
## 0.1.0-alpha.123
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- A change you can only see in the whitespace is now visible. Adding a trailing space or turning spaces into a tab showed a removed line and an added line that read identically, with nothing to tell them apart. Trailing spaces and tabs on a changed line are marked. Copying still takes the bytes that are in the file.
|
|
16
|
+
|
|
3
17
|
## 0.1.0-alpha.122
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -8819,7 +8819,7 @@ var init_error$3 = __esmMin((() => {
|
|
|
8819
8819
|
}));
|
|
8820
8820
|
//#endregion
|
|
8821
8821
|
//#region src/service/forge/service.ts
|
|
8822
|
-
var Forge, LIMIT, TIMEOUT_MS$1, SEND_TIMEOUT_MS, MOST_OUTPUT, FIELDS$1, Row, decode$1, SAID, stateOf$1, ended, ask, show, read, pulls, openPull, NUMBER_FIELDS, Named, readNamed, gh, named, head, sideName, commentBody, bodyFor, Landed, readLanded, landedIn, review, ForgeLive;
|
|
8822
|
+
var Forge, LIMIT, TIMEOUT_MS$1, SEND_TIMEOUT_MS, MOST_OUTPUT, FIELDS$1, Row, decode$1, SAID, stateOf$1, ended, ask, show, read, pulls, openPull, NUMBER_FIELDS, Named, readNamed, gh, named, head, sideName, commentBody, bodyFor, Landed, readLanded, keyOf$2, counted, acknowledged, landedIn, review, ForgeLive;
|
|
8823
8823
|
var init_service$2 = __esmMin((() => {
|
|
8824
8824
|
init_dist();
|
|
8825
8825
|
init_error$3();
|
|
@@ -8983,10 +8983,27 @@ var init_service$2 = __esmMin((() => {
|
|
|
8983
8983
|
line: optionalKey(Int)
|
|
8984
8984
|
}))) });
|
|
8985
8985
|
readLanded = decodeUnknownEffect(Landed);
|
|
8986
|
+
keyOf$2 = (path, line) => `${path}:${line}`;
|
|
8987
|
+
counted = (back) => {
|
|
8988
|
+
const room = /* @__PURE__ */ new Map();
|
|
8989
|
+
back.forEach((one) => {
|
|
8990
|
+
const key = keyOf$2(one.path, one.line ?? 0);
|
|
8991
|
+
room.set(key, (room.get(key) ?? 0) + 1);
|
|
8992
|
+
});
|
|
8993
|
+
return room;
|
|
8994
|
+
};
|
|
8995
|
+
acknowledged = (said) => runSync(orElseSucceed(flatMap(try_(() => JSON.parse(said)), (value) => orElseSucceed(readLanded(value), () => ({ comments: void 0 }))), () => ({ comments: void 0 }))).comments;
|
|
8986
8996
|
landedIn = (said, asked) => {
|
|
8987
|
-
const back =
|
|
8988
|
-
if (back === void 0) return
|
|
8989
|
-
|
|
8997
|
+
const back = acknowledged(said);
|
|
8998
|
+
if (back === void 0) return [];
|
|
8999
|
+
const room = counted(back);
|
|
9000
|
+
return asked.flatMap((one, at) => {
|
|
9001
|
+
const key = keyOf$2(one.path, one.line);
|
|
9002
|
+
const left = room.get(key) ?? 0;
|
|
9003
|
+
if (left === 0) return [];
|
|
9004
|
+
room.set(key, left - 1);
|
|
9005
|
+
return [at];
|
|
9006
|
+
});
|
|
8990
9007
|
};
|
|
8991
9008
|
review = fn("Forge.review")(function* (repo, branch, comments) {
|
|
8992
9009
|
const pull = yield* named(repo, branch);
|
|
@@ -9159,7 +9176,7 @@ var init_paths = __esmMin((() => {
|
|
|
9159
9176
|
}));
|
|
9160
9177
|
//#endregion
|
|
9161
9178
|
//#region src/service/store/service.ts
|
|
9162
|
-
var Store, ensureDir, readOptional, missing$1, damaged, jsonOf$1, decoded, unwritable, wrote, added, INDENT, DRAFTS_VERSION, encoded, writes, appends, writeSettings, writeUpgradeCheck, writeState, writeLayers, writeDrafts, writeBatch, writeAnswer, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, asDrafts, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, gitDirOf, headOf$1, repoOf$2, branchKeyOf, wasKeyOf, there, moved, adopt, SPLIT$1, ADOPT_SIZE, adopting, keyIn, answerOps,
|
|
9179
|
+
var Store, ensureDir, readOptional, missing$1, damaged, jsonOf$1, decoded, unwritable, wrote, added, INDENT, DRAFTS_VERSION, encoded, writes, appends, writeSettings, writeUpgradeCheck, writeState, writeLayers, writeDrafts, writeBatch, writeAnswer, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, asDrafts, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, gitDirOf, headOf$1, repoOf$2, branchKeyOf, wasKeyOf, there, moved, adopt, SPLIT$1, ADOPT_SIZE, adopting, keyIn, answerOps, layersOps, inboxOps, STATE_LOCK, DRAFTS_LOCK, held$1, stale$1, stolen, taken, freed, alone, draftsOps, stateOps, makeStore, madeStore, storeAt;
|
|
9163
9180
|
var init_service$1 = __esmMin((() => {
|
|
9164
9181
|
init_dist();
|
|
9165
9182
|
init_error$2();
|
|
@@ -9360,27 +9377,6 @@ var init_service$1 = __esmMin((() => {
|
|
|
9360
9377
|
})
|
|
9361
9378
|
};
|
|
9362
9379
|
};
|
|
9363
|
-
draftsOps = (root, adopted) => {
|
|
9364
|
-
return {
|
|
9365
|
-
drafts: fn("Store.drafts")(function* (worktreePath) {
|
|
9366
|
-
const key = yield* keyIn(adopted, worktreePath);
|
|
9367
|
-
const path = draftsPath(root, key);
|
|
9368
|
-
const raw = yield* readOptional(path);
|
|
9369
|
-
if (isNone(raw)) return [];
|
|
9370
|
-
const value = yield* jsonOf$1(path, raw.value);
|
|
9371
|
-
return (yield* asDrafts(path, value)).drafts;
|
|
9372
|
-
}),
|
|
9373
|
-
saveDrafts: fn("Store.saveDrafts")(function* (worktreePath, next) {
|
|
9374
|
-
const key = yield* keyIn(adopted, worktreePath);
|
|
9375
|
-
const path = draftsPath(root, key);
|
|
9376
|
-
yield* ensureDir(branchDir(root, key));
|
|
9377
|
-
yield* writeDrafts(path, {
|
|
9378
|
-
version: DRAFTS_VERSION,
|
|
9379
|
-
drafts: next
|
|
9380
|
-
});
|
|
9381
|
-
})
|
|
9382
|
-
};
|
|
9383
|
-
};
|
|
9384
9380
|
layersOps = (root, adopted) => {
|
|
9385
9381
|
return {
|
|
9386
9382
|
layers: fn("Store.layers")(function* (worktreePath) {
|
|
@@ -9417,9 +9413,16 @@ var init_service$1 = __esmMin((() => {
|
|
|
9417
9413
|
})
|
|
9418
9414
|
};
|
|
9419
9415
|
};
|
|
9420
|
-
|
|
9421
|
-
|
|
9422
|
-
|
|
9416
|
+
STATE_LOCK = {
|
|
9417
|
+
tries: 240,
|
|
9418
|
+
waitMs: 25,
|
|
9419
|
+
staleMs: 15e3
|
|
9420
|
+
};
|
|
9421
|
+
DRAFTS_LOCK = {
|
|
9422
|
+
tries: 600,
|
|
9423
|
+
waitMs: 50,
|
|
9424
|
+
staleMs: 3e4
|
|
9425
|
+
};
|
|
9423
9426
|
held$1 = (path) => tryPromise({
|
|
9424
9427
|
try: () => writeFile(path, `${process.pid}`, { flag: "wx" }),
|
|
9425
9428
|
catch: (cause) => new StoreUnwritable({
|
|
@@ -9427,13 +9430,43 @@ var init_service$1 = __esmMin((() => {
|
|
|
9427
9430
|
reason: String(cause)
|
|
9428
9431
|
})
|
|
9429
9432
|
});
|
|
9430
|
-
stale$1 = (path) => promise(() => stat(path).then((found) => Date.now() - found.mtimeMs >
|
|
9431
|
-
stolen = (path, cause) => flatMap(stale$1(path), (old) => old ? flatMap(promise(() => rm(path, { force: true })), () => held$1(path)) : fail(cause));
|
|
9432
|
-
taken = (path) => retry(held$1(path).pipe(catchTag("StoreUnwritable", (cause) => stolen(path, cause))), {
|
|
9433
|
-
times:
|
|
9434
|
-
schedule: spaced(
|
|
9433
|
+
stale$1 = (path, waiting) => promise(() => stat(path).then((found) => Date.now() - found.mtimeMs > waiting.staleMs, () => false));
|
|
9434
|
+
stolen = (path, waiting, cause) => flatMap(stale$1(path, waiting), (old) => old ? flatMap(promise(() => rm(path, { force: true })), () => held$1(path)) : fail(cause));
|
|
9435
|
+
taken = (path, waiting) => retry(held$1(path).pipe(catchTag("StoreUnwritable", (cause) => stolen(path, waiting, cause))), {
|
|
9436
|
+
times: waiting.tries,
|
|
9437
|
+
schedule: spaced(waiting.waitMs)
|
|
9435
9438
|
});
|
|
9436
9439
|
freed = (path) => promise(() => rm(path, { force: true }));
|
|
9440
|
+
alone = (path, waiting, work) => acquireUseRelease(taken(path, waiting), () => work, () => freed(path));
|
|
9441
|
+
draftsOps = (root, adopted) => {
|
|
9442
|
+
const drafts = fn("Store.drafts")(function* (worktreePath) {
|
|
9443
|
+
const key = yield* keyIn(adopted, worktreePath);
|
|
9444
|
+
const path = draftsPath(root, key);
|
|
9445
|
+
const raw = yield* readOptional(path);
|
|
9446
|
+
if (isNone(raw)) return [];
|
|
9447
|
+
const value = yield* jsonOf$1(path, raw.value);
|
|
9448
|
+
return (yield* asDrafts(path, value)).drafts;
|
|
9449
|
+
});
|
|
9450
|
+
const saveDrafts = fn("Store.saveDrafts")(function* (worktreePath, next) {
|
|
9451
|
+
const key = yield* keyIn(adopted, worktreePath);
|
|
9452
|
+
const path = draftsPath(root, key);
|
|
9453
|
+
yield* ensureDir(branchDir(root, key));
|
|
9454
|
+
yield* writeDrafts(path, {
|
|
9455
|
+
version: DRAFTS_VERSION,
|
|
9456
|
+
drafts: next
|
|
9457
|
+
});
|
|
9458
|
+
});
|
|
9459
|
+
const whileHoldingDrafts = (worktreePath, work) => gen(function* () {
|
|
9460
|
+
const key = yield* keyIn(adopted, worktreePath);
|
|
9461
|
+
yield* ensureDir(branchDir(root, key));
|
|
9462
|
+
return yield* alone(`${draftsPath(root, key)}.lock`, DRAFTS_LOCK, work);
|
|
9463
|
+
}).pipe(withSpan("Store.whileHoldingDrafts"));
|
|
9464
|
+
return {
|
|
9465
|
+
drafts,
|
|
9466
|
+
saveDrafts,
|
|
9467
|
+
whileHoldingDrafts
|
|
9468
|
+
};
|
|
9469
|
+
};
|
|
9437
9470
|
stateOps = (root, adopted) => {
|
|
9438
9471
|
const state = fn("Store.state")(function* (worktreePath) {
|
|
9439
9472
|
const key = yield* keyIn(adopted, worktreePath);
|
|
@@ -9453,8 +9486,7 @@ var init_service$1 = __esmMin((() => {
|
|
|
9453
9486
|
const changeState = fn("Store.changeState")(function* (worktreePath, change) {
|
|
9454
9487
|
const key = yield* keyIn(adopted, worktreePath);
|
|
9455
9488
|
yield* ensureDir(branchDir(root, key));
|
|
9456
|
-
|
|
9457
|
-
yield* acquireUseRelease(taken(lock), () => under(worktreePath, change), () => freed(lock));
|
|
9489
|
+
yield* alone(`${statePath(root, key)}.lock`, STATE_LOCK, under(worktreePath, change));
|
|
9458
9490
|
});
|
|
9459
9491
|
const under = fn("Store.under")(function* (worktreePath, change) {
|
|
9460
9492
|
yield* saveState(worktreePath, change(yield* state(worktreePath)));
|
|
@@ -10062,7 +10094,7 @@ var init_preferences = __esmMin((() => {
|
|
|
10062
10094
|
}));
|
|
10063
10095
|
//#endregion
|
|
10064
10096
|
//#region src/cli/error.ts
|
|
10065
|
-
var UnknownBranch, UnknownBase, UnknownFile, UnknownComment, UnknownPreference, UnknownPreferenceValue, UnselectableRange, UnknownCommand, MissingOption, UnknownWorktree, MalformedLayers, UnknownField, UnknownOption, BadOption, UnknownDraft, NothingDrafted, PullMoved, NoLayers, InitUnwritable;
|
|
10097
|
+
var UnknownBranch, UnknownBase, UnknownFile, UnknownComment, UnknownPreference, UnknownPreferenceValue, UnselectableRange, UnknownCommand, MissingOption, UnknownWorktree, MalformedLayers, UnknownField, UnknownOption, BadOption, UnknownDraft, NothingDrafted, PartlySent, PullMoved, NoLayers, InitUnwritable;
|
|
10066
10098
|
var init_error = __esmMin((() => {
|
|
10067
10099
|
init_dist();
|
|
10068
10100
|
UnknownBranch = class extends TaggedError("UnknownBranch") {};
|
|
@@ -10081,6 +10113,7 @@ var init_error = __esmMin((() => {
|
|
|
10081
10113
|
BadOption = class extends TaggedError("BadOption") {};
|
|
10082
10114
|
UnknownDraft = class extends TaggedError("UnknownDraft") {};
|
|
10083
10115
|
NothingDrafted = class extends TaggedError("NothingDrafted") {};
|
|
10116
|
+
PartlySent = class extends TaggedError("PartlySent") {};
|
|
10084
10117
|
PullMoved = class extends TaggedError("PullMoved") {};
|
|
10085
10118
|
NoLayers = class extends TaggedError("NoLayers") {};
|
|
10086
10119
|
InitUnwritable = class extends TaggedError("InitUnwritable") {};
|
|
@@ -10580,7 +10613,7 @@ var init_commands = __esmMin((() => {
|
|
|
10580
10613
|
}));
|
|
10581
10614
|
//#endregion
|
|
10582
10615
|
//#region src/cli/drafts.ts
|
|
10583
|
-
var reported, listDrafts, addDraft, editDraft, dropDraft, sameCommit, commentOf, dispatchDrafts;
|
|
10616
|
+
var reported, listDrafts, addDraft, editDraft, dropDraft, sameCommit, commentOf, sending, dispatchDrafts;
|
|
10584
10617
|
var init_drafts = __esmMin((() => {
|
|
10585
10618
|
init_dist();
|
|
10586
10619
|
init_forge();
|
|
@@ -10651,10 +10684,9 @@ var init_drafts = __esmMin((() => {
|
|
|
10651
10684
|
side: draft.anchor.side,
|
|
10652
10685
|
body: draft.body
|
|
10653
10686
|
});
|
|
10654
|
-
|
|
10687
|
+
sending = fn("Cli.sending")(function* (repo, branch, worktree) {
|
|
10655
10688
|
const store = yield* Store;
|
|
10656
10689
|
const forge = yield* Forge;
|
|
10657
|
-
const worktree = yield* findBranch(repo, branch);
|
|
10658
10690
|
const held = yield* store.drafts(worktree.path);
|
|
10659
10691
|
if (held.length === 0) return yield* new NothingDrafted({ branch });
|
|
10660
10692
|
const head = yield* forge.head(repo, branch);
|
|
@@ -10664,15 +10696,31 @@ var init_drafts = __esmMin((() => {
|
|
|
10664
10696
|
now: head
|
|
10665
10697
|
});
|
|
10666
10698
|
const sent = yield* forge.review(repo, branch, held.map(commentOf));
|
|
10667
|
-
const gone = new Set(
|
|
10668
|
-
const
|
|
10699
|
+
const gone = new Set(sent.landed.map((at) => held[at]?.id));
|
|
10700
|
+
const kept = held.filter((one) => !gone.has(one.id));
|
|
10701
|
+
const asked = new Set(held.map((one) => one.id));
|
|
10702
|
+
const since = (yield* store.drafts(worktree.path)).filter((one) => !asked.has(one.id));
|
|
10703
|
+
const waiting = [...kept, ...since];
|
|
10669
10704
|
yield* store.saveDrafts(worktree.path, waiting);
|
|
10705
|
+
if (kept.length > 0) return yield* new PartlySent({
|
|
10706
|
+
branch,
|
|
10707
|
+
url: sent.url,
|
|
10708
|
+
sent: held.length - kept.length,
|
|
10709
|
+
held: waiting.length,
|
|
10710
|
+
landed: held.filter((one) => gone.has(one.id)).map((one) => one.id),
|
|
10711
|
+
kept: kept.map((one) => one.id)
|
|
10712
|
+
});
|
|
10670
10713
|
return {
|
|
10671
|
-
sent:
|
|
10714
|
+
sent: held.length,
|
|
10672
10715
|
url: sent.url,
|
|
10673
|
-
held:
|
|
10716
|
+
held: since.length
|
|
10674
10717
|
};
|
|
10675
10718
|
});
|
|
10719
|
+
dispatchDrafts = fn("Cli.dispatchDrafts")(function* (repo, branch) {
|
|
10720
|
+
const store = yield* Store;
|
|
10721
|
+
const worktree = yield* findBranch(repo, branch);
|
|
10722
|
+
return yield* store.whileHoldingDrafts(worktree.path, sending(repo, branch, worktree));
|
|
10723
|
+
});
|
|
10676
10724
|
}));
|
|
10677
10725
|
//#endregion
|
|
10678
10726
|
//#region src/cli/init.ts
|
|
@@ -10929,7 +10977,7 @@ var init_pane = __esmMin((() => {
|
|
|
10929
10977
|
init_drafts();
|
|
10930
10978
|
init_init();
|
|
10931
10979
|
init_pane();
|
|
10932
|
-
var version$1 = "0.1.0-alpha.
|
|
10980
|
+
var version$1 = "0.1.0-alpha.124";
|
|
10933
10981
|
//#endregion
|
|
10934
10982
|
//#region src/cli/upgrade.ts
|
|
10935
10983
|
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, ranChild, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
|
|
@@ -12480,6 +12528,11 @@ var init_report$1 = __esmMin((() => {
|
|
|
12480
12528
|
suggestion: "Nothing is being held for this review. Write a comment on the pull request first; `adiff draft list` reports what is waiting.",
|
|
12481
12529
|
retriable: false
|
|
12482
12530
|
},
|
|
12531
|
+
PartlySent: {
|
|
12532
|
+
exit: 1,
|
|
12533
|
+
suggestion: "The forge confirmed some of the comments and said nothing about the rest. What it confirmed is on the pull request; what it did not is still held, listed under kept. Run the same send again to send only those.",
|
|
12534
|
+
retriable: true
|
|
12535
|
+
},
|
|
12483
12536
|
PullMoved: {
|
|
12484
12537
|
exit: 1,
|
|
12485
12538
|
suggestion: "The pull request has moved since these comments were written, so they name lines that may no longer be there. Nothing was sent and nothing was lost. Read the diff again and check each draft still says what you mean.",
|
|
@@ -15200,7 +15253,9 @@ var init_marks = __esmMin((() => {
|
|
|
15200
15253
|
reviewed: "✓",
|
|
15201
15254
|
folder: "",
|
|
15202
15255
|
folderOpen: "",
|
|
15203
|
-
file: ""
|
|
15256
|
+
file: "",
|
|
15257
|
+
space: "·",
|
|
15258
|
+
tab: "→"
|
|
15204
15259
|
};
|
|
15205
15260
|
sets = {
|
|
15206
15261
|
ring,
|
|
@@ -15213,7 +15268,9 @@ var init_marks = __esmMin((() => {
|
|
|
15213
15268
|
reviewed: "✓",
|
|
15214
15269
|
folder: "",
|
|
15215
15270
|
folderOpen: "",
|
|
15216
|
-
file: ""
|
|
15271
|
+
file: "",
|
|
15272
|
+
space: "·",
|
|
15273
|
+
tab: "→"
|
|
15217
15274
|
},
|
|
15218
15275
|
quote: {
|
|
15219
15276
|
comment: "❞",
|
|
@@ -15224,7 +15281,9 @@ var init_marks = __esmMin((() => {
|
|
|
15224
15281
|
reviewed: "✓",
|
|
15225
15282
|
folder: "",
|
|
15226
15283
|
folderOpen: "",
|
|
15227
|
-
file: ""
|
|
15284
|
+
file: "",
|
|
15285
|
+
space: "·",
|
|
15286
|
+
tab: "→"
|
|
15228
15287
|
},
|
|
15229
15288
|
diamond: {
|
|
15230
15289
|
comment: "◆",
|
|
@@ -15235,7 +15294,9 @@ var init_marks = __esmMin((() => {
|
|
|
15235
15294
|
reviewed: "✓",
|
|
15236
15295
|
folder: "",
|
|
15237
15296
|
folderOpen: "",
|
|
15238
|
-
file: ""
|
|
15297
|
+
file: "",
|
|
15298
|
+
space: "·",
|
|
15299
|
+
tab: "→"
|
|
15239
15300
|
},
|
|
15240
15301
|
dot: {
|
|
15241
15302
|
comment: "●",
|
|
@@ -15246,7 +15307,9 @@ var init_marks = __esmMin((() => {
|
|
|
15246
15307
|
reviewed: "✓",
|
|
15247
15308
|
folder: "",
|
|
15248
15309
|
folderOpen: "",
|
|
15249
|
-
file: ""
|
|
15310
|
+
file: "",
|
|
15311
|
+
space: "·",
|
|
15312
|
+
tab: "→"
|
|
15250
15313
|
},
|
|
15251
15314
|
plain: {
|
|
15252
15315
|
...ring,
|
|
@@ -15344,7 +15407,7 @@ var init_theme = __esmMin((() => {
|
|
|
15344
15407
|
}));
|
|
15345
15408
|
//#endregion
|
|
15346
15409
|
//#region src/tui/diffview.ts
|
|
15347
|
-
var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, freshLines, proseAt, notesAt, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
15410
|
+
var WASH, NOTE_MIN, ANSWER_MARK, REPLY_MARK, OVERSCAN, SIGN_WIDTH, SCROLL_ROWS, PAN_COLUMNS, WAYS, notchesIn, takenOver, wheelTo, SIGNS, numberFor, DiffView, startsOf, bareOf, noteKey, keyOf, groupOf, isChrome, alike, heldAt, sameLine, NO_SPANS, lineStarts, overLine, shifted, acrossLines, spansByLine, textAt, noteSpans, NOTE_PAINT, wrap, headOf, spokenLines, answerLines, noteLines, noteRows, proseRows, freshLines, proseAt, notesAt, TRAILING, shownText, codeRow, rowsFor, layout, lineNumbers, BARE_SIGN, signFor, lineSigns, sideLineOf;
|
|
15348
15411
|
var init_diffview = __esmMin((() => {
|
|
15349
15412
|
init_dist();
|
|
15350
15413
|
init_patch();
|
|
@@ -15948,8 +16011,16 @@ var init_diffview = __esmMin((() => {
|
|
|
15948
16011
|
return fresh !== void 0 ? wanted : wanted.filter(() => !plan.fresh.has(line));
|
|
15949
16012
|
};
|
|
15950
16013
|
notesAt = (plan, row) => plan.notes.filter((note) => sideLineOf(row, note.side) === note.line).flatMap((note, at) => noteRows(note, row.index, plan.room, at + 1));
|
|
16014
|
+
TRAILING = /[ \t]+$/;
|
|
16015
|
+
shownText = (row) => {
|
|
16016
|
+
if (row.kind === "context") return row.text;
|
|
16017
|
+
const tail = TRAILING.exec(row.text);
|
|
16018
|
+
if (tail === null) return row.text;
|
|
16019
|
+
const marked = tail[0].replaceAll(" ", marks().tab).replaceAll(" ", marks().space);
|
|
16020
|
+
return `${row.text.slice(0, tail.index)}${marked}`;
|
|
16021
|
+
};
|
|
15951
16022
|
codeRow = (plan, row) => ({
|
|
15952
|
-
text: row
|
|
16023
|
+
text: shownText(row),
|
|
15953
16024
|
row: row.index,
|
|
15954
16025
|
stop: 0,
|
|
15955
16026
|
comment: false,
|
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.124",
|
|
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": {
|