@eliya-oss/agent-diff 0.1.0-alpha.119 → 0.1.0-alpha.120

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,13 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.120
4
+
5
+ ### Patch Changes
6
+
7
+ - Copying a selection that crosses a collapsed gap no longer puts adiff's own `⋯ 103 lines hidden` marker on the clipboard as if it were source. `y` also stops discarding a selection you made because the cursor happens to be resting on a comment — with a selection active it copies the selection.
8
+
9
+ The two numbers on screen say what they count. The footer now reads `4 lines selected` and the toast `2 lines copied`, which is honest about the difference: a change shows both its old and its new line, and copy takes the one you are keeping.
10
+
3
11
  ## 0.1.0-alpha.119
4
12
 
5
13
  ### Patch Changes
package/dist/main.js CHANGED
@@ -10912,7 +10912,7 @@ var init_pane = __esmMin((() => {
10912
10912
  init_drafts();
10913
10913
  init_init();
10914
10914
  init_pane();
10915
- var version$1 = "0.1.0-alpha.119";
10915
+ var version$1 = "0.1.0-alpha.120";
10916
10916
  //#endregion
10917
10917
  //#region src/cli/upgrade.ts
10918
10918
  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;
@@ -12923,7 +12923,7 @@ var init_tree = __esmMin((() => {
12923
12923
  return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
12924
12924
  };
12925
12925
  crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
12926
- })), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, kept, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, layerBody, layerRows, nearFirst, layerFitted, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, threadReplying, VOICES, threadQuote, pickedText, selectedLines, shownMatches, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
12926
+ })), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_WIDE, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, tooSmall, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, kept, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, clip, TITLE_ROWS, titleRows, shortDir, fileRow$1, shownFiles, dirOf, fileRows, layerRead, layerDone, countRow, layerBody, layerRows, nearFirst, layerFitted, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, treeOf, reviewedCountIn, CROWDED, treeRows, crowdedOf, foldersOfFile, isReviewed, treeStart, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, brokenAt, laidLine, laidDraft, caretRow, caretColumn, caretOn, COMPOSE_BOX, COMPOSE_MARGIN, COMPOSE_PAD, COMPOSE_LEAST, composeBox, composeRoom$1, composeTarget, replyTarget, threadReplying, VOICES, threadQuote, pickedText, takenRows, selectedLines, shownMatches, matchHere, selectionReadout, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, PANEL_SECTIONS, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, readingOrder, placeIn, layerFile, layerAfter, selectionRange;
12927
12927
  var init_model = __esmMin((() => {
12928
12928
  init_dist();
12929
12929
  init_patch();
@@ -13335,13 +13335,15 @@ var init_model = __esmMin((() => {
13335
13335
  const taken = text.slice(picked.from, picked.to);
13336
13336
  return taken.length === 0 ? void 0 : taken;
13337
13337
  };
13338
- selectedLines = (state) => {
13339
- const patch = selectedPatch(state);
13340
- if (patch === void 0) return [];
13338
+ takenRows = (state) => {
13339
+ const shown = shownOf(state);
13340
+ if (shown === void 0) return [];
13341
13341
  const [from, to] = selectionRange(state);
13342
- const rows = patch.rows.slice(from, to + 1);
13343
- return (rows.every((row) => row.kind === "removed") ? rows : rows.filter((row) => row.kind !== "removed")).map((row) => row.text);
13342
+ const gaps = gapRowSet(shown);
13343
+ const rows = shown.patch.rows.slice(from, to + 1).filter((row) => !gaps.has(row.index));
13344
+ return rows.length > 0 && rows.every((row) => row.kind === "removed") ? rows : rows.filter((row) => row.kind !== "removed");
13344
13345
  };
13346
+ selectedLines = (state) => takenRows(state).map((row) => row.text);
13345
13347
  shownMatches = (state) => {
13346
13348
  const wanted = state.query.trim().toLowerCase();
13347
13349
  if (wanted.length === 0) return state.matches;
@@ -13352,7 +13354,7 @@ var init_model = __esmMin((() => {
13352
13354
  const patch = selectedPatch(state);
13353
13355
  if (patch === void 0 || !state.selecting) return "";
13354
13356
  const lines = selectedRows(state).length;
13355
- return `${patch.path} ${lines} ${lines === 1 ? "line" : "lines"}`;
13357
+ return `${patch.path} ${lines} ${lines === 1 ? "line" : "lines"} selected`;
13356
13358
  };
13357
13359
  CONTEXT_STEPS = [
13358
13360
  3,
@@ -18297,7 +18299,7 @@ var init_app = __esmMin((() => {
18297
18299
  }
18298
18300
  copySelection(keep) {
18299
18301
  const said = keep ? withNoticeHere : withNotice;
18300
- const thread = threadAtStop(this.state);
18302
+ const thread = this.state.selecting ? void 0 : threadAtStop(this.state);
18301
18303
  if (thread !== void 0) {
18302
18304
  copyToClipboard(`${thread.body}\n`);
18303
18305
  this.commit(said(this.state, "comment copied"));
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.119",
26
+ "version": "0.1.0-alpha.120",
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": {