@eliya-oss/agent-diff 0.1.0-alpha.58 → 0.1.0-alpha.59
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 +6 -0
- package/dist/main.js +107 -42
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @eliya-oss/agent-diff
|
|
2
2
|
|
|
3
|
+
## 0.1.0-alpha.59
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- An answer stays unread until you open it, and the count survives reloading the branch. Keys work on a keyboard that is not English: a binding matches the key the letter sits on. Bug reports carry the last twenty moves, and `ctrl+t` sends only the words you typed.
|
|
8
|
+
|
|
3
9
|
## 0.1.0-alpha.58
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/main.js
CHANGED
|
@@ -8300,7 +8300,8 @@ var init_model$2 = __esmMin((() => {
|
|
|
8300
8300
|
pending: [],
|
|
8301
8301
|
settled: {},
|
|
8302
8302
|
removed: {},
|
|
8303
|
-
base: ""
|
|
8303
|
+
base: "",
|
|
8304
|
+
read: {}
|
|
8304
8305
|
};
|
|
8305
8306
|
}));
|
|
8306
8307
|
//#endregion
|
|
@@ -8341,7 +8342,8 @@ var init_schema = __esmMin((() => {
|
|
|
8341
8342
|
pending: optionalKey(ArraySchema(StoredComment)),
|
|
8342
8343
|
settled: optionalKey(Record(String$1, String$1)),
|
|
8343
8344
|
removed: optionalKey(Record(String$1, String$1)),
|
|
8344
|
-
base: optionalKey(String$1)
|
|
8345
|
+
base: optionalKey(String$1),
|
|
8346
|
+
read: optionalKey(Record(String$1, Int))
|
|
8345
8347
|
});
|
|
8346
8348
|
Settings = Struct({ wrap: optionalKey(Boolean) });
|
|
8347
8349
|
UpgradeCheck = Struct({
|
|
@@ -8747,7 +8749,7 @@ var init_error$1 = __esmMin((() => {
|
|
|
8747
8749
|
}));
|
|
8748
8750
|
//#endregion
|
|
8749
8751
|
//#region src/cli/commands.ts
|
|
8750
|
-
var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, listBranches, blobOf, toggleVouch, reviewProgress, anchorRequest, stageComment, editStaged, dropStaged, listPending, bodyOf, sentOf, listSent, submitReview, submitComment, listPatches, flatten, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, setBase, clearBase;
|
|
8752
|
+
var CONTEXT, WHOLE_FILE$1, POLL, AUTO, askedFor, basedOn, worktreeNamed, findBranch, baseFor, patchesOf, findPatch, rowsCovering, waitingOn, listBranches, blobOf, toggleVouch, reviewProgress, anchorRequest, stageComment, editStaged, dropStaged, listPending, bodyOf, sentOf, listSent, submitReview, submitComment, listPatches, flatten, takeComments, repoOf$1, worktreeOf$1, branchAt, awaitComments, saveReport, fileSource, fileBefore, saveWrap, setBase, clearBase, markRead;
|
|
8751
8753
|
var init_commands = __esmMin((() => {
|
|
8752
8754
|
init_dist();
|
|
8753
8755
|
init_patch();
|
|
@@ -8994,7 +8996,7 @@ var init_commands = __esmMin((() => {
|
|
|
8994
8996
|
});
|
|
8995
8997
|
bodyOf = (entry) => entry.body;
|
|
8996
8998
|
sentOf = (comment, reading) => {
|
|
8997
|
-
const { spoken, settled, head, shown } = reading;
|
|
8999
|
+
const { spoken, settled, head, shown, read } = reading;
|
|
8998
9000
|
const mine = spoken.filter((entry) => entry.comment === comment.id);
|
|
8999
9001
|
return {
|
|
9000
9002
|
id: comment.id,
|
|
@@ -9006,6 +9008,7 @@ var init_commands = __esmMin((() => {
|
|
|
9006
9008
|
settled: Object.hasOwn(settled, comment.id),
|
|
9007
9009
|
stale: comment.head !== head,
|
|
9008
9010
|
outside: !shown.has(comment.file),
|
|
9011
|
+
unread: Math.max(0, mine.length - (read[comment.id] ?? 0)),
|
|
9009
9012
|
asks: mine.at(-1)?.asks === true,
|
|
9010
9013
|
answers: mine.map(bodyOf)
|
|
9011
9014
|
};
|
|
@@ -9020,7 +9023,8 @@ var init_commands = __esmMin((() => {
|
|
|
9020
9023
|
spoken,
|
|
9021
9024
|
settled: current.settled,
|
|
9022
9025
|
head: worktree.head,
|
|
9023
|
-
shown
|
|
9026
|
+
shown,
|
|
9027
|
+
read: current.read
|
|
9024
9028
|
}));
|
|
9025
9029
|
});
|
|
9026
9030
|
submitReview = fn("Cli.submitReview")(function* (repo, branch, id, at) {
|
|
@@ -9168,6 +9172,27 @@ var init_commands = __esmMin((() => {
|
|
|
9168
9172
|
basis: based.basis
|
|
9169
9173
|
};
|
|
9170
9174
|
});
|
|
9175
|
+
markRead = fn("Cli.markRead")(function* (repo, branch, id) {
|
|
9176
|
+
const store = yield* Store;
|
|
9177
|
+
const worktree = yield* findBranch(repo, branch);
|
|
9178
|
+
const seen = (yield* store.answers(worktree.path)).filter((entry) => entry.comment === id).length;
|
|
9179
|
+
const current = yield* store.state(worktree.path);
|
|
9180
|
+
if ((current.read[id] ?? 0) >= seen) return {
|
|
9181
|
+
id,
|
|
9182
|
+
unread: 0
|
|
9183
|
+
};
|
|
9184
|
+
yield* store.saveState(worktree.path, {
|
|
9185
|
+
...current,
|
|
9186
|
+
read: {
|
|
9187
|
+
...current.read,
|
|
9188
|
+
[id]: seen
|
|
9189
|
+
}
|
|
9190
|
+
});
|
|
9191
|
+
return {
|
|
9192
|
+
id,
|
|
9193
|
+
unread: 0
|
|
9194
|
+
};
|
|
9195
|
+
});
|
|
9171
9196
|
}));
|
|
9172
9197
|
//#endregion
|
|
9173
9198
|
//#region src/cli/init.ts
|
|
@@ -9423,7 +9448,7 @@ var init_pane = __esmMin((() => {
|
|
|
9423
9448
|
init_commands();
|
|
9424
9449
|
init_init();
|
|
9425
9450
|
init_pane();
|
|
9426
|
-
var version$1 = "0.1.0-alpha.
|
|
9451
|
+
var version$1 = "0.1.0-alpha.59";
|
|
9427
9452
|
//#endregion
|
|
9428
9453
|
//#region src/cli/upgrade.ts
|
|
9429
9454
|
var PACKAGE, TAG, RELEASES, REGISTRY, ASK_MS, RUN_MS, CELLAR, COMPILED, INSTALLED, BUN_GLOBAL, routeOf, ROUTES, asRoute, checkoutOf, assetOf, commandFor, NOTES, RUNNABLE, NUMBERS, numbersIn, compare$1, partsOf, newer, tagIn, fetched, askLatest, here, findUpgrade, willUpgrade, runUpgrade, statusOf$1, sayFound, sayDone, attempted, REFRESH_MS, refreshSkills, updatedIn, sayRefreshed, upgradeReport;
|
|
@@ -10023,6 +10048,7 @@ var init_threads = __esmMin((() => {
|
|
|
10023
10048
|
state: stateOf$1(mine, Object.hasOwn(reading.settled, comment.id), Object.hasOwn(reading.removed, comment.id)),
|
|
10024
10049
|
stale: batch.head !== reading.head,
|
|
10025
10050
|
outside: !reading.shown.has(comment.anchor.path),
|
|
10051
|
+
unread: Math.max(0, mine.length - (reading.read[comment.id] ?? 0)),
|
|
10026
10052
|
answers: mine.map(spoken$1)
|
|
10027
10053
|
};
|
|
10028
10054
|
};
|
|
@@ -10042,6 +10068,7 @@ var init_threads = __esmMin((() => {
|
|
|
10042
10068
|
state: "staged",
|
|
10043
10069
|
stale: false,
|
|
10044
10070
|
outside: false,
|
|
10071
|
+
unread: 0,
|
|
10045
10072
|
answers: []
|
|
10046
10073
|
});
|
|
10047
10074
|
listThreads = fn("Cli.listThreads")(function* (repo, branch, base) {
|
|
@@ -10053,7 +10080,8 @@ var init_threads = __esmMin((() => {
|
|
|
10053
10080
|
settled: current.settled,
|
|
10054
10081
|
removed: current.removed,
|
|
10055
10082
|
head: worktree.head,
|
|
10056
|
-
shown: new Set((yield* patchesOf(worktree)).map((patch) => patch.path))
|
|
10083
|
+
shown: new Set((yield* patchesOf(worktree)).map((patch) => patch.path)),
|
|
10084
|
+
read: current.read
|
|
10057
10085
|
}), ...current.pending.map(stagedOf)];
|
|
10058
10086
|
});
|
|
10059
10087
|
answerComment = fn("Cli.answerComment")(function* (request) {
|
|
@@ -11206,7 +11234,8 @@ var init_model = __esmMin((() => {
|
|
|
11206
11234
|
panelOpen: true,
|
|
11207
11235
|
panelWas: true,
|
|
11208
11236
|
panelIndex: 0,
|
|
11209
|
-
columns: 0
|
|
11237
|
+
columns: 0,
|
|
11238
|
+
reportFull: true
|
|
11210
11239
|
};
|
|
11211
11240
|
initialState = (branches) => ({
|
|
11212
11241
|
...nothingReviewed,
|
|
@@ -11628,14 +11657,16 @@ var init_model = __esmMin((() => {
|
|
|
11628
11657
|
return {
|
|
11629
11658
|
section: sectionOf(newer),
|
|
11630
11659
|
comment: newer,
|
|
11631
|
-
fresh: newer !== comment
|
|
11660
|
+
fresh: newer !== comment,
|
|
11661
|
+
unread: newer.unread ?? 0
|
|
11632
11662
|
};
|
|
11633
11663
|
};
|
|
11634
11664
|
panelEntries = (state) => {
|
|
11635
11665
|
const staged = state.pending.map((comment) => ({
|
|
11636
11666
|
section: "staged",
|
|
11637
11667
|
comment,
|
|
11638
|
-
fresh: false
|
|
11668
|
+
fresh: false,
|
|
11669
|
+
unread: 0
|
|
11639
11670
|
}));
|
|
11640
11671
|
const delivered = state.sent.map((comment) => sentEntry(state, comment));
|
|
11641
11672
|
return [
|
|
@@ -11692,7 +11723,7 @@ var init_model = __esmMin((() => {
|
|
|
11692
11723
|
}));
|
|
11693
11724
|
//#endregion
|
|
11694
11725
|
//#region src/tui/report.ts
|
|
11695
|
-
var AROUND_CURSOR, TREE_ROWS, sign, visibleRows, visibleTree, facts, buildReport;
|
|
11726
|
+
var AROUND_CURSOR, TREE_ROWS, sign, visibleRows, visibleTree, facts, fenced, fully, minimal, buildReport;
|
|
11696
11727
|
var init_report = __esmMin((() => {
|
|
11697
11728
|
init_model();
|
|
11698
11729
|
AROUND_CURSOR = 8;
|
|
@@ -11718,6 +11749,21 @@ var init_report = __esmMin((() => {
|
|
|
11718
11749
|
`- screen \`${state.screen}\`, focus \`${state.focus}\`, selecting ${String(state.selecting)}`,
|
|
11719
11750
|
`- ${state.staged} staged, ${state.vouched.length} of ${state.patches.length} reviewed`
|
|
11720
11751
|
];
|
|
11752
|
+
fenced = (title, lines) => [
|
|
11753
|
+
`## ${title}`,
|
|
11754
|
+
"",
|
|
11755
|
+
"```",
|
|
11756
|
+
...lines,
|
|
11757
|
+
"```",
|
|
11758
|
+
""
|
|
11759
|
+
];
|
|
11760
|
+
fully = (state, around) => [
|
|
11761
|
+
...fenced("What led here", around.trail),
|
|
11762
|
+
...fenced("Keys pressed", [around.keys.join(" ")]),
|
|
11763
|
+
...fenced("Files", visibleTree(state)),
|
|
11764
|
+
...fenced("Around the cursor", visibleRows(state))
|
|
11765
|
+
];
|
|
11766
|
+
minimal = () => ["_Sent as a minimal report: no file names, no code, no key history._", ""];
|
|
11721
11767
|
buildReport = (state, around) => {
|
|
11722
11768
|
const failure = around.failure.length === 0 ? "none" : around.failure.split("\n")[0];
|
|
11723
11769
|
return [
|
|
@@ -11730,24 +11776,7 @@ var init_report = __esmMin((() => {
|
|
|
11730
11776
|
...facts(state, around),
|
|
11731
11777
|
`- last internal failure: ${failure}`,
|
|
11732
11778
|
"",
|
|
11733
|
-
|
|
11734
|
-
"",
|
|
11735
|
-
"```",
|
|
11736
|
-
around.keys.join(" "),
|
|
11737
|
-
"```",
|
|
11738
|
-
"",
|
|
11739
|
-
"## Files",
|
|
11740
|
-
"",
|
|
11741
|
-
"```",
|
|
11742
|
-
...visibleTree(state),
|
|
11743
|
-
"```",
|
|
11744
|
-
"",
|
|
11745
|
-
"## Around the cursor",
|
|
11746
|
-
"",
|
|
11747
|
-
"```",
|
|
11748
|
-
...visibleRows(state),
|
|
11749
|
-
"```",
|
|
11750
|
-
""
|
|
11779
|
+
...state.reportFull ? fully(state, around) : minimal()
|
|
11751
11780
|
].join("\n");
|
|
11752
11781
|
};
|
|
11753
11782
|
}));
|
|
@@ -12139,6 +12168,14 @@ var init_command = __esmMin((() => {
|
|
|
12139
12168
|
keys: ["ctrl+b"],
|
|
12140
12169
|
screens: ["branches", "review"]
|
|
12141
12170
|
}),
|
|
12171
|
+
command({
|
|
12172
|
+
action: "report.mode",
|
|
12173
|
+
title: "Send a minimal report instead of a full one",
|
|
12174
|
+
category: "General",
|
|
12175
|
+
keys: ["ctrl+t"],
|
|
12176
|
+
screens: ["report"],
|
|
12177
|
+
listed: false
|
|
12178
|
+
}),
|
|
12142
12179
|
command({
|
|
12143
12180
|
action: "report.send",
|
|
12144
12181
|
title: "Send the report",
|
|
@@ -12749,6 +12786,10 @@ var init_reduce = __esmMin((() => {
|
|
|
12749
12786
|
"review.reload": (state) => state,
|
|
12750
12787
|
"thread.settle": (state) => state,
|
|
12751
12788
|
"thread.remove": (state) => state,
|
|
12789
|
+
"report.mode": (state) => ({
|
|
12790
|
+
...state,
|
|
12791
|
+
reportFull: !state.reportFull
|
|
12792
|
+
}),
|
|
12752
12793
|
"rail.toggle": toggleRail,
|
|
12753
12794
|
"file.vouch": (state) => state,
|
|
12754
12795
|
"file.vouch.next": (state) => state,
|
|
@@ -13759,7 +13800,7 @@ var init_diffview = __esmMin((() => {
|
|
|
13759
13800
|
}));
|
|
13760
13801
|
//#endregion
|
|
13761
13802
|
//#region src/tui/render.ts
|
|
13762
|
-
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, COMPOSE_PAD, COMPOSE_MIN_TEXT, 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_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, commandRow, modalWidth, panelWidth, panelTop, panelRows, composeRoom, laidOut, STICKY_MAX, pickPaint, SELECTION, CURSOR, ACCENT, GAP_PAINT, bar, makeList, makeDiffPane, makePanel, makeListParts, makeListText, makeGutter, makeScroller, makeScrim, makeScroll, makePalette, makePaletteParts, makePendingParts, makeChoices, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, 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;
|
|
13803
|
+
var ROW_HEIGHT, COMPOSE_WIDTH, GUTTER_X, CHIP_GAP, FRAME_PAD, MODAL_ROOM, COMPOSE_CHROME, COMPOSE_ACTION_ROWS, COMPOSE_PAD, COMPOSE_MIN_TEXT, 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_TAIL, EMPTY_LIST, MODAL_MARGIN, shareOf, homeWidth, longestName, 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, makePaletteParts, makePendingParts, makeChoices, stack, makeBody, makeHome, makeModals, makeKeysParts, makeFoundParts, FONTS, logoFont, makeLanding, makeLogo, makeComposeParts, makeCompose, clip, clipHead, clipMiddle, clipPath, treeLabel, waitingLabel, inRange, notesOf, notesFor, paired, keptWithin, CHIP_CHUNKS, shortPath, HOME_PATH_MIN, HOME_PATH_CHROME, elide, contextLabel, nameRoom, columns, FORGE_SILENT, unaskedForge, branchHeading, atHome, layersCell, baseLabel, stateCell, branchCells, 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;
|
|
13763
13804
|
var init_render = __esmMin((() => {
|
|
13764
13805
|
init_command();
|
|
13765
13806
|
init_patch();
|
|
@@ -13779,7 +13820,7 @@ var init_render = __esmMin((() => {
|
|
|
13779
13820
|
COMPOSE_ACTION_ROWS = 2;
|
|
13780
13821
|
COMPOSE_PAD = 5;
|
|
13781
13822
|
COMPOSE_MIN_TEXT = 8;
|
|
13782
|
-
reportActions = () => t`${fg(palette.accent)("esc")} ${fg(palette.muted)("cancel")} ${fg(palette.accent)("^s")} ${fg(palette.muted)("copy and save")}`;
|
|
13823
|
+
reportActions = (full) => t`${fg(palette.accent)("esc")} ${fg(palette.muted)("cancel")} ${fg(palette.accent)("^t")} ${fg(palette.muted)(full ? "sending everything" : "sending the least")} ${fg(palette.accent)("^s")} ${fg(palette.muted)("copy and save")}`;
|
|
13783
13824
|
actionsText = () => t`${fg(palette.accent)("esc")} ${fg(palette.muted)("cancel")} ${fg(palette.accent)("^a")} ${fg(palette.muted)("add to review")} ${fg(palette.accent)("^s")} ${fg(palette.muted)("comment now")}`;
|
|
13784
13825
|
SNIPPET_LINES = 4;
|
|
13785
13826
|
PALETTE_KEY = 7;
|
|
@@ -13821,7 +13862,7 @@ var init_render = __esmMin((() => {
|
|
|
13821
13862
|
text: Math.max(COMPOSE_MIN_TEXT, box - COMPOSE_PAD)
|
|
13822
13863
|
};
|
|
13823
13864
|
};
|
|
13824
|
-
laidOut = (lines, room) => lines.flatMap((line) => {
|
|
13865
|
+
laidOut$1 = (lines, room) => lines.flatMap((line) => {
|
|
13825
13866
|
const parts = wrapped(line, room);
|
|
13826
13867
|
return parts.length === 0 ? [""] : parts;
|
|
13827
13868
|
});
|
|
@@ -14322,7 +14363,7 @@ var init_render = __esmMin((() => {
|
|
|
14322
14363
|
panelPair = (state, placed, room) => {
|
|
14323
14364
|
const { entry } = placed;
|
|
14324
14365
|
return [{
|
|
14325
|
-
text: `${`${panelMark(state, placed.at)}${entry.fresh ? marks().comment : " "} `}${panelWhere(entry, room - PANEL_LEAD)}`,
|
|
14366
|
+
text: `${`${panelMark(state, placed.at)}${entry.fresh || entry.unread > 0 ? marks().comment : " "} `}${panelWhere(entry, room - PANEL_LEAD)}`,
|
|
14326
14367
|
tone: palette.ink
|
|
14327
14368
|
}, {
|
|
14328
14369
|
text: ` ${clip(panelBody(entry), Math.max(4, room - PANEL_LEAD))}`,
|
|
@@ -14351,8 +14392,10 @@ var init_render = __esmMin((() => {
|
|
|
14351
14392
|
at
|
|
14352
14393
|
}));
|
|
14353
14394
|
const fresh = placed.filter((one) => one.entry.fresh).length;
|
|
14354
|
-
const
|
|
14355
|
-
|
|
14395
|
+
const unread = placed.filter((one) => one.entry.unread > 0).length;
|
|
14396
|
+
const said = fresh > 0 ? `${fresh} ${PULL_HINT}` : unread > 0 ? `${unread} unread` : "";
|
|
14397
|
+
const banner = said.length === 0 ? [] : [{
|
|
14398
|
+
text: clip(said, room),
|
|
14356
14399
|
tone: palette.attention
|
|
14357
14400
|
}];
|
|
14358
14401
|
const sections = PANEL_ORDER.flatMap((section) => panelSection(state, placed, section, room));
|
|
@@ -14854,14 +14897,14 @@ var init_render = __esmMin((() => {
|
|
|
14854
14897
|
this.compose.visible = state.screen === "compose" || state.screen === "report";
|
|
14855
14898
|
if (state.screen !== "report") return;
|
|
14856
14899
|
const room = composeRoom(this.renderer.width);
|
|
14857
|
-
const lines = laidOut([
|
|
14858
|
-
"What went wrong? Everything on screen is attached for you.",
|
|
14900
|
+
const lines = laidOut$1([
|
|
14901
|
+
state.reportFull ? "What went wrong? Everything on screen is attached for you." : "What went wrong? Only what you type is sent.",
|
|
14859
14902
|
"",
|
|
14860
14903
|
drafted(state)
|
|
14861
14904
|
], room.text);
|
|
14862
14905
|
this.composeTitle.content = "Report a bug";
|
|
14863
14906
|
this.composeBody.content = lines.join("\n");
|
|
14864
|
-
this.composeActions.content = reportActions();
|
|
14907
|
+
this.composeActions.content = reportActions(state.reportFull);
|
|
14865
14908
|
this.compose.height = lines.length + COMPOSE_ACTION_ROWS + COMPOSE_CHROME;
|
|
14866
14909
|
this.compose.width = room.box;
|
|
14867
14910
|
this.compose.left = Math.max(FRAME_PAD, Math.floor((this.renderer.width - room.box) / 2));
|
|
@@ -14914,7 +14957,7 @@ var init_render = __esmMin((() => {
|
|
|
14914
14957
|
const more = selectedLineCount(state) - snippet.length;
|
|
14915
14958
|
const tail = more > 0 ? [` … ${more} more lines`] : [];
|
|
14916
14959
|
const quoted = [...snippet, ...tail].map((line) => clip(line, room.text));
|
|
14917
|
-
const written = laidOut(drafted(state).split("\n"), room.text);
|
|
14960
|
+
const written = laidOut$1(drafted(state).split("\n"), room.text);
|
|
14918
14961
|
const lines = [
|
|
14919
14962
|
...quoted,
|
|
14920
14963
|
"",
|
|
@@ -15035,7 +15078,7 @@ var init_upgrade = __esmMin((() => {
|
|
|
15035
15078
|
return due ? `adiff ${latest} is out · adiff upgrade` : "";
|
|
15036
15079
|
}).pipe(withSpan("Tui.upgradeHint"));
|
|
15037
15080
|
upgradeHint = worded.pipe(orElseSucceed(() => ""));
|
|
15038
|
-
})), PRINTABLE, KEY_HISTORY, copyToClipboard, asKey, openedPull, byWord, WORD_STEP, caretSideways, caretFor, erasedBy, LISTENS, listens, keyName, App, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15081
|
+
})), PRINTABLE, KEY_HISTORY, TRAIL_HISTORY, momentOf, copyToClipboard, asKey, openedPull, byWord, WORD_STEP, caretSideways, caretFor, erasedBy, LISTENS, listens, laidOut, keyName, App, settledPath, openingOn, launch, told, untilDestroyed, runOn, runTui;
|
|
15039
15082
|
var init_app = __esmMin((() => {
|
|
15040
15083
|
init_dist();
|
|
15041
15084
|
init_report();
|
|
@@ -15054,6 +15097,12 @@ var init_app = __esmMin((() => {
|
|
|
15054
15097
|
init_upgrade();
|
|
15055
15098
|
PRINTABLE = /^[\S ]$/;
|
|
15056
15099
|
KEY_HISTORY = 40;
|
|
15100
|
+
TRAIL_HISTORY = 20;
|
|
15101
|
+
momentOf = (named, state) => {
|
|
15102
|
+
const file = selectedPatch(state)?.path ?? "none";
|
|
15103
|
+
const place = `${state.screen}/${state.focus}`;
|
|
15104
|
+
return `${named.padEnd(16)} ${place.padEnd(16)} row ${String(state.cursor + 1).padStart(5)} ${file}`;
|
|
15105
|
+
};
|
|
15057
15106
|
copyToClipboard = (text) => {
|
|
15058
15107
|
const encoded = Buffer.from(text, "utf8").toString("base64");
|
|
15059
15108
|
process.stdout.write(`\u001B]52;c;${encoded}\u0007`);
|
|
@@ -15098,9 +15147,11 @@ var init_app = __esmMin((() => {
|
|
|
15098
15147
|
};
|
|
15099
15148
|
LISTENS = /* @__PURE__ */ new Set(["keys", "palette"]);
|
|
15100
15149
|
listens = (screen) => LISTENS.has(screen);
|
|
15150
|
+
laidOut = (key) => key.baseCode === void 0 || key.name.length !== 1 ? key.name : String.fromCodePoint(key.baseCode);
|
|
15101
15151
|
keyName = (key) => {
|
|
15102
15152
|
if (key.shift && key.name === "tab") return "shift+tab";
|
|
15103
|
-
const
|
|
15153
|
+
const named = laidOut(key);
|
|
15154
|
+
const base = key.shift && named.length === 1 ? named.toUpperCase() : named;
|
|
15104
15155
|
return key.ctrl ? `ctrl+${base}` : base;
|
|
15105
15156
|
};
|
|
15106
15157
|
App = class {
|
|
@@ -15118,6 +15169,7 @@ var init_app = __esmMin((() => {
|
|
|
15118
15169
|
remembered = "";
|
|
15119
15170
|
wrapKept = false;
|
|
15120
15171
|
keys = [];
|
|
15172
|
+
trail = [];
|
|
15121
15173
|
fading;
|
|
15122
15174
|
wheel = 0;
|
|
15123
15175
|
sideways = 0;
|
|
@@ -15559,6 +15611,15 @@ var init_app = __esmMin((() => {
|
|
|
15559
15611
|
}
|
|
15560
15612
|
this.commit(openedAt(this.measured(), at, entry.comment.end));
|
|
15561
15613
|
yield* this.turnedTo();
|
|
15614
|
+
yield* this.readAnswers(entry.comment.id);
|
|
15615
|
+
});
|
|
15616
|
+
}
|
|
15617
|
+
readAnswers(id) {
|
|
15618
|
+
return gen({ self: this }, function* () {
|
|
15619
|
+
const branch = selectedBranch(this.state);
|
|
15620
|
+
if (id === void 0 || branch === void 0) return;
|
|
15621
|
+
yield* markRead(this.repo, branch.branch, id);
|
|
15622
|
+
this.commit(withSent(this.state, yield* this.loadSent(branch.branch)));
|
|
15562
15623
|
});
|
|
15563
15624
|
}
|
|
15564
15625
|
settleHere() {
|
|
@@ -15836,8 +15897,11 @@ var init_app = __esmMin((() => {
|
|
|
15836
15897
|
}
|
|
15837
15898
|
remember(action, key) {
|
|
15838
15899
|
if (takesText(this.state.screen) && action === void 0) return;
|
|
15839
|
-
|
|
15900
|
+
const named = action ?? keyName(key);
|
|
15901
|
+
this.keys.push(named);
|
|
15840
15902
|
if (this.keys.length > KEY_HISTORY) this.keys.shift();
|
|
15903
|
+
this.trail.push(momentOf(named, this.state));
|
|
15904
|
+
if (this.trail.length > TRAIL_HISTORY) this.trail.shift();
|
|
15841
15905
|
}
|
|
15842
15906
|
sendReport() {
|
|
15843
15907
|
return gen({ self: this }, function* () {
|
|
@@ -15848,6 +15912,7 @@ var init_app = __esmMin((() => {
|
|
|
15848
15912
|
const text = buildReport(this.state, {
|
|
15849
15913
|
repo: this.repo,
|
|
15850
15914
|
keys: this.keys,
|
|
15915
|
+
trail: this.trail,
|
|
15851
15916
|
failure: this.failure,
|
|
15852
15917
|
width: this.renderer.width,
|
|
15853
15918
|
height: this.renderer.height
|
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.59",
|
|
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": {
|