@norman-else/dsh-claude 0.1.38 → 0.1.40
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/lib/client.d.ts +1 -0
- package/lib/client.js +56 -38
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +132 -49
- package/lib/index.mjs.map +1 -1
- package/package.json +1 -1
package/lib/client.d.ts
CHANGED
|
@@ -336,6 +336,7 @@ declare const en: {
|
|
|
336
336
|
readonly reviewCommentCancel: "Cancel";
|
|
337
337
|
readonly reviewCommentRemove: "Remove comment";
|
|
338
338
|
readonly reviewThreadReply: "Reply";
|
|
339
|
+
readonly reviewThreadSendToAi: "Send to AI";
|
|
339
340
|
readonly reviewThreadBot: "Bot";
|
|
340
341
|
readonly reviewThreadAgo: "{age} ago";
|
|
341
342
|
readonly reviewThreadReplyTo: "Reply to @{author}";
|
package/lib/client.js
CHANGED
|
@@ -2687,17 +2687,8 @@ window.__ModuleLoader__.load({
|
|
|
2687
2687
|
color: "var(--dsw-alias-label-secondary)",
|
|
2688
2688
|
transition: "transform 120ms ease"
|
|
2689
2689
|
};
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
padding: "2px 8px",
|
|
2693
|
-
border: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))",
|
|
2694
|
-
borderRadius: 6,
|
|
2695
|
-
background: "transparent",
|
|
2696
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
2697
|
-
font: "inherit",
|
|
2698
|
-
fontSize: 12,
|
|
2699
|
-
cursor: "pointer"
|
|
2700
|
-
};
|
|
2690
|
+
/** Sits at the far end of the summary row; the rest of the button is the shared icon-button class. */
|
|
2691
|
+
const diffSummaryAction = { marginLeft: "auto" };
|
|
2701
2692
|
const diffCommentNav = {
|
|
2702
2693
|
display: "inline-flex",
|
|
2703
2694
|
alignItems: "center",
|
|
@@ -3041,6 +3032,9 @@ window.__ModuleLoader__.load({
|
|
|
3041
3032
|
};
|
|
3042
3033
|
const diffFile = { borderBottom: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))" };
|
|
3043
3034
|
const diffFileHeader = {
|
|
3035
|
+
position: "sticky",
|
|
3036
|
+
top: 0,
|
|
3037
|
+
zIndex: 1,
|
|
3044
3038
|
width: "100%",
|
|
3045
3039
|
minHeight: 38,
|
|
3046
3040
|
display: "flex",
|
|
@@ -12273,7 +12267,7 @@ window.__ModuleLoader__.load({
|
|
|
12273
12267
|
];
|
|
12274
12268
|
const marked = new Z({
|
|
12275
12269
|
gfm: true,
|
|
12276
|
-
breaks:
|
|
12270
|
+
breaks: true,
|
|
12277
12271
|
async: false
|
|
12278
12272
|
});
|
|
12279
12273
|
/** Parse one comment body into HTML. Bot machinery written as HTML comments
|
|
@@ -12568,7 +12562,7 @@ window.__ModuleLoader__.load({
|
|
|
12568
12562
|
* the thread, plus the two things a reviewer expects to do with it — answer it
|
|
12569
12563
|
* and close it. A resolved thread collapses, because the diff is about what
|
|
12570
12564
|
* still needs attention. */
|
|
12571
|
-
function ReviewThreadCard({ thread, t, now, anchorKey, active = false, suggest, onReply, onResolvedChange }) {
|
|
12565
|
+
function ReviewThreadCard({ thread, t, now, anchorKey, active = false, suggest, onReply, onResolvedChange, onSendToAi }) {
|
|
12572
12566
|
const [expanded, setExpanded] = useState(false);
|
|
12573
12567
|
const [replying, setReplying] = useState(false);
|
|
12574
12568
|
const [draft, setDraft] = useState("");
|
|
@@ -12700,21 +12694,31 @@ window.__ModuleLoader__.load({
|
|
|
12700
12694
|
]
|
|
12701
12695
|
}) : /* @__PURE__ */ jsxs("div", {
|
|
12702
12696
|
style: diffCommentActions,
|
|
12703
|
-
children: [
|
|
12704
|
-
|
|
12705
|
-
|
|
12706
|
-
|
|
12707
|
-
|
|
12708
|
-
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
|
|
12713
|
-
|
|
12714
|
-
|
|
12715
|
-
|
|
12716
|
-
|
|
12717
|
-
|
|
12697
|
+
children: [
|
|
12698
|
+
onSendToAi === void 0 || thread.resolved ? null : /* @__PURE__ */ jsx("button", {
|
|
12699
|
+
type: "button",
|
|
12700
|
+
style: diffCommentActionButton,
|
|
12701
|
+
disabled: busy,
|
|
12702
|
+
onClick: onSendToAi,
|
|
12703
|
+
children: t("reviewThreadSendToAi")
|
|
12704
|
+
}),
|
|
12705
|
+
/* @__PURE__ */ jsx("button", {
|
|
12706
|
+
type: "button",
|
|
12707
|
+
style: diffCommentActionButton,
|
|
12708
|
+
disabled: busy,
|
|
12709
|
+
onClick: () => {
|
|
12710
|
+
setReplying(true);
|
|
12711
|
+
},
|
|
12712
|
+
children: t("reviewThreadReply")
|
|
12713
|
+
}),
|
|
12714
|
+
/* @__PURE__ */ jsx("button", {
|
|
12715
|
+
type: "button",
|
|
12716
|
+
style: diffCommentActionButton,
|
|
12717
|
+
disabled: busy,
|
|
12718
|
+
onClick: toggleResolved,
|
|
12719
|
+
children: thread.resolved ? t("reviewThreadUnresolve") : t("reviewThreadResolve")
|
|
12720
|
+
})
|
|
12721
|
+
]
|
|
12718
12722
|
})
|
|
12719
12723
|
]
|
|
12720
12724
|
});
|
|
@@ -13019,7 +13023,7 @@ window.__ModuleLoader__.load({
|
|
|
13019
13023
|
children: /* @__PURE__ */ jsx("path", { d: "M14 9.5a2 2 0 0 1-2 2H6l-3.5 2.5V4a2 2 0 0 1 2-2h7.5a2 2 0 0 1 2 2z" })
|
|
13020
13024
|
});
|
|
13021
13025
|
}
|
|
13022
|
-
function DiffFileSection({ file, root, open, t, comments, ghThreads, editorAnchor, editorNode, now, activeTargetKey, suggestMention, onOpenEditor, onOpenChange, onRemoveComment, onReplyToThread, onThreadResolvedChange }) {
|
|
13026
|
+
function DiffFileSection({ file, root, open, t, comments, ghThreads, editorAnchor, editorNode, now, activeTargetKey, suggestMention, onOpenEditor, onOpenChange, onRemoveComment, onReplyToThread, onThreadResolvedChange, onSendThreadToAi }) {
|
|
13023
13027
|
const [revealed, setRevealed] = useState(() => /* @__PURE__ */ new Map());
|
|
13024
13028
|
const [total, setTotal] = useState();
|
|
13025
13029
|
const [expanding, setExpanding] = useState(false);
|
|
@@ -13174,7 +13178,10 @@ window.__ModuleLoader__.load({
|
|
|
13174
13178
|
suggest: suggestMention,
|
|
13175
13179
|
now,
|
|
13176
13180
|
onReply: (body) => onReplyToThread(thread, body),
|
|
13177
|
-
onResolvedChange: (resolved) => onThreadResolvedChange(thread, resolved)
|
|
13181
|
+
onResolvedChange: (resolved) => onThreadResolvedChange(thread, resolved),
|
|
13182
|
+
onSendToAi: onSendThreadToAi === void 0 ? void 0 : () => {
|
|
13183
|
+
onSendThreadToAi(thread);
|
|
13184
|
+
}
|
|
13178
13185
|
}, thread.id)),
|
|
13179
13186
|
editorOpen ? editorNode : null
|
|
13180
13187
|
] }, `${index}:${entry.line}`);
|
|
@@ -13728,14 +13735,20 @@ window.__ModuleLoader__.load({
|
|
|
13728
13735
|
style: diffDelete,
|
|
13729
13736
|
children: ["−", diff.deletions]
|
|
13730
13737
|
}),
|
|
13731
|
-
files.length === 0 ? null : /* @__PURE__ */ jsx(
|
|
13732
|
-
|
|
13733
|
-
|
|
13734
|
-
|
|
13735
|
-
|
|
13736
|
-
|
|
13737
|
-
|
|
13738
|
-
|
|
13738
|
+
files.length === 0 ? null : /* @__PURE__ */ jsx(Tooltip, {
|
|
13739
|
+
label: allFilesOpen ? t("diffCollapseAll") : t("diffExpandAll"),
|
|
13740
|
+
side: "bottom",
|
|
13741
|
+
delayMs: 250,
|
|
13742
|
+
children: /* @__PURE__ */ jsx("button", {
|
|
13743
|
+
type: "button",
|
|
13744
|
+
className: panelIconButtonClass,
|
|
13745
|
+
style: diffSummaryAction,
|
|
13746
|
+
"aria-label": allFilesOpen ? t("diffCollapseAll") : t("diffExpandAll"),
|
|
13747
|
+
onClick: () => {
|
|
13748
|
+
setOpenFiles(new Map(files.map((file) => [file.path, !allFilesOpen])));
|
|
13749
|
+
},
|
|
13750
|
+
children: allFilesOpen ? /* @__PURE__ */ jsx(IconChevronDownOutline14, {}) : /* @__PURE__ */ jsx(IconChevronRightOutline14, {})
|
|
13751
|
+
})
|
|
13739
13752
|
})
|
|
13740
13753
|
]
|
|
13741
13754
|
}),
|
|
@@ -13763,6 +13776,9 @@ window.__ModuleLoader__.load({
|
|
|
13763
13776
|
activeTargetKey,
|
|
13764
13777
|
onReplyToThread: replyToThread,
|
|
13765
13778
|
onThreadResolvedChange: changeThreadResolved,
|
|
13779
|
+
onSendThreadToAi: submitPrompt === void 0 ? void 0 : (thread) => {
|
|
13780
|
+
submitPrompt(composeCommentsPrompt([thread]));
|
|
13781
|
+
},
|
|
13766
13782
|
editorAnchor: commentEditor !== void 0 && commentEditor.path === file.path ? commentEditor : void 0,
|
|
13767
13783
|
editorNode: commentEditorNode,
|
|
13768
13784
|
onOpenEditor: (anchor) => openCommentEditor(file.path, anchor),
|
|
@@ -17351,6 +17367,7 @@ window.__ModuleLoader__.load({
|
|
|
17351
17367
|
reviewCommentCancel: "取消",
|
|
17352
17368
|
reviewCommentRemove: "删除评论",
|
|
17353
17369
|
reviewThreadReply: "回复",
|
|
17370
|
+
reviewThreadSendToAi: "交给 AI 修复",
|
|
17354
17371
|
reviewThreadBot: "Bot",
|
|
17355
17372
|
reviewThreadAgo: "{age}前",
|
|
17356
17373
|
reviewThreadReplyTo: "回复 @{author}",
|
|
@@ -17728,6 +17745,7 @@ window.__ModuleLoader__.load({
|
|
|
17728
17745
|
reviewCommentCancel: "Cancel",
|
|
17729
17746
|
reviewCommentRemove: "Remove comment",
|
|
17730
17747
|
reviewThreadReply: "Reply",
|
|
17748
|
+
reviewThreadSendToAi: "Send to AI",
|
|
17731
17749
|
reviewThreadBot: "Bot",
|
|
17732
17750
|
reviewThreadAgo: "{age} ago",
|
|
17733
17751
|
reviewThreadReplyTo: "Reply to @{author}",
|