@eliya-oss/agent-diff 0.1.0-alpha.52 → 0.1.0-alpha.54

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,19 @@
1
1
  # @eliya-oss/agent-diff
2
2
 
3
+ ## 0.1.0-alpha.54
4
+
5
+ ### Patch Changes
6
+
7
+ - A review now follows its branch instead of the folder it was read in. State was keyed on the worktree path, so renaming a worktree — or checking the same branch out somewhere else — left the entire review behind with nothing on screen to say it had happened. The key is the repository and the branch now, where the repository is the common git directory every worktree of it shares, so all the worktrees of one repo agree on where a review lives and different branches still keep their own. A store written under the old key is adopted the first time the branch is opened, so nothing already written is stranded.
8
+
9
+ - Comments handed to an agent that never answered them are no longer lost. The cursor advanced the moment `comment take` read a comment, so an agent that collected five and answered three left two that nothing would ever hand over again — and the terminal went on showing them as sent, with no sign anything was wrong. An answer is what retires a comment now, so one the agent dropped comes back on its next take and keeps coming back until it is answered. Settling or removing retires it too, since both are the reviewer saying they no longer need one. The branch list counts what the agent still owes rather than what it has yet to read, which is the number that was missing when a comment went quietly missing.
10
+
11
+ ## 0.1.0-alpha.53
12
+
13
+ ### Patch Changes
14
+
15
+ - Three places where the screen did something and said nothing about it. `}` and `{` now name the edge they hit instead of absorbing the keystroke, and when a file has been widened into a single change they name the context ladder as the reason — `+` quietly trades the changes you were stepping between for the lines around them. The review panel settles and removes the comment it is standing on, so a comment the diff cannot reach — its file deleted since, or just not the file on screen — stops being one you can see but not answer. And `… N more` counts what is below it rather than every row outside the window, so scrolling to the last file no longer promises seventeen more that are not there.
16
+
3
17
  ## 0.1.0-alpha.52
4
18
 
5
19
  ### Patch Changes
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { randomUUID } from "node:crypto";
2
- import { appendFile, mkdir, readFile, realpath, writeFile } from "node:fs/promises";
2
+ import { appendFile, mkdir, readFile, realpath, rename, stat, writeFile } from "node:fs/promises";
3
3
  import { homedir, hostname, platform } from "node:os";
4
4
  import { text } from "node:stream/consumers";
5
5
  import { dirname, join, resolve } from "node:path";
