@eliya-oss/agent-diff 0.1.0-alpha.96 → 0.1.0-alpha.98

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,23 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.98
4
+
5
+ ### Patch Changes
6
+
7
+ - Finding the selection elsewhere looks for the words the reviewer picked, rather than the longest name on the line they were picked from.
8
+
9
+ - The file list and the review panel say which of them the keys will reach by how brightly the row under their cursor is lit, rather than with a small glyph beside it.
10
+
11
+ ## 0.1.0-alpha.97
12
+
13
+ ### Patch Changes
14
+
15
+ - Every release writes its changes into CHANGELOG.md and says them on the release page, rather than only in an install line.
16
+
17
+ - Clicking a line puts the cursor on it rather than selecting it, so the arrows afterwards move the cursor and the diff stays where it is.
18
+
19
+ - Settling or removing a thread from the review panel leaves the cursor where it was, rather than sending it back to the first thread.
20
+
3
21
  ## 0.1.0-alpha.96
4
22
 
5
23
  ### Patch Changes
package/dist/main.js CHANGED
@@ -9913,7 +9913,7 @@ var init_pane = __esmMin((() => {
9913
9913
  init_commands();
9914
9914
  init_init();
9915
9915
  init_pane();
9916
- var version$1 = "0.1.0-alpha.96";
9916
+ var version$1 = "0.1.0-alpha.98";
9917
9917
  //#endregion
9918
9918
  //#region src/cli/upgrade.ts
9919
9919
  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;
@@ -11749,7 +11749,7 @@ var init_tree = __esmMin((() => {
11749
11749
  return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
11750
11750
  };
11751
11751
  crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
11752
- })), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, 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, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelIndexOf, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, layerFile, selectionRange;
11752
+ })), nothingReviewed, initialState, TREE_MAX, TREE_ROOMY, TREE_MIN, TREE_SHARE, DIFF_MIN, DIFF_ROOMY, bodyRoom, treeWidth, reviewWidth, panelFits, panelShown, onLayers, selectedLayer, proseFor, layerFiles, layerHolding, layerOpen, chunked, packed, shortened, wordWrapped, wrapped, NO_NOTE, noteRows$1, proseRow, proseRows$1, titleRows, clipEnd, FILE_LEAD, fileRows, layerRows, railWindow, selectedBranch, selectedPatch, pullHere, knownToHaveNoPull, kept, treeOf, reviewedCountIn, 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, pickedText, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, rowShowing, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, spokeLast, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, openingRow, changeAround, nextUnreviewed, reviewedCount, fileOrder, filePlace, layerFile, selectionRange;
11753
11753
  var init_model = __esmMin((() => {
11754
11754
  init_dist();
11755
11755
  init_patch();
@@ -12141,6 +12141,8 @@ var init_model = __esmMin((() => {
12141
12141
  NAME = /[A-Za-z_$][\w$]*/g;
12142
12142
  longestName$1 = (line) => [...line.matchAll(NAME)].map((found) => found[0]).filter((name) => !KEYWORDS.has(name)).toSorted((left, right) => right.length - left.length)[0];
12143
12143
  searchTerm = (state) => {
12144
+ const taken = pickedText(state)?.trim();
12145
+ if (taken !== void 0 && taken.length > 0) return taken;
12144
12146
  const line = selectedLines(state).map((text) => text.trim()).find((text) => text.length > 0);
12145
12147
  if (line === void 0) return "";
12146
12148
  return longestName$1(line) ?? line;
@@ -12247,11 +12249,6 @@ var init_model = __esmMin((() => {
12247
12249
  };
12248
12250
  return [...ordered("with"), ...ordered("answered")];
12249
12251
  };
12250
- panelIndexOf = (state, id) => {
12251
- if (id === void 0) return state.panelIndex;
12252
- const at = panelEntries(state).findIndex((entry) => entry.comment.id === id);
12253
- return at === -1 ? state.panelIndex : at;
12254
- };
12255
12252
  panelEntry = (state) => panelEntries(state)[state.panelIndex];
12256
12253
  threadChosen = (state) => {
12257
12254
  if (state.focus !== "review") return void 0;
@@ -13045,7 +13042,7 @@ var init_match = __esmMin((() => {
13045
13042
  }));
13046
13043
  //#endregion
13047
13044
  //#region src/tui/reduce.ts
13048
- var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
13045
+ var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, restingOn, draggedTo, pickedIn, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, moveLayer, inRail, railScrolled, movePanel, layerDown, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, revealsAfter, gapOpened, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
13049
13046
  var init_reduce = __esmMin((() => {
13050
13047
  init_dist();
13051
13048
  init_patch();
@@ -13106,6 +13103,14 @@ var init_reduce = __esmMin((() => {
13106
13103
  scroll: clamp(from + delta, 0, highest)
13107
13104
  };
13108
13105
  };
13106
+ restingOn = (state, row) => ({
13107
+ ...state,
13108
+ picked: void 0,
13109
+ selecting: false,
13110
+ stop: 0,
13111
+ anchorRow: clamp(row, 0, lastRow(selectedPatch(state))),
13112
+ cursor: clamp(row, 0, lastRow(selectedPatch(state)))
13113
+ });
13109
13114
  draggedTo = (state, from, to) => ({
13110
13115
  ...state,
13111
13116
  picked: void 0,
@@ -13876,6 +13881,7 @@ var init_theme = __esmMin((() => {
13876
13881
  note: "#9aa7c7",
13877
13882
  cursor: "#232936",
13878
13883
  selection: "#2b3854",
13884
+ resting: "#1b2233",
13879
13885
  marker: blue,
13880
13886
  addedBg: "#0f2a19",
13881
13887
  removedBg: "#2e1418",
@@ -14572,7 +14578,7 @@ var init_diffview = __esmMin((() => {
14572
14578
  }));
14573
14579
  //#endregion
14574
14580
  //#region src/tui/render.ts
14575
- var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, panelMark, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
14581
+ var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, SUMMARY_LINES, summaryLines, contextLabel, nameRoom, stateRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, placeLabel, headerParts, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, STEP_NUMBER, STEP_LEAD, NOTE_LEAD, STEP_GAP, STALE_ROOM, STALE_LONG, STALE_SHORT, staleBanner, layerRoom, layerFold, layerHead, layerText, layerPaint, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelText, Screen;
14576
14582
  var init_render = __esmMin((() => {
14577
14583
  init_command();
14578
14584
  init_patch();
@@ -15159,7 +15165,7 @@ var init_render = __esmMin((() => {
15159
15165
  return scope.length === 0 ? [] : [scope];
15160
15166
  };
15161
15167
  treeMarks = (state, row) => {
15162
- return `${row.fileIndex === state.patchIndex ? state.focus === "tree" ? "▸" : "·" : " "}${row.fileIndex !== void 0 && isReviewed(state, row.fileIndex) ? marks().reviewed : " "}`;
15168
+ return ` ${row.fileIndex !== void 0 && isReviewed(state, row.fileIndex) ? marks().reviewed : " "}`;
15163
15169
  };
15164
15170
  treeTail = (state, row) => {
15165
15171
  if (row.fileIndex === void 0) return " ";
@@ -15213,10 +15219,7 @@ var init_render = __esmMin((() => {
15213
15219
  PANEL_ORDER = ["with", "answered"];
15214
15220
  PANEL_LEAD = 3;
15215
15221
  PANEL_EMPTY = "No comment on this branch yet.";
15216
- panelMark = (state, at) => {
15217
- if (at !== state.panelIndex) return " ";
15218
- return state.focus === "review" ? "▸" : "·";
15219
- };
15222
+ restingOrHere = (focused) => focused ? palette.selection : palette.resting;
15220
15223
  panelWhere = (entry, room) => {
15221
15224
  const where = `:${entry.comment.end}`;
15222
15225
  return `${clipPath(entry.comment.file, Math.max(4, room - where.length))}${where}`;
@@ -15224,7 +15227,7 @@ var init_render = __esmMin((() => {
15224
15227
  panelBody = (entry) => entry.comment.body.split("\n").find((line) => line.trim().length > 0) ?? "";
15225
15228
  panelPair = (state, placed, room) => {
15226
15229
  const { entry } = placed;
15227
- const lead = `${panelMark(state, placed.at)}${entry.fresh || entry.unread > 0 ? marks().comment : " "} `;
15230
+ const lead = ` ${entry.fresh || entry.unread > 0 ? marks().comment : " "} `;
15228
15231
  const here = placed.at === state.panelIndex;
15229
15232
  return [{
15230
15233
  text: `${lead}${panelWhere(entry, room - PANEL_LEAD)}`,
@@ -15272,7 +15275,7 @@ var init_render = __esmMin((() => {
15272
15275
  }] : body;
15273
15276
  return new StyledText([...banner, ...lines].map((line) => {
15274
15277
  const drawn = fg(line.tone)(`${line.text.padEnd(room)}\n`);
15275
- return line.here === true ? bg(palette.selection)(drawn) : drawn;
15278
+ return line.here === true ? bg(restingOrHere(state.focus === "review"))(drawn) : drawn;
15276
15279
  }));
15277
15280
  };
15278
15281
  Screen = class {
@@ -15567,7 +15570,7 @@ var init_render = __esmMin((() => {
15567
15570
  const window = whole.more === 0 ? whole : treeWindow(state, Math.max(1, room - 1));
15568
15571
  const rows = window.rows.flatMap((row) => {
15569
15572
  const drawn = fg(row.kind === "file" ? palette.ink : palette.muted)(`${treeLine(state, row, pane)}\n`);
15570
- return [row.fileIndex === state.patchIndex ? bg(palette.selection)(drawn) : drawn];
15573
+ return [row.fileIndex === state.patchIndex ? bg(restingOrHere(state.focus === "tree"))(drawn) : drawn];
15571
15574
  });
15572
15575
  const more = window.more > 0 ? [fg(palette.faint)(` … ${window.more} more`)] : [];
15573
15576
  return new StyledText([...rows, ...more]);
@@ -15997,7 +16000,7 @@ var init_upgrade = __esmMin((() => {
15997
16000
  return due ? `adiff ${latest} is out · adiff upgrade` : "";
15998
16001
  }).pipe(withSpan("Tui.upgradeHint"));
15999
16002
  upgradeHint = worded.pipe(orElseSucceed(() => ""));
16000
- })), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, OVER, overReview, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, chosenIn, settingsHeld, firstBranches, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
16003
+ })), KEY_HISTORY, DRAIN_PASSES, TRAIL_HISTORY, clockOf, momentOf, noticeOf, COPIERS, wayland, handOver, throughMultiplexer, copyToClipboard, lineUnder, asKey, openedPull, LISTENS, WRITES, OVER, overReview, writesInto, listens, laidOut, ARROWS, keyName, App, turnedOver, settledPath, restsWhereItLanded, chosenIn, settingsHeld, firstBranches, missing, openingOn, launch, told, untilDestroyed, runOn, runTui;
16001
16004
  var init_app = __esmMin((() => {
16002
16005
  init_dist();
16003
16006
  init_report();
@@ -16121,6 +16124,7 @@ var init_app = __esmMin((() => {
16121
16124
  sessionPath;
16122
16125
  remembered = "";
16123
16126
  chosen = {};
16127
+ selectingNow = false;
16124
16128
  grewWithShift = false;
16125
16129
  keys = [];
16126
16130
  trail = [];
@@ -16578,10 +16582,15 @@ var init_app = __esmMin((() => {
16578
16582
  });
16579
16583
  }
16580
16584
  dragged(from, to, done) {
16581
- const along = from.row === to.row && from.column !== to.column;
16582
16585
  const held = this.measured();
16586
+ if (restsWhereItLanded(from, to) && !this.selectingNow) {
16587
+ this.commit(restingOn(held, from.row));
16588
+ return;
16589
+ }
16590
+ const along = from.row === to.row;
16591
+ this.selectingNow = !done;
16583
16592
  this.commit(along ? pickedIn(held, from.row, from.column, to.column) : draggedTo(held, from.row, to.row));
16584
- if (done && (along || from.row !== to.row)) this.copySelection(true);
16593
+ if (done) this.copySelection(true);
16585
16594
  }
16586
16595
  copyDragged() {
16587
16596
  const taken = this.renderer.getSelection()?.getSelectedText() ?? "";
@@ -16729,13 +16738,14 @@ var init_app = __esmMin((() => {
16729
16738
  this.commit(withNotice(this.state, "no thread here"));
16730
16739
  return;
16731
16740
  }
16741
+ const was = this.state.panelIndex;
16732
16742
  yield* this.settling(branch.branch, id);
16733
16743
  const sent = yield* this.loadSent(branch.branch);
16734
16744
  const held = withSent({
16735
16745
  ...this.state,
16736
- opened: this.state.opened.filter((was) => was !== id)
16746
+ opened: this.state.opened.filter((one) => one !== id)
16737
16747
  }, sent);
16738
- this.commit(withNotice(this.staying(held, id), "settled"));
16748
+ this.commit(withNotice(this.staying(held, id, was), "settled"));
16739
16749
  });
16740
16750
  }
16741
16751
  replyHere() {
@@ -16753,12 +16763,13 @@ var init_app = __esmMin((() => {
16753
16763
  });
16754
16764
  });
16755
16765
  }
16756
- staying(state, id) {
16757
- const at = panelIndexOf(state, id);
16758
- const last = Math.max(0, panelEntries(state).length - 1);
16766
+ staying(state, id, was) {
16767
+ const entries = panelEntries(state);
16768
+ const last = Math.max(0, entries.length - 1);
16769
+ const at = entries.findIndex((entry) => entry.comment.id === id);
16759
16770
  return {
16760
16771
  ...state,
16761
- panelIndex: Math.min(at, last)
16772
+ panelIndex: Math.min(at === -1 ? was : at, last)
16762
16773
  };
16763
16774
  }
16764
16775
  removeHere() {
@@ -16769,13 +16780,14 @@ var init_app = __esmMin((() => {
16769
16780
  this.commit(withNotice(this.state, "no thread here"));
16770
16781
  return;
16771
16782
  }
16783
+ const was = this.state.panelIndex;
16772
16784
  yield* this.removing(branch.branch, id);
16773
16785
  const sent = yield* this.loadSent(branch.branch);
16774
16786
  const held = withSent({
16775
16787
  ...this.state,
16776
- opened: this.state.opened.filter((was) => was !== id)
16788
+ opened: this.state.opened.filter((one) => one !== id)
16777
16789
  }, sent);
16778
- this.commit(withNotice(held, "removed, restore it with comment restore"));
16790
+ this.commit(withNotice(this.staying(held, id, was), "removed, restore it with comment restore"));
16779
16791
  });
16780
16792
  }
16781
16793
  fillBranches() {
@@ -17094,6 +17106,7 @@ var init_app = __esmMin((() => {
17094
17106
  anchorRow: state.cursor
17095
17107
  });
17096
17108
  settledPath = (path) => promise(() => realpath(path).catch(() => resolve(path)));
17109
+ restsWhereItLanded = (from, to) => from.row === to.row && from.column === to.column;
17097
17110
  chosenIn = (state) => ({
17098
17111
  wrap: state.wrap,
17099
17112
  sticky: state.sticky,
@@ -17211,7 +17224,9 @@ var tui_exports = /* @__PURE__ */ __exportAll({
17211
17224
  runOn: () => runOn,
17212
17225
  runTui: () => runTui,
17213
17226
  searchCommands: () => searchCommands,
17214
- syntaxTheme: () => syntaxTheme
17227
+ searchTerm: () => searchTerm,
17228
+ syntaxTheme: () => syntaxTheme,
17229
+ withPatches: () => withPatches
17215
17230
  });
17216
17231
  var init_tui = __esmMin((() => {
17217
17232
  init_app();
@@ -17220,6 +17235,7 @@ var init_tui = __esmMin((() => {
17220
17235
  init_model();
17221
17236
  init_diffview();
17222
17237
  init_render();
17238
+ init_reduce();
17223
17239
  init_theme();
17224
17240
  }));
17225
17241
  //#endregion
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.96",
26
+ "version": "0.1.0-alpha.98",
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": {