@eliya-oss/agent-diff 0.1.0-alpha.86 → 0.1.0-alpha.87

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 CHANGED
@@ -1,5 +1,11 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.87
4
+
5
+ ### Patch Changes
6
+
7
+ - Marking a file reviewed no longer re-reads the whole branch from git, taking it from about 124ms to about 37ms on a branch of 131 files.
8
+
3
9
  ## 0.1.0-alpha.86
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9108,7 +9108,7 @@ var init_error$1 = __esmMin((() => {
9108
9108
  }));
9109
9109
  //#endregion
9110
9110
  //#region src/cli/commands.ts
9111
- var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, AT_ONCE, summaryOf, summaryFor, listBranches, blobOf, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, sentIn, listSent, submitComment, without$1, submitReply, listPatches, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, saveSticky, setBase, clearBase, markRead;
9111
+ var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, AT_ONCE, summaryOf, summaryFor, listBranches, blobOf, vouchIn, toggleVouch, readingOf, progressIn, reviewProgress, bodyOf, saidTo, spunOf, sentOf, sentIn, listSent, submitComment, without$1, submitReply, listPatches, flatten, threadBefore, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, saveSticky, setBase, clearBase, markRead;
9112
9112
  var init_commands = __esmMin((() => {
9113
9113
  init_dist();
9114
9114
  init_patch();
@@ -9247,20 +9247,19 @@ var init_commands = __esmMin((() => {
9247
9247
  return (yield* forEach(worktrees, (found) => summaryOf(repo, found, base), { concurrency: AT_ONCE })).filter((summary) => summary.files > 0);
9248
9248
  });
9249
9249
  blobOf = (patches, file) => map$4(findPatch(patches, file), (patch) => patch.blob);
9250
- toggleVouch = fn("Cli.toggleVouch")(function* (request) {
9250
+ vouchIn = fn("Cli.vouchIn")(function* (reading, file) {
9251
9251
  const store = yield* Store;
9252
- const worktree = yield* findBranch(request.repo, request.branch);
9253
- const patches = yield* patchesOf(worktree);
9254
- const blob = yield* match$3(blobOf(patches, request.file), {
9252
+ const patches = reading.patches;
9253
+ const blob = yield* match$3(blobOf(patches, file), {
9255
9254
  onNone: () => new UnknownFile({
9256
- file: request.file,
9255
+ file,
9257
9256
  known: patches.map((patch) => patch.path)
9258
9257
  }),
9259
9258
  onSome: succeed$1
9260
9259
  });
9261
- const current = yield* store.state(worktree.path);
9262
- const next = vouch(current.vouches, request.file, blob);
9263
- yield* store.saveState(worktree.path, {
9260
+ const current = yield* store.state(reading.worktree.path);
9261
+ const next = vouch(current.vouches, file, blob);
9262
+ yield* store.saveState(reading.worktree.path, {
9264
9263
  ...current,
9265
9264
  vouches: next
9266
9265
  });
@@ -9268,10 +9267,13 @@ var init_commands = __esmMin((() => {
9268
9267
  vouched: patches.map((patch) => ({
9269
9268
  path: patch.path,
9270
9269
  blob: patch.blob
9271
- })).filter((file) => isVouched(next, file.path, file.blob)).map((file) => file.path),
9270
+ })).filter((one) => isVouched(next, one.path, one.blob)).map((one) => one.path),
9272
9271
  total: patches.length
9273
9272
  };
9274
9273
  });
9274
+ toggleVouch = fn("Cli.toggleVouch")(function* (request) {
9275
+ return yield* vouchIn(yield* readingOf(request.repo, request.branch), request.file);
9276
+ });
9275
9277
  readingOf = fn("Cli.readingOf")(function* (repo, branch, base) {
9276
9278
  const worktree = yield* findBranch(repo, branch, base);
9277
9279
  return {
@@ -9804,7 +9806,7 @@ var init_pane = __esmMin((() => {
9804
9806
  init_commands();
9805
9807
  init_init();
9806
9808
  init_pane();
9807
- var version$1 = "0.1.0-alpha.86";
9809
+ var version$1 = "0.1.0-alpha.87";
9808
9810
  //#endregion
9809
9811
  //#region src/cli/upgrade.ts
9810
9812
  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;
@@ -15913,6 +15915,7 @@ var init_app = __esmMin((() => {
15913
15915
  intents;
15914
15916
  consuming;
15915
15917
  failure = "";
15918
+ reading;
15916
15919
  renderer;
15917
15920
  repo;
15918
15921
  noticeMs;
@@ -16354,6 +16357,7 @@ var init_app = __esmMin((() => {
16354
16357
  readBranch(name) {
16355
16358
  return gen({ self: this }, function* () {
16356
16359
  const reading = yield* readingOf(this.repo, name);
16360
+ this.reading = reading;
16357
16361
  const [progress, layers, sent] = yield* all([
16358
16362
  progressIn(reading),
16359
16363
  layersIn(reading),
@@ -16682,11 +16686,7 @@ var init_app = __esmMin((() => {
16682
16686
  const branch = selectedBranch(this.state);
16683
16687
  const patch = selectedPatch(this.state);
16684
16688
  if (branch === void 0 || patch === void 0) return;
16685
- const report = yield* toggleVouch({
16686
- repo: this.repo,
16687
- branch: branch.branch,
16688
- file: patch.path
16689
- });
16689
+ const report = yield* this.vouching(branch.branch, patch.path);
16690
16690
  const marked = report.vouched.includes(patch.path);
16691
16691
  const next = withVouched(this.state, report.vouched);
16692
16692
  if (!advance) {
@@ -16701,6 +16701,14 @@ var init_app = __esmMin((() => {
16701
16701
  this.commit(withNotice(atFile(next, target), `marked ${patch.path}`));
16702
16702
  });
16703
16703
  }
16704
+ vouching(branch, file) {
16705
+ const held = this.reading;
16706
+ return held === void 0 || held.worktree.branch !== branch ? toggleVouch({
16707
+ repo: this.repo,
16708
+ branch,
16709
+ file
16710
+ }) : vouchIn(held, file);
16711
+ }
16704
16712
  loadSent(branch) {
16705
16713
  return listSent(this.repo, branch);
16706
16714
  }
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.86",
26
+ "version": "0.1.0-alpha.87",
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": {