@@ -8336,7 +8336,7 @@ var init_paths = __esmMin((() => {
8336
8336
  upgradePath = (root) => join(root, "upgrade.json");
8337
8337
  reportsDir = (root) => join(root, "reports");
8338
8338
  reportPath = (root, stamp) => join(reportsDir(root), `${stamp}.md`);
8339
- })), Store, ensureDir, readOptional, missing, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, headOf$1, keyOf$2, answerOps, layersOps, inboxOps, stateOps, makeStore, storeAt;
8339
+ })), Store, ensureDir, readOptional, missing, damaged, jsonOf, decoded, asSettings, asUpgradeCheck, asBatch, asAnswer, asState, asLayers, linesOf, readLines, parseSettings, parseUpgradeCheck, parseState, parseLayers, cursorOps, settingsOps, upgradeOps, reportOps, HEAD_REF, gitDirOf, headOf$1, repoOf$2, keyOf$2, wasKeyOf, there, adopted, moved, adopt, keyIn, answerOps, layersOps, inboxOps, stateOps, makeStore, storeAt;
8340
8340
  var init_service$1 = __esmMin((() => {
8341
8341
  init_dist();
8342
8342
  init_error$2();
@@ -8407,7 +8407,7 @@ var init_service$1 = __esmMin((() => {
8407
8407
  parent: held.parent
8408
8408
  };
8409
8409
  });
8410
- cursorOps = (state, saveState, inbox) => {
8410
+ cursorOps = (state, saveState, inbox, spoken) => {
8411
8411
  return {
8412
8412
  stage: fn("Store.stage")(function* (worktreePath, comment) {
8413
8413
  const current = yield* state(worktreePath);
@@ -8441,12 +8441,17 @@ var init_service$1 = __esmMin((() => {
8441
8441
  take: fn("Store.take")(function* (worktreePath) {
8442
8442
  const batches = yield* inbox(worktreePath);
8443
8443
  const current = yield* state(worktreePath);
8444
- const pending = batches.slice(current.consumed);
8445
- if (pending.length > 0) yield* saveState(worktreePath, {
8446
- ...current,
8447
- consumed: batches.length
8444
+ const answered = new Set((yield* spoken(worktreePath)).map((entry) => entry.comment));
8445
+ const owed = (comment) => !answered.has(comment.id) && !Object.hasOwn(current.settled, comment.id) && !Object.hasOwn(current.removed, comment.id);
8446
+ return batches.flatMap((batch) => {
8447
+ const comments = batch.comments.filter(owed);
8448
+ return comments.length === 0 ? [] : [{
8449
+ id: batch.id,
8450
+ at: batch.at,
8451
+ head: batch.head,
8452
+ comments
8453
+ }];
8448
8454
  });
8449
- return pending;
8450
8455
  })
8451
8456
  };
8452
8457
  };
@@ -8509,18 +8514,40 @@ var init_service$1 = __esmMin((() => {
8509
8514
  return path;
8510
8515
  });
8511
8516
  HEAD_REF = /^ref:\s*refs\/heads\/(.+)$/;
8512
- headOf$1 = (worktreePath) => readFile(join(worktreePath, ".git"), "utf8").then((raw) => {
8517
+ gitDirOf = (worktreePath) => readFile(join(worktreePath, ".git"), "utf8").then((raw) => {
8513
8518
  const linked = raw.match(/^gitdir:\s*(.+)$/m);
8514
8519
  return linked?.[1] === void 0 ? join(worktreePath, ".git") : linked[1].trim();
8515
- }).catch(() => join(worktreePath, ".git")).then((dir) => readFile(join(dir, "HEAD"), "utf8")).then((raw) => {
8520
+ }).catch(() => join(worktreePath, ".git"));
8521
+ headOf$1 = (worktreePath) => gitDirOf(worktreePath).then((dir) => readFile(join(dir, "HEAD"), "utf8")).then((raw) => {
8516
8522
  const named = raw.trim().match(HEAD_REF);
8517
8523
  return named?.[1] === void 0 ? raw.trim() : named[1];
8518
8524
  }).catch(() => "");
8519
- keyOf$2 = (worktreePath) => promise(() => headOf$1(worktreePath).then((head) => `${worktreePath}#${head}`));
8525
+ repoOf$2 = (worktreePath) => gitDirOf(worktreePath).then((dir) => readFile(join(dir, "commondir"), "utf8").then((raw) => resolve(dir, raw.trim())).catch(() => dir));
8526
+ keyOf$2 = (worktreePath) => promise(() => Promise.all([repoOf$2(worktreePath), headOf$1(worktreePath)]).then(([repo, head]) => `${repo}#${head}`));
8527
+ wasKeyOf = (worktreePath) => promise(() => headOf$1(worktreePath).then((head) => `${worktreePath}#${head}`));
8528
+ there = (path) => stat(path).then(() => true, () => false);
8529
+ adopted = /* @__PURE__ */ new Set();
8530
+ moved = (from, to) => rename(from, to).catch(() => void 0);
8531
+ adopt = fn("Store.adopt")(function* (root, key, was) {
8532
+ const here = branchDir(root, key);
8533
+ if (yield* promise(() => there(here))) return key;
8534
+ const older = branchDir(root, was);
8535
+ if (!(yield* promise(() => there(older)))) return key;
8536
+ yield* promise(() => moved(older, here));
8537
+ return key;
8538
+ });
8539
+ keyIn = (root, worktreePath) => gen(function* () {
8540
+ const key = yield* keyOf$2(worktreePath);
8541
+ const mark = `${root}#${key}`;
8542
+ if (adopted.has(mark)) return key;
8543
+ adopted.add(mark);
8544
+ const was = yield* wasKeyOf(worktreePath);
8545
+ return key === was ? key : yield* adopt(root, key, was);
8546
+ });
8520
8547
  answerOps = (root) => {
8521
8548
  return {
8522
8549
  answer: fn("Store.answer")(function* (worktreePath, entry) {
8523
- const key = yield* keyOf$2(worktreePath);
8550
+ const key = yield* keyIn(root, worktreePath);
8524
8551
  const path = outboxPath(root, key);
8525
8552
  yield* ensureDir(branchDir(root, key));
8526
8553
  yield* tryPromise({
@@ -8532,7 +8559,7 @@ var init_service$1 = __esmMin((() => {
8532
8559
  });
8533
8560
  }),
8534
8561
  answers: fn("Store.answers")(function* (worktreePath) {
8535
- const key = yield* keyOf$2(worktreePath);
8562
+ const key = yield* keyIn(root, worktreePath);
8536
8563
  const path = outboxPath(root, key);
8537
8564
  const raw = yield* readOptional(path);
8538
8565
  return yield* match$3(raw, {
@@ -8545,14 +8572,14 @@ var init_service$1 = __esmMin((() => {
8545
8572
  layersOps = (root) => {
8546
8573
  return {
8547
8574
  layers: fn("Store.layers")(function* (worktreePath) {
8548
- const key = yield* keyOf$2(worktreePath);
8575
+ const key = yield* keyIn(root, worktreePath);
8549
8576
  const path = layersPath(root, key);
8550
8577
  const raw = yield* readOptional(path);
8551
8578
  if (isNone(raw)) return none();
8552
8579
  return some(yield* parseLayers(path, raw.value));
8553
8580
  }),
8554
8581
  saveLayers: fn("Store.saveLayers")(function* (worktreePath, next) {
8555
- const key = yield* keyOf$2(worktreePath);
8582
+ const key = yield* keyIn(root, worktreePath);
8556
8583
  const path = layersPath(root, key);
8557
8584
  yield* ensureDir(branchDir(root, key));
8558
8585
  yield* tryPromise({
@@ -8568,7 +8595,7 @@ var init_service$1 = __esmMin((() => {
8568
8595
  inboxOps = (root) => {
8569
8596
  return {
8570
8597
  submit: fn("Store.submit")(function* (worktreePath, batch) {
8571
- const key = yield* keyOf$2(worktreePath);
8598
+ const key = yield* keyIn(root, worktreePath);
8572
8599
  const path = inboxPath(root, key);
8573
8600
  yield* ensureDir(branchDir(root, key));
8574
8601
  yield* tryPromise({
@@ -8580,7 +8607,7 @@ var init_service$1 = __esmMin((() => {
8580
8607
  });
8581
8608
  }),
8582
8609
  inbox: fn("Store.inbox")(function* (worktreePath) {
8583
- const key = yield* keyOf$2(worktreePath);
8610
+ const key = yield* keyIn(root, worktreePath);
8584
8611
  const path = inboxPath(root, key);
8585
8612
  const raw = yield* readOptional(path);
8586
8613
  return yield* match$3(raw, {
@@ -8593,7 +8620,7 @@ var init_service$1 = __esmMin((() => {
8593
8620
  stateOps = (root) => {
8594
8621
  return {
8595
8622
  state: fn("Store.state")(function* (worktreePath) {
8596
- const key = yield* keyOf$2(worktreePath);
8623
+ const key = yield* keyIn(root, worktreePath);
8597
8624
  const path = statePath(root, key);
8598
8625
  const raw = yield* readOptional(path);
8599
8626
  return yield* match$3(raw, {
@@ -8602,7 +8629,7 @@ var init_service$1 = __esmMin((() => {
8602
8629
  });
8603
8630
  }),
8604
8631
  saveState: fn("Store.saveState")(function* (worktreePath, next) {
8605
- const key = yield* keyOf$2(worktreePath);
8632
+ const key = yield* keyIn(root, worktreePath);
8606
8633
  const path = statePath(root, key);
8607
8634
  yield* ensureDir(branchDir(root, key));
8608
8635
  yield* tryPromise({
@@ -8618,7 +8645,8 @@ var init_service$1 = __esmMin((() => {
8618
8645
  makeStore = (root) => {
8619
8646
  const { submit, inbox } = inboxOps(root);
8620
8647
  const { state, saveState } = stateOps(root);
8621
- const cursors = cursorOps(state, saveState, inbox);
8648
+ const talk = answerOps(root);
8649
+ const cursors = cursorOps(state, saveState, inbox, talk.answers);
8622
8650
  return {
8623
8651
  root,
8624
8652
  branchAt: (worktreePath) => promise(() => headOf$1(worktreePath)),
@@ -8629,7 +8657,7 @@ var init_service$1 = __esmMin((() => {
8629
8657
  saveReport: reportOps(root),
8630
8658
  ...settingsOps(root),
8631
8659
  ...upgradeOps(root),
8632
- ...answerOps(root),
8660
+ ...talk,
8633
8661
  ...layersOps(root),
8634
8662
  ...cursors
8635
8663
  };
@@ -8696,11 +8724,11 @@ var init_commands = __esmMin((() => {
8696
8724
  waitingOn = fn("Cli.waitingOn")(function* (worktree) {
8697
8725
  const store = yield* Store;
8698
8726
  const state = yield* store.state(worktree.path);
8699
- const batches = yield* store.inbox(worktree.path);
8727
+ const owed = yield* store.take(worktree.path);
8700
8728
  const told = yield* store.layers(worktree.path);
8701
8729
  return {
8702
8730
  staged: state.pending.length,
8703
- unread: Math.max(0, batches.length - state.consumed),
8731
+ unread: owed.reduce((total, batch) => total + batch.comments.length, 0),
8704
8732
  layers: match$3(told, {
8705
8733
  onNone: () => 0,
8706
8734
  onSome: (layers) => layers.layers.length
@@ -9230,7 +9258,7 @@ var init_pane = __esmMin((() => {
9230
9258
  init_commands();
9231
9259
  init_init();
9232
9260
  init_pane();
9233
- var version$1 = "0.1.0-alpha.52";
9261
+ var version$1 = "0.1.0-alpha.54";
9234
9262
  //#endregion
9235
9263
  //#region src/cli/upgrade.ts
9236
9264
  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;
@@ -10135,10 +10163,10 @@ var init_catalog = __esmMin((() => {
10135
10163
  },
10136
10164
  {
10137
10165
  name: "comment take",
10138
- about: "Collect the comments this review has not handed over yet. Exactly-once",
10166
+ about: "Collect the comments this review is still owed an answer on. Repeats until answered",
10139
10167
  group: ANSWER_COMMENTS,
10140
10168
  addresses: "review",
10141
- safety: "write",
10169
+ safety: "read",
10142
10170
  options: [...addressing, {
10143
10171
  name: "wait",
10144
10172
  required: false,
@@ -10951,7 +10979,7 @@ var init_tree = __esmMin((() => {
10951
10979
  return node.children.reduce((total, child) => total + filesUnder(tree, child), 0);
10952
10980
  };
10953
10981
  crowdedDirectories = (tree, limit) => tree.nodes.filter((node) => node.kind === "directory" && directFiles(tree, node.id) > limit).map((node) => node.path);
10954
- })), nothingReviewed, initialState, BODY_BORDER, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, PANEL_WIDTH, 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, treeOf, treeRows, crowdedOf, foldersOfFile, isReviewed, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, caretAt, drafted, WORD, wordLeft, wordRight, caretByWord, lineStart, lineEnd, caretToEdge, editedComment, composeTarget, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelEntry, spokenSince, hunkStarts, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
10982
+ })), nothingReviewed, initialState, BODY_BORDER, TREE_MAX, TREE_MIN, TREE_SHARE, DIFF_MIN, PANEL_WIDTH, 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, treeOf, treeRows, crowdedOf, foldersOfFile, isReviewed, treeWindow, commentsOn, hiddenLines, markedRows, carriesLine, selectedRows, snippetOf, selectedLineCount, lineOf, caretAt, drafted, WORD, wordLeft, wordRight, caretByWord, lineStart, lineEnd, caretToEdge, editedComment, composeTarget, selectedLines, KEYWORDS, NAME, longestName$1, searchTerm, matchHere, selectionReadout, WHOLE_FILE, CONTEXT_STEPS, wholeFileOff, contextToggled, layerContext, newLineAt, sourceLineAt, rowAtSourceLine, lineOnSide, commentRowsIn, threadsAtRow, stopsAtRow, threadAtStop, threadAtRow, openCommentRows, filesWithComments, answerCount, answersIn, newerOf, sectionOf, sentEntry, panelEntries, panelEntry, threadChosen, spokenSince, hunkStarts, changeAround, nextUnreviewed, reviewedCount, fileOrder, layerFile, selectionRange;
10955
10983
  var init_model = __esmMin((() => {
10956
10984
  init_dist();
10957
10985
  init_patch();
@@ -11131,7 +11159,7 @@ var init_model = __esmMin((() => {
11131
11159
  const start = Math.max(0, Math.min(rows.length - height, wanted));
11132
11160
  return {
11133
11161
  rows: rows.slice(start, start + height),
11134
- more: rows.length - height
11162
+ more: rows.length - (start + height)
11135
11163
  };
11136
11164
  };
11137
11165
  selectedBranch = (state) => state.branches[state.branchIndex];
@@ -11166,7 +11194,7 @@ var init_model = __esmMin((() => {
11166
11194
  const start = Math.max(0, Math.min(rows.length - height, anchor - Math.floor(height / 2)));
11167
11195
  return {
11168
11196
  rows: rows.slice(start, start + height),
11169
- more: rows.length - height
11197
+ more: rows.length - (start + height)
11170
11198
  };
11171
11199
  };
11172
11200
  commentsOn = (state, fileIndex) => {
@@ -11399,6 +11427,11 @@ var init_model = __esmMin((() => {
11399
11427
  ];
11400
11428
  };
11401
11429
  panelEntry = (state) => panelEntries(state)[state.panelIndex];
11430
+ threadChosen = (state) => {
11431
+ if (state.focus !== "review") return void 0;
11432
+ const entry = panelEntry(state);
11433
+ return entry === void 0 || entry.section === "staged" ? void 0 : entry.comment;
11434
+ };
11402
11435
  spokenSince = (seen, now) => Math.max(0, answerCount(now) - answerCount(seen));
11403
11436
  hunkStarts = (state) => {
11404
11437
  const patch = selectedPatch(state);
@@ -12092,7 +12125,7 @@ var init_match = __esmMin((() => {
12092
12125
  }));
12093
12126
  //#endregion
12094
12127
  //#region src/tui/reduce.ts
12095
- var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown, nextFocus, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, withPending, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, withPatches, inserted, typed, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, pasted, backspaced, deleted, caretMoved, caretJumped, caretHomed, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
12128
+ var clamp, lastRow, rowsIn, withCursorVisible, moveCursor, stepStop, scrolled, draggedTo, atRow, noneLeft, layerHunk, nextFileWithComments, atComment, nothingOpen, layerComment, PAN_STEP, panned, movePending, moveLayer, inRail, movePanel, layerDown, nextFocus, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, moveFile, selectHunk, swapEnds, atBranch, startSelection, openCompose, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, offered, paletteChoice, transitions, reduce, atFile, withContext, withFull, revealsAfter, gapOpened, withPending, panBy, withSent, withArrived, withColumns, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, withPatches, inserted, typed, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, pasted, backspaced, deleted, caretMoved, caretJumped, caretHomed, withDraft, paletteMoved, paletteClosed, withWaiting, withMatches, withNoticeHere, withNotice;
12096
12129
  var init_reduce = __esmMin((() => {
12097
12130
  init_dist();
12098
12131
  init_patch();
@@ -12157,10 +12190,14 @@ var init_reduce = __esmMin((() => {
12157
12190
  stop: 0,
12158
12191
  cursor: clamp(row, 0, lastRow(selectedPatch(state)))
12159
12192
  });
12193
+ noneLeft = (state, delta) => {
12194
+ const only = hunkStarts(state).length <= 1;
12195
+ return withNotice(state, only ? "this file reads as one change · press - for less context to split it" : `no change ${delta > 0 ? "after" : "before"} this one`);
12196
+ };
12160
12197
  layerHunk = (state, delta) => {
12161
12198
  const starts = hunkStarts(state);
12162
12199
  const target = delta > 0 ? starts.find((start) => start > state.cursor) : starts.findLast((start) => start < state.cursor);
12163
- return target === void 0 ? state : atRow(state, target);
12200
+ return target === void 0 ? noneLeft(state, delta) : atRow(state, target);
12164
12201
  };
12165
12202
  nextFileWithComments = (state, delta) => {
12166
12203
  const elsewhere = filesWithComments(state).filter((index) => index !== state.patchIndex);
@@ -13731,7 +13768,7 @@ var init_render = __esmMin((() => {
13731
13768
  };
13732
13769
  waitingLabel = (branch) => {
13733
13770
  if (branch.staged > 0) return `${branch.staged} staged`;
13734
- return branch.unread > 0 ? `${branch.unread} unread` : "";
13771
+ return branch.unread > 0 ? `${branch.unread} unanswered` : "";
13735
13772
  };
13736
13773
  inRange = (state, row, from, to) => state.selecting && row >= from && row <= to;
13737
13774
  notesOf = (comments, path, sent, opened = []) => comments.filter((entry) => entry.file === path).map((entry) => ({
@@ -14093,7 +14130,7 @@ var init_render = __esmMin((() => {
14093
14130
  this.chips = hintsFor(state.screen, {
14094
14131
  staged: state.staged,
14095
14132
  layers: state.layers.length,
14096
- onThread: state.stop > 0,
14133
+ onThread: state.stop > 0 || threadChosen(state) !== void 0,
14097
14134
  pull: pullHere(state).length > 0
14098
14135
  });
14099
14136
  this.header.content = this.headerText(state);
@@ -15123,7 +15160,7 @@ var init_app = __esmMin((() => {
15123
15160
  settleHere() {
15124
15161
  return gen({ self: this }, function* () {
15125
15162
  const branch = selectedBranch(this.state);
15126
- const id = (threadAtStop(this.state) ?? threadAtRow(this.state, this.state.cursor))?.id;
15163
+ const id = (threadChosen(this.state) ?? threadAtStop(this.state) ?? threadAtRow(this.state, this.state.cursor))?.id;
15127
15164
  if (branch === void 0 || id === void 0) {
15128
15165
  this.commit(withNotice(this.state, "no thread here"));
15129
15166
  return;
@@ -15140,7 +15177,7 @@ var init_app = __esmMin((() => {
15140
15177
  removeHere() {
15141
15178
  return gen({ self: this }, function* () {
15142
15179
  const branch = selectedBranch(this.state);
15143
- const id = (threadAtStop(this.state) ?? threadAtRow(this.state, this.state.cursor))?.id;
15180
+ const id = (threadChosen(this.state) ?? threadAtStop(this.state) ?? threadAtRow(this.state, this.state.cursor))?.id;
15144
15181
  if (branch === void 0 || id === void 0) {
15145
15182
  this.commit(withNotice(this.state, "no thread here"));
15146
15183
  return;
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.52",
26
+ "version": "0.1.0-alpha.54",
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": {