@eliya-oss/agent-diff 0.1.0-alpha.104 → 0.1.0-alpha.105

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.105
4
+
5
+ ### Patch Changes
6
+
7
+ - Looking for something no longer re-reads the whole branch on every search, and finds a name however it was capitalised.
8
+
3
9
  ## 0.1.0-alpha.104
4
10
 
5
11
  ### Patch Changes
package/dist/main.js CHANGED
@@ -8600,6 +8600,7 @@ var init_service$2 = __esmMin((() => {
8600
8600
  "-n",
8601
8601
  "-I",
8602
8602
  "-F",
8603
+ "-i",
8603
8604
  "-w",
8604
8605
  "-C",
8605
8606
  String(GREP_CONTEXT),
@@ -9926,7 +9927,7 @@ var init_pane = __esmMin((() => {
9926
9927
  init_commands();
9927
9928
  init_init();
9928
9929
  init_pane();
9929
- var version$1 = "0.1.0-alpha.104";
9930
+ var version$1 = "0.1.0-alpha.105";
9930
9931
  //#endregion
9931
9932
  //#region src/cli/upgrade.ts
9932
9933
  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;
@@ -10122,7 +10123,7 @@ var init_upgrade$1 = __esmMin((() => {
10122
10123
  }));
10123
10124
  //#endregion
10124
10125
  //#region src/cli/search.ts
10125
- var HIT, NEAR$1, rowOf, readRows, near, byChangedFirst, searchBranch;
10126
+ var HIT, NEAR$1, rowOf, readRows, near, byChangedFirst, searchIn, searchBranch;
10126
10127
  var init_search = __esmMin((() => {
10127
10128
  init_dist();
10128
10129
  init_git();
@@ -10158,11 +10159,10 @@ var init_search = __esmMin((() => {
10158
10159
  if (left.changed !== right.changed) return left.changed ? -1 : 1;
10159
10160
  return left.path === right.path ? left.line - right.line : left.path.localeCompare(right.path);
10160
10161
  };
10161
- searchBranch = fn("Cli.searchBranch")(function* (repo, branch, term) {
10162
+ searchIn = fn("Cli.searchIn")(function* (reading, term) {
10162
10163
  const git = yield* Git;
10163
- const worktree = yield* findBranch(repo, branch);
10164
- const patches = yield* listPatches(repo, branch);
10165
- const touched = new Set(patches.map((patch) => patch.path));
10164
+ const worktree = reading.worktree;
10165
+ const touched = new Set(reading.patches.map((patch) => patch.path));
10166
10166
  const rows = readRows(yield* git.grep(worktree, term));
10167
10167
  const found = [];
10168
10168
  for (const [at, row] of rows.entries()) {
@@ -10177,6 +10177,9 @@ var init_search = __esmMin((() => {
10177
10177
  }
10178
10178
  return found.toSorted(byChangedFirst);
10179
10179
  });
10180
+ searchBranch = fn("Cli.searchBranch")(function* (repo, branch, term) {
10181
+ return yield* searchIn(yield* readingOf(repo, branch), term);
10182
+ });
10180
10183
  }));
10181
10184
  //#endregion
10182
10185
  //#region src/domain/layers/model.ts
@@ -15208,12 +15211,12 @@ var init_render = __esmMin((() => {
15208
15211
  nothingYet = (state, room) => {
15209
15212
  const wanted = state.query.trim();
15210
15213
  if (wanted.length === 0 || state.term.length === 0) return "".padEnd(room);
15211
- return clip(` nothing else uses ${wanted}`, room).padEnd(room);
15214
+ return clip(` nothing uses ${wanted}`, room).padEnd(room);
15212
15215
  };
15213
15216
  foundTitle = (state) => {
15214
15217
  const all = state.matches.length;
15215
15218
  if (state.term.length === 0) return "Look for something";
15216
- return `${state.term} · ${all === 1 ? "1 place" : `${all} places`} elsewhere`;
15219
+ return `${state.term} · ${all === 1 ? "1 place" : `${all} places`}`;
15217
15220
  };
15218
15221
  fileRow = (match, room) => {
15219
15222
  const said = ` ${match.changed ? marks().comment : " "} ${clipHead(match.path, Math.max(8, room - 3))}`;
@@ -16063,7 +16066,7 @@ var init_app = __esmMin((() => {
16063
16066
  init_intent();
16064
16067
  init_session();
16065
16068
  init_upgrade();
16066
- LOOK_MS = 220;
16069
+ LOOK_MS = 110;
16067
16070
  LEAVING_SAID = "press ctrl+c again to leave";
16068
16071
  NOTICE_MS = 2200;
16069
16072
  KEY_HISTORY = 40;
@@ -16748,16 +16751,11 @@ var init_app = __esmMin((() => {
16748
16751
  return gen({ self: this }, function* () {
16749
16752
  const branch = selectedBranch(this.state);
16750
16753
  if (branch === void 0) return;
16751
- const elsewhere = (yield* searchBranch(this.repo, branch.branch, wanted)).filter((match) => !this.isHere(match));
16752
- this.commit(withMatches(this.state, elsewhere, wanted));
16753
- if (elsewhere.length === 0) this.commit(withNoticeHere(this.state, `no other place uses ${wanted}`));
16754
+ const reading = this.reading;
16755
+ const found = reading === void 0 || reading.worktree.branch !== branch.branch ? yield* searchBranch(this.repo, branch.branch, wanted) : yield* searchIn(reading, wanted);
16756
+ this.commit(withMatches(this.state, found, wanted));
16754
16757
  });
16755
16758
  }
16756
- isHere(match) {
16757
- const patch = selectedPatch(this.state);
16758
- if (patch === void 0 || patch.path !== match.path) return false;
16759
- return sourceLineAt(this.state, this.state.cursor) === match.line;
16760
- }
16761
16759
  openMatch() {
16762
16760
  return gen({ self: this }, function* () {
16763
16761
  const match = matchHere(this.state);
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.104",
26
+ "version": "0.1.0-alpha.105",
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": {