@eliya-oss/agent-diff 0.1.0-alpha.61 → 0.1.0-alpha.63

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,17 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.63
4
+
5
+ ### Patch Changes
6
+
7
+ - Selecting lines now shows `y copy` in the footer. adiff holds the mouse while a review is open, so your usual copy shortcut has no terminal selection to act on, and the key that does work was named nowhere you would look.
8
+
9
+ ## 0.1.0-alpha.62
10
+
11
+ ### Patch Changes
12
+
13
+ - Panning right reaches the end of a long line. The last few columns sat under the line numbers and the diff sign, and no amount of panning could bring them out, so a wide line always stopped short of wherever it really ended.
14
+
3
15
  ## 0.1.0-alpha.61
4
16
 
5
17
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9448,7 +9448,7 @@ var init_pane = __esmMin((() => {
9448
9448
  init_commands();
9449
9449
  init_init();
9450
9450
  init_pane();
9451
- var version$1 = "0.1.0-alpha.61";
9451
+ var version$1 = "0.1.0-alpha.63";
9452
9452
  //#endregion
9453
9453
  //#region src/cli/upgrade.ts
9454
9454
  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;
@@ -11820,6 +11820,7 @@ var init_command = __esmMin((() => {
11820
11820
  counted: false,
11821
11821
  whenLayers: false,
11822
11822
  whenThread: false,
11823
+ whenSelecting: false,
11823
11824
  whenPull: false,
11824
11825
  rank: 0,
11825
11826
  ...input
@@ -12019,7 +12020,10 @@ var init_command = __esmMin((() => {
12019
12020
  action: "selection.copy",
12020
12021
  title: "Copy the selection",
12021
12022
  keys: ["y"],
12022
- screens: ["review"]
12023
+ screens: ["review"],
12024
+ hint: "copy",
12025
+ whenSelecting: true,
12026
+ rank: 1
12023
12027
  }),
12024
12028
  command({
12025
12029
  action: "search.open",
@@ -12364,7 +12368,7 @@ var init_command = __esmMin((() => {
12364
12368
  if (key.startsWith("ctrl+")) return `^${key.slice(5)}`;
12365
12369
  return GLYPHS[key] ?? key;
12366
12370
  };
12367
- hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenStaged || offered.staged > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenPull || offered.pull).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
12371
+ hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenStaged || offered.staged > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenSelecting || offered.selecting).filter((entry) => !entry.whenPull || offered.pull).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
12368
12372
  key: displayKey(entry.keys[0] ?? ""),
12369
12373
  hint: entry.counted ? `${entry.hint} ${offered.staged}` : entry.hint,
12370
12374
  press: entry.keys[0] ?? ""
@@ -13491,9 +13495,12 @@ var init_diffview = __esmMin((() => {
13491
13495
  }
13492
13496
  return spans;
13493
13497
  }
13498
+ hidden() {
13499
+ return Math.max(0, this.code.x - this.numbers.x) + SIGN_WIDTH;
13500
+ }
13494
13501
  feed() {
13495
13502
  const spans = noteSpans(this.display, this.held);
13496
- this.code.content = textAt(this.display, this.held);
13503
+ this.code.content = textAt(this.display, this.held, this.hidden());
13497
13504
  this.code.onHighlight = (highlights) => {
13498
13505
  return [...(this.ownSpans() ?? highlights).filter((highlight) => !spans.some(([from, to]) => highlight[0] < to && highlight[1] > from)), ...spans];
13499
13506
  };
@@ -13691,7 +13698,13 @@ var init_diffview = __esmMin((() => {
13691
13698
  ]);
13692
13699
  return held;
13693
13700
  };
13694
- textAt = (display, pan) => display.map((entry) => heldAt(entry, pan)).join("\n");
13701
+ textAt = (display, pan, covered = 0) => {
13702
+ const lines = display.map((entry) => heldAt(entry, pan));
13703
+ if (covered === 0) return lines.join("\n");
13704
+ const widest = lines.reduce((most, line) => Math.max(most, line.length), 0);
13705
+ const last = lines.length - 1;
13706
+ return lines.map((line, at) => at === last ? line.padEnd(widest + covered) : line).join("\n");
13707
+ };
13695
13708
  noteSpans = (display, pan) => {
13696
13709
  const spans = [];
13697
13710
  let at = 0;
@@ -14567,6 +14580,7 @@ var init_render = __esmMin((() => {
14567
14580
  staged: state.staged,
14568
14581
  layers: state.layers.length,
14569
14582
  onThread: state.stop > 0 || threadChosen(state) !== void 0,
14583
+ selecting: state.selecting,
14570
14584
  pull: pullHere(state).length > 0
14571
14585
  });
14572
14586
  this.header.content = this.headerText(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.61",
26
+ "version": "0.1.0-alpha.63",
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": {