@eliya-oss/agent-diff 0.1.0-alpha.135 → 0.1.0-alpha.137
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/.claude/skills/release-notes/SKILL.md +126 -10
- package/CHANGELOG.md +74 -0
- package/dist/main.js +178 -32
- package/package.json +4 -2
|
@@ -32,7 +32,14 @@ If you are unsure, ask: would someone who upgraded notice? If no, no file.
|
|
|
32
32
|
|
|
33
33
|
## The shape of a change intent
|
|
34
34
|
|
|
35
|
-
`.changeset/<name>.md
|
|
35
|
+
`.changeset/<name>.md`. Name it the way you would name the test: the sentence, kebab-cased, no
|
|
36
|
+
gerund — `a-file-with-an-accent.md`, not `keeping-a-file-with-an-accent.md`. The bump is `patch`
|
|
37
|
+
until this reaches 1.0, whatever the kind says.
|
|
38
|
+
|
|
39
|
+
`.changeset/` holds only what has not shipped yet, so it is usually empty or nearly so. A release
|
|
40
|
+
collects the intents it consumed and deletes them — their words live on in `CHANGELOG.md`, and
|
|
41
|
+
`.changeset/ledger.yaml` records which release took which. Do not go looking for a neighbouring
|
|
42
|
+
file to copy; follow this page.
|
|
36
43
|
|
|
37
44
|
```markdown
|
|
38
45
|
---
|
|
@@ -137,22 +144,131 @@ tests, or how long it took you. Those belong in the PR.
|
|
|
137
144
|
|
|
138
145
|
## The PR description
|
|
139
146
|
|
|
140
|
-
|
|
147
|
+
### The template
|
|
148
|
+
|
|
149
|
+
```markdown
|
|
150
|
+
One paragraph. What this changes, and what prompted it. Two or three sentences.
|
|
151
|
+
|
|
152
|
+
## What changed
|
|
153
|
+
|
|
154
|
+
### Fixed
|
|
155
|
+
|
|
156
|
+
- **Layers rail** — the cursor stays on the rail when you collapse the layer you are reading.
|
|
157
|
+
- **Reading order** — a first layer naming no file in the diff opens at the first file, not the last.
|
|
158
|
+
|
|
159
|
+
### Added
|
|
160
|
+
|
|
161
|
+
- **Search** — typing narrows the matches as you type.
|
|
162
|
+
|
|
163
|
+
## The rail lost the cursor when you folded the layer you were in
|
|
164
|
+
|
|
165
|
+
The repro, as keys to press. Then what the fix was.
|
|
166
|
+
|
|
167
|
+
<table>
|
|
168
|
+
<tr><th>Before</th><th>After</th></tr>
|
|
169
|
+
<tr>
|
|
170
|
+
<td><img src="https://github.com/user-attachments/assets/…" alt="before"></td>
|
|
171
|
+
<td><img src="https://github.com/user-attachments/assets/…" alt="after"></td>
|
|
172
|
+
</tr>
|
|
173
|
+
</table>
|
|
174
|
+
|
|
175
|
+
## Reading order opened at the end
|
|
176
|
+
|
|
177
|
+
The repro. Then what the fix was.
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
- The **title** is the entry sentence without the `kind(area):` prefix, and follows the same
|
|
181
|
+
no-gerund rule.
|
|
182
|
+
- **`## What changed` is generated, never typed.** `node scripts/pr-summary.ts` prints it from the
|
|
183
|
+
change intents on this branch. The PR and the changelog then cannot drift apart. Commit the
|
|
184
|
+
intent first — the summary is read from the diff against `origin/main`, so an uncommitted file
|
|
185
|
+
is not on the branch yet and the script will say there is nothing to paste.
|
|
186
|
+
- **One `##` section per thing changed**, in the order the bullets list them, titled with the
|
|
187
|
+
symptom rather than the fix. That is what a reader searching their own bug will match on.
|
|
188
|
+
- A PR with **one entry and nothing to reproduce** is a title and a sentence. The template starts
|
|
189
|
+
earning its keep at two. This is about the `##` sections, not about the pictures: a single-entry
|
|
190
|
+
PR that changes a screen still owes a before and an after.
|
|
191
|
+
- A PR with **no change intent** — a refactor, a test, a doc — writes prose. `pnpm pr-summary`
|
|
192
|
+
will tell you there is nothing to paste, and that is the correct answer, not a problem to fix.
|
|
193
|
+
|
|
194
|
+
### What never goes in a PR body
|
|
195
|
+
|
|
196
|
+
- **Raw command output.** No `ls` listings, no shell transcripts, no stack traces pasted whole.
|
|
197
|
+
Quote the one line that matters.
|
|
198
|
+
- **Backticks around anything a shell would run.** Writing a body in a heredoc executes
|
|
199
|
+
`` `l` `` and pastes its output into your prose. Write the body to a file, then
|
|
200
|
+
`gh pr create --body-file`.
|
|
201
|
+
- **Test counts, timings, or self-assessment.** No "full suite green", no "740 tests", no
|
|
202
|
+
"verified twice". CI says whether the tests pass.
|
|
203
|
+
- **Anything from a private repository.** See below.
|
|
204
|
+
|
|
205
|
+
### Nothing private, ever
|
|
206
|
+
|
|
207
|
+
This repository is public, and so is every PR body, screenshot and recording attached to it. Before
|
|
208
|
+
you open or edit a PR, read what you wrote and confirm none of it carries:
|
|
209
|
+
|
|
210
|
+
- an employer's or a customer's name, or a private repository's name
|
|
211
|
+
- a ticket id, an internal URL, a dashboard link, or an internal hostname
|
|
212
|
+
- a real branch name, file path, or line of source from private work
|
|
213
|
+
- a colleague's name or address, or any credential, token or key
|
|
214
|
+
|
|
215
|
+
A screenshot leaks all of this faster than prose does, which is why **every capture runs against the
|
|
216
|
+
synthetic demo repository** — `scripts/simulate.ts` builds a repo of invented invitation code with
|
|
217
|
+
invented branch names. Never screenshot a review of real work. If you cannot reproduce a bug on the
|
|
218
|
+
synthetic repo, describe it instead, or seed what you need in `scripts/simulation/seed.ts`.
|
|
219
|
+
|
|
220
|
+
An attachment cannot be deleted once uploaded. There is no public deletion API for
|
|
221
|
+
user-attachments, so a leak is permanent.
|
|
222
|
+
|
|
223
|
+
### Showing a screen
|
|
224
|
+
|
|
225
|
+
adiff is a terminal, so a screenshot is a real PNG of a real terminal, captured with
|
|
226
|
+
[terminal-control](https://github.com/anomalyco/terminal-control) and uploaded to GitHub's
|
|
227
|
+
attachment store.
|
|
228
|
+
|
|
229
|
+
```bash
|
|
230
|
+
cargo install --locked terminal-control # once
|
|
231
|
+
gh extension install drogers0/gh-image # once, then `gh image check-token`
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**Something new** gets one image:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
pnpm shot --keys "enter text:l" --label "a layer opened"
|
|
238
|
+
```
|
|
239
|
+
|
|
240
|
+
**Something that changed** gets a before and an after, in a one-row table so the two sit side by
|
|
241
|
+
side rather than a screen apart:
|
|
242
|
+
|
|
243
|
+
```bash
|
|
244
|
+
pnpm shot --keys "enter text:l" --label "the layers rail" --against origin/main
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
`--against` builds a worktree at the merge base, captures the same keystrokes on the code as it was,
|
|
248
|
+
and prints the finished `<table>` with both images uploaded. Paste it under the section it belongs
|
|
249
|
+
to. If the two frames come out identical the script says so and stops — those keys do not reach the
|
|
250
|
+
screen you changed.
|
|
251
|
+
|
|
252
|
+
**Something about motion** — scroll feel, focus moving, a gap opening ten lines at a time — gets a
|
|
253
|
+
recording, because a still frame cannot show it:
|
|
254
|
+
|
|
255
|
+
```bash
|
|
256
|
+
pnpm shot --keys "enter text:l text:l text:l" --label "the gap opening" --video
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
That prints a bare URL. Leave it bare: GitHub wraps a player around a user-attachments URL on its
|
|
260
|
+
own line, and `` image markdown around a video renders nothing.
|
|
141
261
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
- Reproduction steps and the reasoning go in the body. That is what the body is for, and it is why
|
|
146
|
-
the changelog does not need them.
|
|
147
|
-
- Never paste raw command output, a directory listing, or a shell transcript into a PR body. Check
|
|
148
|
-
what you wrote actually renders before you open the PR.
|
|
149
|
-
- No test counts, no "full suite green", no self-assessment.
|
|
262
|
+
Keys are termctrl's: `enter`, `escape`, `tab`, `up`, `down`, `page-up`, `ctrl-a` through `ctrl-z`,
|
|
263
|
+
and `text:<value>` for anything typed, including single letters like `text:l`. Add `--keep` to leave
|
|
264
|
+
the files in `shots/` instead of deleting them after upload.
|
|
150
265
|
|
|
151
266
|
## Before you open the PR
|
|
152
267
|
|
|
153
268
|
```bash
|
|
154
269
|
node scripts/changelog.ts # rewrites CHANGELOG.md from every change intent
|
|
155
270
|
node scripts/changelog.ts 0.1.0-alpha.133 # prints one release's note, as the release page shows it
|
|
271
|
+
node scripts/pr-summary.ts # prints the `## What changed` block for this branch
|
|
156
272
|
```
|
|
157
273
|
|
|
158
274
|
`CHANGELOG.md` is regenerated by the release workflow, so it does not need to be committed with the
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,79 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.137
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix(diff): a layer's prose carries a rule down its margin, so it cannot be read as the file.
|
|
8
|
+
|
|
9
|
+
<details><summary>What was wrong</summary>
|
|
10
|
+
|
|
11
|
+
The prose sat between two lines of code with no line number, no marker and nothing else to say it was not part of the file, so a note about the change below it read as stray markdown someone had committed.
|
|
12
|
+
|
|
13
|
+
</details>
|
|
14
|
+
|
|
15
|
+
perf(diff): turning to the next file takes about 15ms, down from about 77ms.
|
|
16
|
+
|
|
17
|
+
<details><summary>What was wrong</summary>
|
|
18
|
+
|
|
19
|
+
Every turn read the whole file at both ends of the diff before the screen moved, and those two reads exist only to feed syntax highlighting. The diff itself is already in memory, so the file now opens straight away and the colour follows it.
|
|
20
|
+
|
|
21
|
+
</details>
|
|
22
|
+
|
|
23
|
+
- feat(keys): `t` shows or hides the file list on its own, leaving the review panel where it is.
|
|
24
|
+
|
|
25
|
+
<details><summary>What was wrong</summary>
|
|
26
|
+
|
|
27
|
+
`z` hid the file list and the review panel together, so reading a wide diff beside your comments meant hiding both and bringing one back — `z` then `a`, which works by accident of composition rather than because anything offers it.
|
|
28
|
+
|
|
29
|
+
</details>
|
|
30
|
+
|
|
31
|
+
fix(footer): a stale reading order says which key asks for a new one.
|
|
32
|
+
|
|
33
|
+
<details><summary>What was wrong</summary>
|
|
34
|
+
|
|
35
|
+
The header said `layers stale` and stopped there, and `L` was in neither footer, so the one thing to do about it was only findable by reading the key sheet. The header now names the key, and the footer offers it while the order is stale.
|
|
36
|
+
|
|
37
|
+
</details>
|
|
38
|
+
|
|
39
|
+
## 0.1.0-alpha.136
|
|
40
|
+
|
|
41
|
+
### Patch Changes
|
|
42
|
+
|
|
43
|
+
- fix(layers rail): the wheel keeps working after a flick, and moves one file per notch.
|
|
44
|
+
|
|
45
|
+
<details><summary>What was wrong</summary>
|
|
46
|
+
|
|
47
|
+
The guard that stopped a trackpad flick running on past the gesture was never cleared when a move failed, so after one bad load the rail stopped answering the wheel entirely. It is cleared whatever happens now, and a notch that arrives mid-load is remembered rather than thrown away, so movement keeps up with the gesture instead of dropping out of it.
|
|
48
|
+
|
|
49
|
+
The wheel was also registered twice over the file list — once on the pane and once on the text inside it — so a single notch moved two files.
|
|
50
|
+
|
|
51
|
+
</details>
|
|
52
|
+
|
|
53
|
+
perf(diff): the diff is not handed to the highlighter again when only the pane width changed.
|
|
54
|
+
|
|
55
|
+
<details><summary>What was wrong</summary>
|
|
56
|
+
|
|
57
|
+
Toggling the review panel reassigned the code pane's contents even though the text was identical, which starts a fresh parse and draws the file unhighlighted until it finishes.
|
|
58
|
+
|
|
59
|
+
</details>
|
|
60
|
+
|
|
61
|
+
- fix(key sheet): `?` fills the screen and lays the keys out in two columns under their section headings.
|
|
62
|
+
|
|
63
|
+
<details><summary>What was wrong</summary>
|
|
64
|
+
|
|
65
|
+
Fifty keys were drawn in one narrow column the same size and shape as the command palette, so it scrolled even on a tall terminal and the category was repeated on every row instead of heading a section. The two columns fit most of the sheet at once, the headings say what each group is, and the space the repeated category took goes to the descriptions, which were being cut mid-word.
|
|
66
|
+
|
|
67
|
+
</details>
|
|
68
|
+
|
|
69
|
+
- fix(review panel): opening the panel puts the keys on it, and closing gives them back to the pane you came from.
|
|
70
|
+
|
|
71
|
+
<details><summary>What was wrong</summary>
|
|
72
|
+
|
|
73
|
+
`a` opened the panel and left the keys wherever they were, so the comments you had just asked to see could not be moved through without a second press of `tab`. Closing it sent the keys to the diff whatever you had been reading before, so opening and closing the panel quietly moved you off the file list. The panel is left alone when there is nothing in it to read.
|
|
74
|
+
|
|
75
|
+
</details>
|
|
76
|
+
|
|
3
77
|
## 0.1.0-alpha.135
|
|
4
78
|
|
|
5
79
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -11098,7 +11098,7 @@ var init_pane = __esmMin((() => {
|
|
|
11098
11098
|
init_drafts();
|
|
11099
11099
|
init_init();
|
|
11100
11100
|
init_pane();
|
|
11101
|
-
var version$1 = "0.1.0-alpha.
|
|
11101
|
+
var version$1 = "0.1.0-alpha.137";
|
|
11102
11102
|
//#endregion
|
|
11103
11103
|
//#region src/cli/upgrade.ts
|
|
11104
11104
|
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;
|
|
@@ -13154,7 +13154,8 @@ var init_model = __esmMin((() => {
|
|
|
13154
13154
|
scroll: -1,
|
|
13155
13155
|
railRows: 12,
|
|
13156
13156
|
railScroll: -1,
|
|
13157
|
-
now: 0
|
|
13157
|
+
now: 0,
|
|
13158
|
+
focusWas: "diff"
|
|
13158
13159
|
};
|
|
13159
13160
|
initialState = (branches) => ({
|
|
13160
13161
|
...nothingReviewed,
|
|
@@ -13929,6 +13930,7 @@ var init_command = __esmMin((() => {
|
|
|
13929
13930
|
whenComments: false,
|
|
13930
13931
|
counted: false,
|
|
13931
13932
|
whenLayers: false,
|
|
13933
|
+
whenStale: false,
|
|
13932
13934
|
whenThread: false,
|
|
13933
13935
|
whenSelecting: false,
|
|
13934
13936
|
whenReviewed: false,
|
|
@@ -14375,6 +14377,20 @@ var init_command = __esmMin((() => {
|
|
|
14375
14377
|
whenReviewed: true,
|
|
14376
14378
|
rank: 3
|
|
14377
14379
|
}),
|
|
14380
|
+
command({
|
|
14381
|
+
action: "nav.toggle",
|
|
14382
|
+
also: [
|
|
14383
|
+
"sidebar",
|
|
14384
|
+
"file list",
|
|
14385
|
+
"collapse",
|
|
14386
|
+
"expand",
|
|
14387
|
+
"hide files"
|
|
14388
|
+
],
|
|
14389
|
+
title: "Show or hide the file list",
|
|
14390
|
+
category: "Reading",
|
|
14391
|
+
keys: ["t"],
|
|
14392
|
+
screens: ["review"]
|
|
14393
|
+
}),
|
|
14378
14394
|
command({
|
|
14379
14395
|
action: "layers.ask",
|
|
14380
14396
|
also: [
|
|
@@ -14385,7 +14401,10 @@ var init_command = __esmMin((() => {
|
|
|
14385
14401
|
title: "Ask the agent for a reading order",
|
|
14386
14402
|
category: "Files",
|
|
14387
14403
|
keys: ["L"],
|
|
14388
|
-
screens: ["review"]
|
|
14404
|
+
screens: ["review"],
|
|
14405
|
+
hint: "new order",
|
|
14406
|
+
rank: 6,
|
|
14407
|
+
whenStale: true
|
|
14389
14408
|
}),
|
|
14390
14409
|
command({
|
|
14391
14410
|
action: "rail.toggle",
|
|
@@ -14638,7 +14657,7 @@ var init_command = __esmMin((() => {
|
|
|
14638
14657
|
if (swapped !== void 0) return swapped(offered);
|
|
14639
14658
|
return entry.counted ? `${entry.hint} ${offered.comments}` : entry.hint;
|
|
14640
14659
|
};
|
|
14641
|
-
hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenComments || offered.comments > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenSelecting || offered.selecting).filter((entry) => !entry.whenReviewed || offered.reviewed > 0).filter((entry) => !entry.whenPull || offered.pull).filter((entry) => entry.panes.includes(offered.pane)).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
|
|
14660
|
+
hintsFor = (screen, offered) => commandsFor(screen).filter((entry) => entry.hint.length > 0).filter((entry) => !entry.whenComments || offered.comments > 0).filter((entry) => !entry.whenLayers || offered.layers > 0).filter((entry) => !entry.whenStale || offered.stale).filter((entry) => !entry.whenThread || offered.onThread).filter((entry) => !entry.whenSelecting || offered.selecting).filter((entry) => !entry.whenReviewed || offered.reviewed > 0).filter((entry) => !entry.whenPull || offered.pull).filter((entry) => entry.panes.includes(offered.pane)).toSorted((left, right) => left.rank - right.rank).map((entry) => ({
|
|
14642
14661
|
key: displayKey(entry.keys[0] ?? ""),
|
|
14643
14662
|
hint: hintOf(entry, offered),
|
|
14644
14663
|
press: entry.keys[0] ?? ""
|
|
@@ -14646,7 +14665,7 @@ var init_command = __esmMin((() => {
|
|
|
14646
14665
|
}));
|
|
14647
14666
|
//#endregion
|
|
14648
14667
|
//#region src/tui/match.ts
|
|
14649
|
-
var subsequence, label, matches, closeness, searchCommands, searchGlossary;
|
|
14668
|
+
var subsequence, label, matches, closeness, searchCommands, byCategory, searchGlossary;
|
|
14650
14669
|
var init_match = __esmMin((() => {
|
|
14651
14670
|
init_command();
|
|
14652
14671
|
subsequence = (haystack, needle) => {
|
|
@@ -14669,11 +14688,20 @@ var init_match = __esmMin((() => {
|
|
|
14669
14688
|
return label(entry).includes(wanted) ? 3 : 4;
|
|
14670
14689
|
};
|
|
14671
14690
|
searchCommands = (screen, query) => listableFor(screen).filter((entry) => matches(entry, query)).toSorted((left, right) => closeness(left, query) - closeness(right, query));
|
|
14672
|
-
|
|
14691
|
+
byCategory = (screen) => {
|
|
14692
|
+
const seen = /* @__PURE__ */ new Map();
|
|
14693
|
+
for (const entry of glossaryFor(screen)) if (!seen.has(entry.category)) seen.set(entry.category, seen.size);
|
|
14694
|
+
return seen;
|
|
14695
|
+
};
|
|
14696
|
+
searchGlossary = (screen, query) => {
|
|
14697
|
+
const order = byCategory(screen);
|
|
14698
|
+
const placed = (entry) => order.get(entry.category) ?? order.size;
|
|
14699
|
+
return glossaryFor(screen).filter((entry) => matches(entry, query)).toSorted((left, right) => closeness(left, query) - closeness(right, query) || placed(left) - placed(right));
|
|
14700
|
+
};
|
|
14673
14701
|
}));
|
|
14674
14702
|
//#endregion
|
|
14675
14703
|
//#region src/tui/reduce.ts
|
|
14676
|
-
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, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, panesShown, focusStepped, togglePanel, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withSent, withArrived, withColumns, laidOver, onLayerHolding, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withFinder, withMatches, withNoticeHere, withNotice;
|
|
14704
|
+
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, stepsToEnd, toTop, farOff, byHalf, boundedStep, PANEL_FAR, PANES, panesShown, focusStepped, togglePanel, toggleNav, packedAway, zoom, toggleRail, foldDirectory, foldLayer, foldThread, fold, moveBranch, landingOn, revealing, atTheEnd, moveFile, selectHunk, swapEnds, atBranch, grownBy, startSelection, draftMark, openCompose, outOfDiff, goBack, walkMatches, openPalette, openKeys, movePalette, paletteMatches, keyMatches, offered, paletteChoice, transitions, reduce, resumedAt, atFile, withContext, withFull, allRevealed, revealsAfter, gapShown, gapOpened, panBy, withSent, withArrived, withColumns, laidOver, onLayerHolding, withLayers, withPulls, withSilentForge, withBranches, withSource, withVouched, restoredTo, openedAt, withPatches, TAB_WIDTH, SPACE_CODE, ERASED_FROM, ERASED_TO, readable, legible, withDraft, paletteMoved, paletteClosed, withWaiting, withFinder, withMatches, withNoticeHere, withNotice;
|
|
14677
14705
|
var init_reduce = __esmMin((() => {
|
|
14678
14706
|
init_dist();
|
|
14679
14707
|
init_patch();
|
|
@@ -14895,15 +14923,34 @@ var init_reduce = __esmMin((() => {
|
|
|
14895
14923
|
};
|
|
14896
14924
|
togglePanel = (state) => {
|
|
14897
14925
|
if (!panelFits(state)) return withNotice(state, "the terminal is too narrow for the review panel");
|
|
14898
|
-
|
|
14926
|
+
if (state.panelOpen) return {
|
|
14927
|
+
...state,
|
|
14928
|
+
panelOpen: false,
|
|
14929
|
+
panelWas: false,
|
|
14930
|
+
focus: state.focus === "review" ? state.focusWas : state.focus,
|
|
14931
|
+
panelIndex: 0
|
|
14932
|
+
};
|
|
14933
|
+
const worthReading = panelEntries(state).length > 0;
|
|
14899
14934
|
return {
|
|
14900
14935
|
...state,
|
|
14901
|
-
panelOpen,
|
|
14902
|
-
panelWas:
|
|
14903
|
-
focus:
|
|
14936
|
+
panelOpen: true,
|
|
14937
|
+
panelWas: true,
|
|
14938
|
+
focus: worthReading ? "review" : state.focus,
|
|
14939
|
+
focusWas: state.focus,
|
|
14904
14940
|
panelIndex: 0
|
|
14905
14941
|
};
|
|
14906
14942
|
};
|
|
14943
|
+
toggleNav = (state) => {
|
|
14944
|
+
if (state.navOpen) return {
|
|
14945
|
+
...state,
|
|
14946
|
+
navOpen: false,
|
|
14947
|
+
focus: state.focus === "tree" ? "diff" : state.focus
|
|
14948
|
+
};
|
|
14949
|
+
return {
|
|
14950
|
+
...state,
|
|
14951
|
+
navOpen: true
|
|
14952
|
+
};
|
|
14953
|
+
};
|
|
14907
14954
|
packedAway = (state) => !state.navOpen && !state.panelOpen;
|
|
14908
14955
|
zoom = (state) => packedAway(state) ? {
|
|
14909
14956
|
...state,
|
|
@@ -15163,6 +15210,7 @@ var init_reduce = __esmMin((() => {
|
|
|
15163
15210
|
navOpen: true
|
|
15164
15211
|
}),
|
|
15165
15212
|
"panel.toggle": togglePanel,
|
|
15213
|
+
"nav.toggle": toggleNav,
|
|
15166
15214
|
"nav.zoom": zoom,
|
|
15167
15215
|
"wrap.toggle": (state) => ({
|
|
15168
15216
|
...state,
|
|
@@ -15717,6 +15765,7 @@ var init_diffview = __esmMin((() => {
|
|
|
15717
15765
|
pinned;
|
|
15718
15766
|
pinBox;
|
|
15719
15767
|
pinnedText = "";
|
|
15768
|
+
fed = "";
|
|
15720
15769
|
newLit = [];
|
|
15721
15770
|
oldLit = [];
|
|
15722
15771
|
newFor = "";
|
|
@@ -15930,7 +15979,11 @@ var init_diffview = __esmMin((() => {
|
|
|
15930
15979
|
}
|
|
15931
15980
|
feed() {
|
|
15932
15981
|
const spans = [...noteSpans(this.display, this.held), ...this.pickedSpans()];
|
|
15933
|
-
|
|
15982
|
+
const text = textAt(this.display, this.held, this.hidden());
|
|
15983
|
+
if (text !== this.fed) {
|
|
15984
|
+
this.fed = text;
|
|
15985
|
+
this.code.content = text;
|
|
15986
|
+
}
|
|
15934
15987
|
this.code.onHighlight = (highlights) => {
|
|
15935
15988
|
return [...(this.ownSpans() ?? highlights).filter((highlight) => !spans.some(([from, to]) => highlight[0] < to && highlight[1] > from)), ...spans];
|
|
15936
15989
|
};
|
|
@@ -16236,7 +16289,7 @@ var init_diffview = __esmMin((() => {
|
|
|
16236
16289
|
prose: false
|
|
16237
16290
|
}));
|
|
16238
16291
|
proseRows = (entry, row, room) => [...entry.markdown.split("\n").flatMap((line) => wrap(line, room - 2)), ""].map((line) => ({
|
|
16239
|
-
text: line.length === 0 ?
|
|
16292
|
+
text: line.length === 0 ? marks().rule : `${marks().rule} ${line}`,
|
|
16240
16293
|
row,
|
|
16241
16294
|
stop: 0,
|
|
16242
16295
|
comment: false,
|
|
@@ -16330,7 +16383,7 @@ var init_diffview = __esmMin((() => {
|
|
|
16330
16383
|
}));
|
|
16331
16384
|
//#endregion
|
|
16332
16385
|
//#region src/tui/render.ts
|
|
16333
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, keysTitle, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, DIFF_FLOOR, COMPOSE_EDGE, CRAMPED, CRAMPED_ROWS, DIFF_CHROME_MOST, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, keysOf, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, PLAIN_PICKED, PICKED, PLAIN_CURSOR, UNDER_CURSOR, GAP_PAINT, frameRoot, crampedBar, 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, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, chipWidth, WAYS_OUT, 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, panLabel, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, GUTTER, DIR_LEAD, TITLE_LEAD, FILE_LEAD, STALE_ROOM, STALE_ASKING, STALE_LONG, STALE_MIDDLE, STALE_SHORT, staleSaid, staleBanner, litRow, leftOver, titlePaint, titleMark, titleLook, fileMark, fileLook, layerLook, layerGutter, layerText, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, foundTitle, CHANGED_MARK, fileRow, blockOf, aroundRow, windowedBlocks, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
16386
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, reportActions, actionsText, SNIPPET_LINES, PALETTE_KEY, PALETTE_TITLE, PALETTE_GAP, PALETTE_CHROME, PENDING_CHROME, keysTitle, PALETTE_WIDTH, PANEL_SHARE, PANEL_MAX, PANEL_FLOOR, PANEL_FOOT, PANEL_QUARTER, PANEL_FIFTH, PANE_CHROME, PANE_EDGES, PANE_INSET, DIFF_FLOOR, COMPOSE_EDGE, CRAMPED, CRAMPED_ROWS, DIFF_CHROME_MOST, BRANCH_WIDTH, BRANCH_NAME_MIN, BRANCH_FIXED, STATE_MIN, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, longestState, keysOf, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut$1, STICKY_MAX, pickPaint, PLAIN_PICKED, PICKED, PLAIN_CURSOR, UNDER_CURSOR, GAP_PAINT, frameRoot, crampedBar, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, asking, makePaletteParts, makeChoices, LIST_LEAD, windowed, listText, SHEET_GAP, sheetRow, groupedBy, sheetBlock, splitInTwo, sheetPaint, sheetDeep, sheetText, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, MAC_KEYS, makeComposeParts, makeCompose, stillThere, quotedFor, clipHead, clipMiddle, clipPath, INDENT_MAX, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, chipWidth, WAYS_OUT, 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, panLabel, HEADER_GAP, HEADER_PATH_MIN, headerRoom, headerFitted, fallbackScope, treeMarks, treeTail, treeLine, GUTTER, DIR_LEAD, TITLE_LEAD, FILE_LEAD, STALE_ROOM, STALE_ASKING, STALE_LONG, STALE_MIDDLE, STALE_SHORT, staleSaid, staleBanner, litRow, leftOver, titlePaint, titleMark, titleLook, fileMark, fileLook, layerLook, layerGutter, layerText, PANEL_TITLES, PANEL_ORDER, PANEL_LEAD, PANEL_EMPTY, restingOrHere, FOUND_LEAST, nothingYet, foundTitle, CHANGED_MARK, fileRow, blockOf, aroundRow, windowedBlocks, panelWhere, panelBody, panelPair, panelSection, PULL_HINT, panelWindow, moreLine, panelText, Screen;
|
|
16334
16387
|
var init_render = __esmMin((() => {
|
|
16335
16388
|
init_dist();
|
|
16336
16389
|
init_command();
|
|
@@ -16357,10 +16410,9 @@ var init_render = __esmMin((() => {
|
|
|
16357
16410
|
PALETTE_GAP = 2;
|
|
16358
16411
|
PALETTE_CHROME = 4;
|
|
16359
16412
|
PENDING_CHROME = 4;
|
|
16360
|
-
keysTitle = (found,
|
|
16413
|
+
keysTitle = (found, whole) => {
|
|
16361
16414
|
if (found === 0) return "No key matches";
|
|
16362
|
-
|
|
16363
|
-
return `Keys here, ${found} of them — arrows for the rest`;
|
|
16415
|
+
return whole ? `Keys here, ${found} of them` : `Keys here, ${found} of them — arrows for the rest`;
|
|
16364
16416
|
};
|
|
16365
16417
|
PALETTE_WIDTH = 76;
|
|
16366
16418
|
PANEL_SHARE = .62;
|
|
@@ -16630,6 +16682,73 @@ var init_render = __esmMin((() => {
|
|
|
16630
16682
|
});
|
|
16631
16683
|
return new StyledText(drawn);
|
|
16632
16684
|
};
|
|
16685
|
+
SHEET_GAP = 3;
|
|
16686
|
+
sheetRow = (entry, room) => {
|
|
16687
|
+
return `${clip(keysOf(entry), 9).padEnd(PALETTE_KEY)}${clip(entry.title, Math.max(1, room - PALETTE_KEY))}`;
|
|
16688
|
+
};
|
|
16689
|
+
groupedBy = (rows) => {
|
|
16690
|
+
const groups = [];
|
|
16691
|
+
for (const [at, entry] of rows.entries()) {
|
|
16692
|
+
const last = groups.at(-1);
|
|
16693
|
+
if (last !== void 0 && rows[last[0] ?? 0]?.category === entry.category && last !== void 0) last.push(at);
|
|
16694
|
+
else groups.push([at]);
|
|
16695
|
+
}
|
|
16696
|
+
return groups;
|
|
16697
|
+
};
|
|
16698
|
+
sheetBlock = (rows, group, room) => [
|
|
16699
|
+
{
|
|
16700
|
+
text: rows[group[0] ?? 0]?.category ?? "",
|
|
16701
|
+
at: -1,
|
|
16702
|
+
heading: true
|
|
16703
|
+
},
|
|
16704
|
+
...group.map((at) => ({
|
|
16705
|
+
text: sheetRow(rows[at], room),
|
|
16706
|
+
at,
|
|
16707
|
+
heading: false
|
|
16708
|
+
})),
|
|
16709
|
+
{
|
|
16710
|
+
text: "",
|
|
16711
|
+
at: -1,
|
|
16712
|
+
heading: false
|
|
16713
|
+
}
|
|
16714
|
+
];
|
|
16715
|
+
splitInTwo = (blocks) => {
|
|
16716
|
+
const total = blocks.reduce((sum, block) => sum + block.length, 0);
|
|
16717
|
+
const left = [];
|
|
16718
|
+
const right = [];
|
|
16719
|
+
for (const block of blocks) if (left.length + block.length <= Math.ceil(total / 2) || left.length === 0) left.push(...block);
|
|
16720
|
+
else right.push(...block);
|
|
16721
|
+
return {
|
|
16722
|
+
left,
|
|
16723
|
+
right
|
|
16724
|
+
};
|
|
16725
|
+
};
|
|
16726
|
+
sheetPaint = (row, here, room) => {
|
|
16727
|
+
if (row === void 0) return fg(palette.ink)("".padEnd(room));
|
|
16728
|
+
const text = `${row.heading || row.at === -1 ? " " : here ? marks().cursor : " "} ${row.text}`.padEnd(room);
|
|
16729
|
+
if (row.heading) return fg(palette.accent)(text);
|
|
16730
|
+
return here ? bg(palette.selection)(fg(palette.ink)(text)) : fg(palette.ink)(text);
|
|
16731
|
+
};
|
|
16732
|
+
sheetDeep = (rows, room) => {
|
|
16733
|
+
const column = Math.max(12, Math.floor((room - SHEET_GAP) / 2));
|
|
16734
|
+
const { left, right } = splitInTwo(groupedBy(rows).map((group) => sheetBlock(rows, group, column - 2)));
|
|
16735
|
+
return Math.max(left.length, right.length);
|
|
16736
|
+
};
|
|
16737
|
+
sheetText = (rows, at, shown) => {
|
|
16738
|
+
const column = Math.max(12, Math.floor((shown.room - SHEET_GAP) / 2));
|
|
16739
|
+
const { left, right } = splitInTwo(groupedBy(rows).map((group) => sheetBlock(rows, group, column - 2)));
|
|
16740
|
+
const deep = Math.max(left.length, right.length);
|
|
16741
|
+
const where = left.findIndex((row) => row.at === at);
|
|
16742
|
+
const also = right.findIndex((row) => row.at === at);
|
|
16743
|
+
const on = where === -1 ? also : where;
|
|
16744
|
+
const top = Math.max(0, Math.min(deep - shown.height, on - Math.floor(shown.height / 2)));
|
|
16745
|
+
const drawn = [];
|
|
16746
|
+
for (let step = 0; step < Math.min(shown.height, deep); step += 1) {
|
|
16747
|
+
const row = top + step;
|
|
16748
|
+
drawn.push(sheetPaint(left[row], left[row]?.at === at, column), fg(palette.ink)(" ".repeat(SHEET_GAP)), sheetPaint(right[row], right[row]?.at === at, column), fg(palette.ink)("\n"));
|
|
16749
|
+
}
|
|
16750
|
+
return new StyledText(drawn);
|
|
16751
|
+
};
|
|
16633
16752
|
stack = (parent, children) => {
|
|
16634
16753
|
for (const child of children) parent.add(child);
|
|
16635
16754
|
};
|
|
@@ -16967,7 +17086,7 @@ var init_render = __esmMin((() => {
|
|
|
16967
17086
|
pullHere(state).length === 0 ? "" : `${pullHere(state)} pull request`,
|
|
16968
17087
|
state.vouched.length === 0 ? "" : reviewedCount(state),
|
|
16969
17088
|
contextLabel(state.context),
|
|
16970
|
-
state.layersStale ? "layers stale" : "",
|
|
17089
|
+
state.layersStale ? "layers stale · L for a new one" : "",
|
|
16971
17090
|
hiddenLines(state) === 0 ? "" : `⋯ ${hiddenLines(state)} ${hiddenLines(state) === 1 ? "line" : "lines"} hidden`,
|
|
16972
17091
|
panLabel(state, across)
|
|
16973
17092
|
];
|
|
@@ -17330,7 +17449,6 @@ var init_render = __esmMin((() => {
|
|
|
17330
17449
|
this.wheelOnSheet(this.keys);
|
|
17331
17450
|
this.wheelOnSheet(this.palette);
|
|
17332
17451
|
this.wheelOnRail(this.listPane);
|
|
17333
|
-
this.wheelOnRail(this.list);
|
|
17334
17452
|
this.view.listenTo({
|
|
17335
17453
|
scroll: (delta) => {
|
|
17336
17454
|
this.dragFrom = void 0;
|
|
@@ -17420,6 +17538,7 @@ var init_render = __esmMin((() => {
|
|
|
17420
17538
|
reviewed: reviewedCountIn(state),
|
|
17421
17539
|
pull: pullHere(state).length > 0,
|
|
17422
17540
|
pane: state.screen === "review" ? state.focus : "diff",
|
|
17541
|
+
stale: state.layersStale,
|
|
17423
17542
|
onLayers: onLayers(state),
|
|
17424
17543
|
hidingRead: state.hideReviewed,
|
|
17425
17544
|
hidingSettled: state.hideSettled,
|
|
@@ -17478,15 +17597,18 @@ var init_render = __esmMin((() => {
|
|
|
17478
17597
|
return;
|
|
17479
17598
|
}
|
|
17480
17599
|
const rows = keyMatches(state);
|
|
17481
|
-
const room =
|
|
17482
|
-
const keysRoom =
|
|
17600
|
+
const room = this.renderer.width;
|
|
17601
|
+
const keysRoom = this.renderer.height;
|
|
17483
17602
|
const shown = Math.max(1, keysRoom - PENDING_CHROME);
|
|
17484
|
-
this.keysTitle.content = keysTitle(rows.length, shown);
|
|
17485
|
-
this.keysChoices.content =
|
|
17603
|
+
this.keysTitle.content = keysTitle(rows.length, sheetDeep(rows, room - MODAL_ROOM) <= shown);
|
|
17604
|
+
this.keysChoices.content = sheetText(rows, Math.min(state.paletteIndex, Math.max(0, rows.length - 1)), {
|
|
17605
|
+
height: shown,
|
|
17606
|
+
room: room - MODAL_ROOM
|
|
17607
|
+
});
|
|
17486
17608
|
this.keys.height = keysRoom;
|
|
17487
17609
|
this.keys.width = room;
|
|
17488
|
-
this.keys.left =
|
|
17489
|
-
this.keys.top =
|
|
17610
|
+
this.keys.left = 0;
|
|
17611
|
+
this.keys.top = 0;
|
|
17490
17612
|
}
|
|
17491
17613
|
headerText(state) {
|
|
17492
17614
|
const branch = selectedBranch(state);
|
|
@@ -18179,6 +18301,7 @@ var init_app = __esmMin((() => {
|
|
|
18179
18301
|
leaving;
|
|
18180
18302
|
looking;
|
|
18181
18303
|
rolling = false;
|
|
18304
|
+
pendingRoll = 0;
|
|
18182
18305
|
ticking;
|
|
18183
18306
|
grewWithShift = false;
|
|
18184
18307
|
keys = [];
|
|
@@ -18189,6 +18312,7 @@ var init_app = __esmMin((() => {
|
|
|
18189
18312
|
sideways = 0;
|
|
18190
18313
|
listening;
|
|
18191
18314
|
lighting;
|
|
18315
|
+
sourcing;
|
|
18192
18316
|
constructor(options) {
|
|
18193
18317
|
this.renderer = options.renderer;
|
|
18194
18318
|
this.repo = options.repo;
|
|
@@ -18221,6 +18345,7 @@ var init_app = __esmMin((() => {
|
|
|
18221
18345
|
renderer.on("destroy", () => this.stopTicking());
|
|
18222
18346
|
this.startTicking();
|
|
18223
18347
|
renderer.on("destroy", () => this.stopLighting());
|
|
18348
|
+
renderer.on("destroy", () => this.stopSourcing());
|
|
18224
18349
|
renderer.on("destroy", () => void getTreeSitterClient().destroy());
|
|
18225
18350
|
renderer.on("destroy", () => this.stopPainting());
|
|
18226
18351
|
renderer.on("destroy", () => this.stopConsuming());
|
|
@@ -18354,7 +18479,11 @@ var init_app = __esmMin((() => {
|
|
|
18354
18479
|
}
|
|
18355
18480
|
settled() {
|
|
18356
18481
|
if (this.consuming === void 0) return Promise.resolve();
|
|
18357
|
-
return runPromise(andThen(this.drained(), this.stillLighting()));
|
|
18482
|
+
return runPromise(andThen(andThen(this.drained(), suspend(() => this.stillSourcing())), suspend(() => this.stillLighting())));
|
|
18483
|
+
}
|
|
18484
|
+
stillSourcing() {
|
|
18485
|
+
const fiber = this.sourcing;
|
|
18486
|
+
return fiber === void 0 ? void_ : asVoid(await_(fiber));
|
|
18358
18487
|
}
|
|
18359
18488
|
stillLighting() {
|
|
18360
18489
|
const fiber = this.lighting;
|
|
@@ -18986,13 +19115,18 @@ var init_app = __esmMin((() => {
|
|
|
18986
19115
|
const was = this.state.patchIndex;
|
|
18987
19116
|
this.commit(reduce(this.measured(), delta > 0 ? "comment.next" : "comment.prev"));
|
|
18988
19117
|
if (this.state.patchIndex !== was) yield* this.turnedTo();
|
|
18989
|
-
this.rolling = false;
|
|
18990
19118
|
});
|
|
18991
19119
|
}
|
|
18992
19120
|
rollFrom(delta) {
|
|
18993
|
-
|
|
18994
|
-
|
|
18995
|
-
|
|
19121
|
+
if (!onLayers(this.state)) {
|
|
19122
|
+
this.dispatchTask(this.rolled(delta));
|
|
19123
|
+
return;
|
|
19124
|
+
}
|
|
19125
|
+
if (this.rolling) {
|
|
19126
|
+
this.pendingRoll = delta;
|
|
19127
|
+
return;
|
|
19128
|
+
}
|
|
19129
|
+
this.rolling = true;
|
|
18996
19130
|
this.dispatchTask(this.rolled(delta));
|
|
18997
19131
|
}
|
|
18998
19132
|
stepped(delta) {
|
|
@@ -19040,7 +19174,13 @@ var init_app = __esmMin((() => {
|
|
|
19040
19174
|
const was = this.state.patchIndex;
|
|
19041
19175
|
this.commit(railScrolled(this.measured(), delta));
|
|
19042
19176
|
if (this.state.patchIndex !== was) yield* this.turnedTo();
|
|
19043
|
-
});
|
|
19177
|
+
}).pipe(ensuring(sync(() => this.rolledOn())));
|
|
19178
|
+
}
|
|
19179
|
+
rolledOn() {
|
|
19180
|
+
this.rolling = false;
|
|
19181
|
+
const held = this.pendingRoll;
|
|
19182
|
+
this.pendingRoll = 0;
|
|
19183
|
+
if (held !== 0) this.rollFrom(held > 0 ? 1 : -1);
|
|
19044
19184
|
}
|
|
19045
19185
|
moveFile(delta) {
|
|
19046
19186
|
return this.commitSynced(delta > 0 ? "file.next" : "file.prev");
|
|
@@ -19147,9 +19287,15 @@ var init_app = __esmMin((() => {
|
|
|
19147
19287
|
turnedTo() {
|
|
19148
19288
|
return gen({ self: this }, function* () {
|
|
19149
19289
|
this.commit(withSource(this.state, []));
|
|
19150
|
-
|
|
19290
|
+
this.stopSourcing();
|
|
19291
|
+
this.sourcing = yield* forkDetach(this.loadSource());
|
|
19151
19292
|
});
|
|
19152
19293
|
}
|
|
19294
|
+
stopSourcing() {
|
|
19295
|
+
const fiber = this.sourcing;
|
|
19296
|
+
this.sourcing = void 0;
|
|
19297
|
+
if (fiber !== void 0) runFork(interrupt(fiber));
|
|
19298
|
+
}
|
|
19153
19299
|
loadSource() {
|
|
19154
19300
|
return gen({ self: this }, function* () {
|
|
19155
19301
|
const branch = selectedBranch(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.
|
|
26
|
+
"version": "0.1.0-alpha.137",
|
|
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": {
|
|
@@ -53,6 +53,8 @@
|
|
|
53
53
|
"sketch": "node --experimental-ffi --disable-warning=ExperimentalWarning scripts/sketch.ts",
|
|
54
54
|
"watch": "node --experimental-ffi --disable-warning=ExperimentalWarning scripts/watch.ts",
|
|
55
55
|
"serve": "node --experimental-ffi --disable-warning=ExperimentalWarning scripts/serve.ts",
|
|
56
|
-
"play": "node --watch --watch-path=src --watch-path=scripts --experimental-ffi --disable-warning=ExperimentalWarning scripts/play.ts"
|
|
56
|
+
"play": "node --watch --watch-path=src --watch-path=scripts --experimental-ffi --disable-warning=ExperimentalWarning scripts/play.ts",
|
|
57
|
+
"shot": "node --experimental-ffi --disable-warning=ExperimentalWarning scripts/shot.ts",
|
|
58
|
+
"pr-summary": "node scripts/pr-summary.ts"
|
|
57
59
|
}
|
|
58
60
|
}
|