@norman-else/dsh-claude 0.1.51 → 0.1.53
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/INSTALL.md +95 -30
- package/README.md +25 -15
- package/lib/client.d.ts +3 -3
- package/lib/client.js +386 -357
- package/lib/client.js.map +1 -1
- package/lib/index.mjs +288 -27
- package/lib/index.mjs.map +1 -1
- package/package.json +79 -79
package/lib/client.js
CHANGED
|
@@ -1957,50 +1957,6 @@ window.__ModuleLoader__.load({
|
|
|
1957
1957
|
borderColor: "color-mix(in srgb, #a78bfa 35%, transparent)",
|
|
1958
1958
|
background: "color-mix(in srgb, #a78bfa 5%, var(--dsw-alias-bg-layer-1))"
|
|
1959
1959
|
};
|
|
1960
|
-
/** The linked bars as one stack, the fold control floating centred above. */
|
|
1961
|
-
const linkedStack = { position: "relative" };
|
|
1962
|
-
/** Two chevron glyphs stacked into one double chevron: 14px tall in all,
|
|
1963
|
-
* the second pulled up over the first. */
|
|
1964
|
-
const linkedFoldGlyph = {
|
|
1965
|
-
display: "flex",
|
|
1966
|
-
flexDirection: "column",
|
|
1967
|
-
alignItems: "center",
|
|
1968
|
-
height: 14,
|
|
1969
|
-
marginTop: 2
|
|
1970
|
-
};
|
|
1971
|
-
const linkedFoldGlyphClass = "dshClaudeLinkedFoldGlyph";
|
|
1972
|
-
/** The second chevron rides 7px up over the first. */
|
|
1973
|
-
const linkedFoldGlyphCss = `
|
|
1974
|
-
.${linkedFoldGlyphClass} > svg + svg { margin-top: -7px; }
|
|
1975
|
-
`;
|
|
1976
|
-
/** The fold control, drawn to the Host's jump-to-latest recipe exactly: a
|
|
1977
|
-
* 34px circle on the floating fill, no border of its own -- the stroke is
|
|
1978
|
-
* the elevation's, set through the same variable the Host sets -- and the
|
|
1979
|
-
* circle asked for by name, since the Host's theme rounds as squircles.
|
|
1980
|
-
* Where it sits comes from the component. Holds only the double chevron;
|
|
1981
|
-
* the count lives in its tooltip. */
|
|
1982
|
-
const linkedFoldChip = {
|
|
1983
|
-
position: "absolute",
|
|
1984
|
-
zIndex: 8,
|
|
1985
|
-
boxSizing: "border-box",
|
|
1986
|
-
display: "flex",
|
|
1987
|
-
alignItems: "center",
|
|
1988
|
-
justifyContent: "center",
|
|
1989
|
-
width: 34,
|
|
1990
|
-
height: 34,
|
|
1991
|
-
padding: 0,
|
|
1992
|
-
border: 0,
|
|
1993
|
-
borderRadius: 100,
|
|
1994
|
-
cornerShape: "round",
|
|
1995
|
-
"--dsw-elevation-stroke-color": "var(--dsw-alias-border-l3)",
|
|
1996
|
-
background: "var(--dsw-alias-button-floating-fill)",
|
|
1997
|
-
color: "var(--dsw-alias-label-primary)",
|
|
1998
|
-
boxShadow: "var(--dsw-elevation-panel)",
|
|
1999
|
-
font: "inherit",
|
|
2000
|
-
cursor: "pointer",
|
|
2001
|
-
transition: "right .15s ease"
|
|
2002
|
-
};
|
|
2003
|
-
/** The folded count beside the chevrons. */
|
|
2004
1960
|
/** A checkout the session wrote into besides its own: lighter, dashed, and
|
|
2005
1961
|
* stacked above the session bar so it reads as attached rather than primary.
|
|
2006
1962
|
* It keeps the bar's opaque fill: the dock floats over the end of the
|
|
@@ -2337,15 +2293,18 @@ window.__ModuleLoader__.load({
|
|
|
2337
2293
|
zIndex: 1100,
|
|
2338
2294
|
bottom: "calc(100% + 8px)",
|
|
2339
2295
|
right: 0,
|
|
2340
|
-
width:
|
|
2296
|
+
width: 360,
|
|
2297
|
+
maxWidth: "calc(100vw - 32px)",
|
|
2298
|
+
maxHeight: "min(480px, calc(100dvh - 48px))",
|
|
2299
|
+
overflowY: "auto",
|
|
2341
2300
|
boxSizing: "border-box",
|
|
2342
2301
|
display: "flex",
|
|
2343
2302
|
flexDirection: "column",
|
|
2344
2303
|
alignItems: "stretch",
|
|
2345
|
-
gap:
|
|
2346
|
-
padding:
|
|
2304
|
+
gap: 12,
|
|
2305
|
+
padding: 18,
|
|
2347
2306
|
border: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))",
|
|
2348
|
-
borderRadius:
|
|
2307
|
+
borderRadius: 14,
|
|
2349
2308
|
background: "var(--dsw-specific-menu, var(--dsw-alias-bg-layer-1))",
|
|
2350
2309
|
boxShadow: "var(--dsw-shadow-lv3)",
|
|
2351
2310
|
textAlign: "left",
|
|
@@ -2353,8 +2312,11 @@ window.__ModuleLoader__.load({
|
|
|
2353
2312
|
};
|
|
2354
2313
|
const repositoryChecksTitle = {
|
|
2355
2314
|
color: "var(--dsw-alias-label-primary)",
|
|
2356
|
-
fontSize:
|
|
2357
|
-
fontWeight: 650
|
|
2315
|
+
fontSize: 14,
|
|
2316
|
+
fontWeight: 650,
|
|
2317
|
+
lineHeight: "22px",
|
|
2318
|
+
paddingBottom: 10,
|
|
2319
|
+
borderBottom: "1px solid var(--dsw-alias-border-l2)"
|
|
2358
2320
|
};
|
|
2359
2321
|
const repositoryChecksHint = {
|
|
2360
2322
|
color: "var(--dsw-alias-label-tertiary)",
|
|
@@ -2367,8 +2329,11 @@ window.__ModuleLoader__.load({
|
|
|
2367
2329
|
const repositoryChecksItem = {
|
|
2368
2330
|
display: "flex",
|
|
2369
2331
|
flexDirection: "column",
|
|
2370
|
-
gap:
|
|
2371
|
-
minWidth: 0
|
|
2332
|
+
gap: 5,
|
|
2333
|
+
minWidth: 0,
|
|
2334
|
+
padding: "10px 12px",
|
|
2335
|
+
borderRadius: 8,
|
|
2336
|
+
background: "var(--dsw-alias-bg-layer-2)"
|
|
2372
2337
|
};
|
|
2373
2338
|
const repositoryChecksName = {
|
|
2374
2339
|
color: "var(--dsw-alias-label-primary)",
|
|
@@ -2381,14 +2346,13 @@ window.__ModuleLoader__.load({
|
|
|
2381
2346
|
const repositoryChecksDesc = {
|
|
2382
2347
|
color: "var(--dsw-alias-label-tertiary)",
|
|
2383
2348
|
fontSize: 11,
|
|
2384
|
-
|
|
2385
|
-
|
|
2386
|
-
whiteSpace: "nowrap"
|
|
2349
|
+
lineHeight: "18px",
|
|
2350
|
+
overflowWrap: "anywhere"
|
|
2387
2351
|
};
|
|
2388
2352
|
const repositoryChecksFix = {
|
|
2389
2353
|
alignSelf: "flex-end",
|
|
2390
|
-
minHeight:
|
|
2391
|
-
padding: "
|
|
2354
|
+
minHeight: 32,
|
|
2355
|
+
padding: "6px 12px",
|
|
2392
2356
|
border: "none",
|
|
2393
2357
|
borderRadius: 7,
|
|
2394
2358
|
background: "var(--dsw-static-blue-450)",
|
|
@@ -2649,10 +2613,11 @@ window.__ModuleLoader__.load({
|
|
|
2649
2613
|
boxSizing: "border-box",
|
|
2650
2614
|
display: "flex",
|
|
2651
2615
|
flexDirection: "column",
|
|
2652
|
-
gap:
|
|
2653
|
-
padding:
|
|
2616
|
+
gap: 14,
|
|
2617
|
+
padding: 18,
|
|
2618
|
+
overflowY: "auto",
|
|
2654
2619
|
border: askSurfaceBorder,
|
|
2655
|
-
borderRadius:
|
|
2620
|
+
borderRadius: 14,
|
|
2656
2621
|
background: "var(--dsw-alias-bg-layer-1)",
|
|
2657
2622
|
color: "var(--dsw-alias-label-primary)",
|
|
2658
2623
|
boxShadow: askSurfaceShadow,
|
|
@@ -2665,7 +2630,7 @@ window.__ModuleLoader__.load({
|
|
|
2665
2630
|
WebkitLineClamp: 3,
|
|
2666
2631
|
WebkitBoxOrient: "vertical",
|
|
2667
2632
|
margin: 0,
|
|
2668
|
-
padding: "
|
|
2633
|
+
padding: "10px 12px",
|
|
2669
2634
|
overflow: "hidden",
|
|
2670
2635
|
borderLeft: "3px solid color-mix(in srgb, var(--dsw-static-blue-450) 60%, transparent)",
|
|
2671
2636
|
borderRadius: 6,
|
|
@@ -2686,7 +2651,8 @@ window.__ModuleLoader__.load({
|
|
|
2686
2651
|
};
|
|
2687
2652
|
const askTextarea = {
|
|
2688
2653
|
width: "100%",
|
|
2689
|
-
minHeight:
|
|
2654
|
+
minHeight: 88,
|
|
2655
|
+
flexShrink: 0,
|
|
2690
2656
|
boxSizing: "border-box",
|
|
2691
2657
|
padding: "8px 10px",
|
|
2692
2658
|
border: askSurfaceBorder,
|
|
@@ -2704,7 +2670,10 @@ window.__ModuleLoader__.load({
|
|
|
2704
2670
|
display: "flex",
|
|
2705
2671
|
alignItems: "center",
|
|
2706
2672
|
justifyContent: "flex-end",
|
|
2707
|
-
gap:
|
|
2673
|
+
gap: 8,
|
|
2674
|
+
flexWrap: "wrap",
|
|
2675
|
+
paddingTop: 12,
|
|
2676
|
+
borderTop: "1px solid var(--dsw-alias-border-l2)"
|
|
2708
2677
|
};
|
|
2709
2678
|
const askAnswer = {
|
|
2710
2679
|
flex: "1 1 auto",
|
|
@@ -2714,8 +2683,8 @@ window.__ModuleLoader__.load({
|
|
|
2714
2683
|
wordBreak: "break-word"
|
|
2715
2684
|
};
|
|
2716
2685
|
const askButton = {
|
|
2717
|
-
minHeight:
|
|
2718
|
-
padding: "
|
|
2686
|
+
minHeight: 32,
|
|
2687
|
+
padding: "6px 12px",
|
|
2719
2688
|
border: askSurfaceBorder,
|
|
2720
2689
|
borderRadius: 7,
|
|
2721
2690
|
outline: "none",
|
|
@@ -3204,8 +3173,8 @@ window.__ModuleLoader__.load({
|
|
|
3204
3173
|
.${promptSaveFieldClass} {
|
|
3205
3174
|
box-sizing: border-box;
|
|
3206
3175
|
width: 100%;
|
|
3207
|
-
height:
|
|
3208
|
-
padding: 0
|
|
3176
|
+
height: 38px;
|
|
3177
|
+
padding: 0 11px;
|
|
3209
3178
|
border: 1px solid var(--dsw-alias-border-inverted);
|
|
3210
3179
|
border-radius: 7px;
|
|
3211
3180
|
background: var(--dsw-alias-interactive-bg-hover);
|
|
@@ -3243,12 +3212,14 @@ window.__ModuleLoader__.load({
|
|
|
3243
3212
|
boxSizing: "border-box",
|
|
3244
3213
|
display: "flex",
|
|
3245
3214
|
flexDirection: "column",
|
|
3246
|
-
gap:
|
|
3247
|
-
width:
|
|
3215
|
+
gap: 14,
|
|
3216
|
+
width: 360,
|
|
3248
3217
|
maxWidth: "calc(100vw - 32px)",
|
|
3249
|
-
|
|
3218
|
+
maxHeight: "calc(100dvh - 32px)",
|
|
3219
|
+
overflowY: "auto",
|
|
3220
|
+
padding: 18,
|
|
3250
3221
|
border: "1px solid var(--dsw-alias-border-inverted)",
|
|
3251
|
-
borderRadius:
|
|
3222
|
+
borderRadius: 14,
|
|
3252
3223
|
background: "var(--dsw-specific-menu)",
|
|
3253
3224
|
boxShadow: "var(--dsw-shadow-lv3)",
|
|
3254
3225
|
color: "var(--dsw-alias-label-primary)",
|
|
@@ -3256,14 +3227,17 @@ window.__ModuleLoader__.load({
|
|
|
3256
3227
|
lineHeight: "20px"
|
|
3257
3228
|
};
|
|
3258
3229
|
const promptSaveHeading = {
|
|
3259
|
-
color: "var(--dsw-alias-label-
|
|
3260
|
-
fontSize:
|
|
3261
|
-
|
|
3230
|
+
color: "var(--dsw-alias-label-primary)",
|
|
3231
|
+
fontSize: 14,
|
|
3232
|
+
fontWeight: 600,
|
|
3233
|
+
lineHeight: "22px"
|
|
3262
3234
|
};
|
|
3263
3235
|
const promptSaveActions = {
|
|
3264
3236
|
display: "flex",
|
|
3265
3237
|
justifyContent: "flex-end",
|
|
3266
|
-
gap:
|
|
3238
|
+
gap: 8,
|
|
3239
|
+
paddingTop: 12,
|
|
3240
|
+
borderTop: "1px solid var(--dsw-alias-border-l2)"
|
|
3267
3241
|
};
|
|
3268
3242
|
/** The saved file, wrapped rather than truncated: a path the user cannot read
|
|
3269
3243
|
* in full does not tell them where to go and edit it. */
|
|
@@ -3271,7 +3245,10 @@ window.__ModuleLoader__.load({
|
|
|
3271
3245
|
color: "var(--dsw-alias-label-tertiary)",
|
|
3272
3246
|
fontSize: 11,
|
|
3273
3247
|
lineHeight: "16px",
|
|
3274
|
-
overflowWrap: "anywhere"
|
|
3248
|
+
overflowWrap: "anywhere",
|
|
3249
|
+
padding: "10px 12px",
|
|
3250
|
+
borderRadius: 8,
|
|
3251
|
+
background: "var(--dsw-alias-bg-layer-2)"
|
|
3275
3252
|
};
|
|
3276
3253
|
const promptSaveError = {
|
|
3277
3254
|
color: "var(--dsw-static-red-450, #d64545)",
|
|
@@ -3354,6 +3331,7 @@ window.__ModuleLoader__.load({
|
|
|
3354
3331
|
cursor: "pointer"
|
|
3355
3332
|
};
|
|
3356
3333
|
const diffRepositoryTriggerClass = "dshClaudeDiffRepositoryTrigger";
|
|
3334
|
+
const diffFileHeaderClass = "dshClaudeDiffFileHeader";
|
|
3357
3335
|
/** The checkout switch: a quiet pill in the header's own type, lit on hover
|
|
3358
3336
|
* and while its menu is open, with the chevron set off in a lighter tone. */
|
|
3359
3337
|
const diffRepositoryCss = `
|
|
@@ -3388,6 +3366,15 @@ window.__ModuleLoader__.load({
|
|
|
3388
3366
|
flex: none;
|
|
3389
3367
|
color: var(--dsw-alias-label-tertiary);
|
|
3390
3368
|
}
|
|
3369
|
+
/* Sticky headers each form a stacking context, so the host Tooltip bubble
|
|
3370
|
+
(rendered inline, position: fixed) is painted under the next file's header.
|
|
3371
|
+
Lift the hovered header above its siblings while the bubble can be open. */
|
|
3372
|
+
.${diffFileHeaderClass} {
|
|
3373
|
+
z-index: 1;
|
|
3374
|
+
}
|
|
3375
|
+
.${diffFileHeaderClass}:hover {
|
|
3376
|
+
z-index: 2;
|
|
3377
|
+
}
|
|
3391
3378
|
`;
|
|
3392
3379
|
/** A row of the checkout menu: name left, its counts right in tabular figures. */
|
|
3393
3380
|
const diffRepositoryRow = {
|
|
@@ -3438,7 +3425,6 @@ window.__ModuleLoader__.load({
|
|
|
3438
3425
|
const diffFileHeader = {
|
|
3439
3426
|
position: "sticky",
|
|
3440
3427
|
top: 0,
|
|
3441
|
-
zIndex: 1,
|
|
3442
3428
|
width: "100%",
|
|
3443
3429
|
minHeight: 38,
|
|
3444
3430
|
display: "flex",
|
|
@@ -3674,6 +3660,107 @@ window.__ModuleLoader__.load({
|
|
|
3674
3660
|
outline: none;
|
|
3675
3661
|
box-shadow: inset 0 0 0 1px var(--dsw-static-blue-450);
|
|
3676
3662
|
}
|
|
3663
|
+
.dshClaudeUtilityDialog {
|
|
3664
|
+
width: min(580px, calc(100vw - 32px));
|
|
3665
|
+
max-width: calc(100vw - 32px);
|
|
3666
|
+
max-height: calc(100dvh - 32px);
|
|
3667
|
+
gap: 0;
|
|
3668
|
+
padding: 0;
|
|
3669
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
3670
|
+
border-radius: 16px;
|
|
3671
|
+
}
|
|
3672
|
+
.dshClaudeUtilityContent { box-sizing: border-box; padding: 24px; }
|
|
3673
|
+
.dshClaudeUtilityContent > div:first-child { padding: 0 0 12px; }
|
|
3674
|
+
.dshClaudeUtilityContent h2 { font-size: 19px; line-height: 28px; letter-spacing: -.3px; }
|
|
3675
|
+
.dshClaudeUtilityContent > p { padding: 0; margin: 0 0 20px; color: var(--dsw-alias-label-secondary); }
|
|
3676
|
+
.dshClaudeUtilityContent > div:last-child:not(:first-child) { padding: 0; margin-top: 0; }
|
|
3677
|
+
.dshClaudeUtilityDialog > div:last-child:not(.dshClaudeUtilityContent) { padding: 16px 24px; border-top: 1px solid var(--dsw-alias-border-l2); }
|
|
3678
|
+
.dshClaudeUtilitySummary {
|
|
3679
|
+
padding: 14px;
|
|
3680
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
3681
|
+
border-radius: 10px;
|
|
3682
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
3683
|
+
flex-wrap: wrap;
|
|
3684
|
+
align-items: center;
|
|
3685
|
+
}
|
|
3686
|
+
.dshClaudeUtilitySummary > strong { color: var(--dsw-alias-label-primary); }
|
|
3687
|
+
.dshClaudeUtilitySummary > span { max-width: 100%; white-space: normal; overflow-wrap: anywhere; }
|
|
3688
|
+
.dshClaudeUtilityOption {
|
|
3689
|
+
padding: 13px 14px;
|
|
3690
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
3691
|
+
border-radius: 10px;
|
|
3692
|
+
line-height: 20px;
|
|
3693
|
+
cursor: pointer;
|
|
3694
|
+
}
|
|
3695
|
+
.dshClaudeUtilityOption input { flex-shrink: 0; }
|
|
3696
|
+
.dshClaudeUtilityOption:has(input:checked) { border-color: color-mix(in srgb, var(--dsw-static-blue-450) 45%, var(--dsw-alias-border-l2)); background: color-mix(in srgb, var(--dsw-static-blue-450) 5%, transparent); }
|
|
3697
|
+
.dshClaudeUtilityOption:has(input:disabled) { cursor: default; }
|
|
3698
|
+
.dshClaudeUtilityContent ul { max-height: 240px; overflow-y: auto; }
|
|
3699
|
+
.dshClaudeUtilityContent li { padding: 8px 4px; overflow-wrap: anywhere; }
|
|
3700
|
+
.dshClaudeUtilityContent li + li { border-top: 1px solid var(--dsw-alias-border-l2); }
|
|
3701
|
+
.dshClaudeUtilityContent [role='alert'] { padding: 12px; border-radius: 8px; background: var(--dsw-alias-bg-layer-1); overflow-wrap: anywhere; }
|
|
3702
|
+
.dshClaudeUtilityDialog button:focus-visible { outline: 2px solid var(--dsw-static-blue-450); outline-offset: 2px; }
|
|
3703
|
+
@media (max-width: 640px) {
|
|
3704
|
+
.dshClaudeUtilityContent { padding: 18px; }
|
|
3705
|
+
.dshClaudeUtilityDialog > div:last-child:not(.dshClaudeUtilityContent) { padding: 14px 18px; }
|
|
3706
|
+
}
|
|
3707
|
+
.dshClaudeCommitDialog {
|
|
3708
|
+
gap: 0;
|
|
3709
|
+
padding: 0;
|
|
3710
|
+
width: min(880px, calc(100vw - 32px));
|
|
3711
|
+
max-width: calc(100vw - 32px);
|
|
3712
|
+
max-height: calc(100dvh - 32px);
|
|
3713
|
+
border: 1px solid var(--dsw-alias-border-l2);
|
|
3714
|
+
border-radius: 16px;
|
|
3715
|
+
overflow: hidden;
|
|
3716
|
+
}
|
|
3717
|
+
.dshClaudeCommitContent { padding: 24px; box-sizing: border-box; }
|
|
3718
|
+
.dshClaudeCommitContent > div:first-child { padding: 0 0 16px; }
|
|
3719
|
+
.dshClaudeCommitContent > div:last-child:not(:first-child) { padding: 0; margin-top: 0; }
|
|
3720
|
+
.dshClaudeCommitContent h2 { font-size: 19px; line-height: 28px; letter-spacing: -.3px; }
|
|
3721
|
+
.dshClaudeCommitContext {
|
|
3722
|
+
display: flex;
|
|
3723
|
+
align-items: center;
|
|
3724
|
+
flex-wrap: wrap;
|
|
3725
|
+
gap: 8px;
|
|
3726
|
+
padding-bottom: 18px;
|
|
3727
|
+
border-bottom: 1px solid var(--dsw-alias-border-l2);
|
|
3728
|
+
color: var(--dsw-alias-label-secondary);
|
|
3729
|
+
font-size: 12px;
|
|
3730
|
+
overflow-wrap: anywhere;
|
|
3731
|
+
}
|
|
3732
|
+
.dshClaudeCommitContext strong { color: var(--dsw-alias-label-primary); margin-right: 4px; }
|
|
3733
|
+
.dshClaudeCommitBranch {
|
|
3734
|
+
min-width: 0;
|
|
3735
|
+
padding: 3px 8px;
|
|
3736
|
+
border-radius: 6px;
|
|
3737
|
+
background: var(--dsw-alias-bg-layer-1);
|
|
3738
|
+
font-family: ui-monospace, monospace;
|
|
3739
|
+
}
|
|
3740
|
+
.dshClaudeCommitGrid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: 24px; }
|
|
3741
|
+
.dshClaudeCommitSection, .dshClaudeCommitEditor { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
|
|
3742
|
+
.dshClaudeCommitSection h3 { margin: 0; font-size: 12px; font-weight: 600; color: var(--dsw-alias-label-secondary); }
|
|
3743
|
+
.dshClaudeCommitChanges { padding-right: 24px; border-right: 1px solid var(--dsw-alias-border-l2); }
|
|
3744
|
+
.dshClaudeCommitFiles { max-height: 320px; overflow-y: auto; min-width: 0; }
|
|
3745
|
+
.dshClaudeCommitFile { display: flex; align-items: center; gap: 10px; padding: 11px 0; font-size: 12px; line-height: 18px; }
|
|
3746
|
+
.dshClaudeCommitFile + .dshClaudeCommitFile { border-top: 1px solid var(--dsw-alias-border-l2); }
|
|
3747
|
+
.dshClaudeCommitPath { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
|
3748
|
+
.dshClaudeCommitState { flex: none; max-width: 45%; padding: 2px 6px; border-radius: 4px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-secondary); font-size: 10px; line-height: 16px; }
|
|
3749
|
+
.dshClaudeCommitState[data-staged='true'] { color: var(--dsw-static-green-450, var(--dsw-alias-label-primary)); }
|
|
3750
|
+
.dshClaudeCommitHash { flex: none; color: var(--dsw-alias-label-secondary); font-size: 11px; }
|
|
3751
|
+
.dshClaudeCommitEditor textarea, .dshClaudeCommitEditor input { border-radius: 8px; }
|
|
3752
|
+
.dshClaudeCommitEditor textarea { width: 100%; box-sizing: border-box; }
|
|
3753
|
+
.dshClaudeCommitHint { margin: -6px 0 0; color: var(--dsw-alias-label-secondary); font-size: 11px; line-height: 18px; }
|
|
3754
|
+
.dshClaudeCommitProgress { margin: 0 0 16px; padding: 10px 12px; border-radius: 8px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-secondary); font-size: 12px; line-height: 18px; }
|
|
3755
|
+
.dshClaudeCommitDialog > div:last-child:not(.dshClaudeCommitContent) { padding: 16px 24px; border-top: 1px solid var(--dsw-alias-border-l2); }
|
|
3756
|
+
.dshClaudeCommitDialog button:focus-visible { outline: 2px solid var(--dsw-static-blue-450); outline-offset: 2px; }
|
|
3757
|
+
@media (max-width: 640px) {
|
|
3758
|
+
.dshClaudeCommitContent { padding: 18px; }
|
|
3759
|
+
.dshClaudeCommitGrid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
|
|
3760
|
+
.dshClaudeCommitChanges { padding: 0 0 18px; border-right: 0; border-bottom: 1px solid var(--dsw-alias-border-l2); }
|
|
3761
|
+
.dshClaudeCommitFiles { max-height: 180px; }
|
|
3762
|
+
.dshClaudeCommitDialog > div:last-child:not(.dshClaudeCommitContent) { padding: 14px 18px; }
|
|
3763
|
+
}
|
|
3677
3764
|
`;
|
|
3678
3765
|
const diffModalBody = {
|
|
3679
3766
|
display: "flex",
|
|
@@ -3698,31 +3785,6 @@ window.__ModuleLoader__.load({
|
|
|
3698
3785
|
textOverflow: "ellipsis",
|
|
3699
3786
|
whiteSpace: "nowrap"
|
|
3700
3787
|
};
|
|
3701
|
-
const diffModalFiles = {
|
|
3702
|
-
minWidth: 0,
|
|
3703
|
-
maxHeight: 300,
|
|
3704
|
-
overflowX: "hidden",
|
|
3705
|
-
overflowY: "auto",
|
|
3706
|
-
border: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))",
|
|
3707
|
-
borderRadius: 8
|
|
3708
|
-
};
|
|
3709
|
-
const diffModalFile = {
|
|
3710
|
-
display: "flex",
|
|
3711
|
-
justifyContent: "space-between",
|
|
3712
|
-
gap: 12,
|
|
3713
|
-
minWidth: 0,
|
|
3714
|
-
padding: "8px 12px",
|
|
3715
|
-
borderBottom: "1px solid var(--dsw-alias-border-l2, color-mix(in srgb, currentColor 16%, transparent))",
|
|
3716
|
-
color: "var(--dsw-alias-label-secondary)",
|
|
3717
|
-
fontSize: 12,
|
|
3718
|
-
lineHeight: "18px"
|
|
3719
|
-
};
|
|
3720
|
-
const diffModalFilePath = {
|
|
3721
|
-
minWidth: 0,
|
|
3722
|
-
overflow: "hidden",
|
|
3723
|
-
textOverflow: "ellipsis",
|
|
3724
|
-
whiteSpace: "nowrap"
|
|
3725
|
-
};
|
|
3726
3788
|
const diffModalFileState = { flex: "none" };
|
|
3727
3789
|
const diffModalField = {
|
|
3728
3790
|
display: "flex",
|
|
@@ -8127,6 +8189,26 @@ window.__ModuleLoader__.load({
|
|
|
8127
8189
|
throw actionError(error);
|
|
8128
8190
|
}
|
|
8129
8191
|
}
|
|
8192
|
+
/** Title and Summary/Changes body for the pull request the branch would open;
|
|
8193
|
+
* `baseBranch` empty means origin's default branch. */
|
|
8194
|
+
async function generatePullRequestText(sessionId, fingerprint, baseBranch, signal, root) {
|
|
8195
|
+
try {
|
|
8196
|
+
const value = record$3(await pluginWrite(`${CLAUDE_REPOSITORY_ACTION_PATH}/pull-request`, "remote", signal, {
|
|
8197
|
+
query: sessionQuery(sessionId, root),
|
|
8198
|
+
json: {
|
|
8199
|
+
fingerprint,
|
|
8200
|
+
...baseBranch === void 0 || baseBranch.trim() === "" ? {} : { baseBranch: baseBranch.trim() }
|
|
8201
|
+
}
|
|
8202
|
+
}));
|
|
8203
|
+
if (typeof value?.title !== "string" || typeof value.body !== "string") throw new Error("Invalid generated pull request text.");
|
|
8204
|
+
return {
|
|
8205
|
+
title: value.title,
|
|
8206
|
+
body: value.body
|
|
8207
|
+
};
|
|
8208
|
+
} catch (error) {
|
|
8209
|
+
throw actionError(error);
|
|
8210
|
+
}
|
|
8211
|
+
}
|
|
8130
8212
|
async function executeRepositoryAction(sessionId, request, root) {
|
|
8131
8213
|
try {
|
|
8132
8214
|
return result(await pluginWrite(CLAUDE_REPOSITORY_ACTION_PATH, "remote", void 0, {
|
|
@@ -8891,8 +8973,8 @@ window.__ModuleLoader__.load({
|
|
|
8891
8973
|
children: diffModalCss
|
|
8892
8974
|
}),
|
|
8893
8975
|
/* @__PURE__ */ jsx(Modal, {
|
|
8894
|
-
className: "dshClaudeRepositoryActionModal",
|
|
8895
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
8976
|
+
className: "dshClaudeRepositoryActionModal dshClaudeUtilityDialog",
|
|
8977
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeUtilityContent",
|
|
8896
8978
|
open: dialog !== void 0,
|
|
8897
8979
|
onClose: closeDialog,
|
|
8898
8980
|
title: t("conflictTitle"),
|
|
@@ -8930,6 +9012,7 @@ window.__ModuleLoader__.load({
|
|
|
8930
9012
|
style: diffModalBody,
|
|
8931
9013
|
children: [
|
|
8932
9014
|
/* @__PURE__ */ jsxs("div", {
|
|
9015
|
+
className: "dshClaudeUtilitySummary",
|
|
8933
9016
|
style: diffModalMeta,
|
|
8934
9017
|
children: [/* @__PURE__ */ jsxs("strong", {
|
|
8935
9018
|
style: diffModalMetaText,
|
|
@@ -8957,6 +9040,7 @@ window.__ModuleLoader__.load({
|
|
|
8957
9040
|
children: t("conflictResolve")
|
|
8958
9041
|
}),
|
|
8959
9042
|
repository.remote === void 0 ? null : /* @__PURE__ */ jsxs("label", {
|
|
9043
|
+
className: "dshClaudeUtilityOption",
|
|
8960
9044
|
style: diffModalCheckbox,
|
|
8961
9045
|
children: [/* @__PURE__ */ jsx("input", {
|
|
8962
9046
|
type: "checkbox",
|
|
@@ -9083,8 +9167,8 @@ window.__ModuleLoader__.load({
|
|
|
9083
9167
|
children: diffModalCss
|
|
9084
9168
|
}),
|
|
9085
9169
|
/* @__PURE__ */ jsx(Modal, {
|
|
9086
|
-
className: "dshClaudeRepositoryActionModal",
|
|
9087
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
9170
|
+
className: "dshClaudeRepositoryActionModal dshClaudeUtilityDialog",
|
|
9171
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeUtilityContent",
|
|
9088
9172
|
open: dialog !== void 0,
|
|
9089
9173
|
onClose: closeDialog,
|
|
9090
9174
|
title: t("repositoryUpdateBranch"),
|
|
@@ -9116,6 +9200,7 @@ window.__ModuleLoader__.load({
|
|
|
9116
9200
|
style: diffModalBody,
|
|
9117
9201
|
children: [
|
|
9118
9202
|
/* @__PURE__ */ jsxs("div", {
|
|
9203
|
+
className: "dshClaudeUtilitySummary",
|
|
9119
9204
|
style: diffModalMeta,
|
|
9120
9205
|
children: [/* @__PURE__ */ jsxs("strong", {
|
|
9121
9206
|
style: diffModalMetaText,
|
|
@@ -9134,6 +9219,7 @@ window.__ModuleLoader__.load({
|
|
|
9134
9219
|
})]
|
|
9135
9220
|
}),
|
|
9136
9221
|
["rebase", "merge"].map((option) => /* @__PURE__ */ jsxs("label", {
|
|
9222
|
+
className: "dshClaudeUtilityOption",
|
|
9137
9223
|
style: diffModalCheckbox,
|
|
9138
9224
|
children: [/* @__PURE__ */ jsx("input", {
|
|
9139
9225
|
type: "radio",
|
|
@@ -9216,8 +9302,8 @@ window.__ModuleLoader__.load({
|
|
|
9216
9302
|
children: diffModalCss
|
|
9217
9303
|
}),
|
|
9218
9304
|
/* @__PURE__ */ jsx(Modal, {
|
|
9219
|
-
className: "dshClaudeRepositoryActionModal",
|
|
9220
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
9305
|
+
className: "dshClaudeRepositoryActionModal dshClaudeUtilityDialog",
|
|
9306
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeUtilityContent",
|
|
9221
9307
|
open: dialog !== void 0,
|
|
9222
9308
|
onClose: closeDialog,
|
|
9223
9309
|
title: t("cleanupTitle"),
|
|
@@ -9248,6 +9334,7 @@ window.__ModuleLoader__.load({
|
|
|
9248
9334
|
children: dialog === void 0 ? null : /* @__PURE__ */ jsxs("div", {
|
|
9249
9335
|
style: diffModalBody,
|
|
9250
9336
|
children: [/* @__PURE__ */ jsxs("div", {
|
|
9337
|
+
className: "dshClaudeUtilitySummary",
|
|
9251
9338
|
style: diffModalMeta,
|
|
9252
9339
|
children: [/* @__PURE__ */ jsxs("strong", {
|
|
9253
9340
|
style: diffModalMetaText,
|
|
@@ -9364,8 +9451,8 @@ window.__ModuleLoader__.load({
|
|
|
9364
9451
|
children: diffModalCss
|
|
9365
9452
|
}),
|
|
9366
9453
|
/* @__PURE__ */ jsx(Modal, {
|
|
9367
|
-
className: "dshClaudeRepositoryActionModal",
|
|
9368
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
9454
|
+
className: "dshClaudeRepositoryActionModal dshClaudeUtilityDialog",
|
|
9455
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeUtilityContent",
|
|
9369
9456
|
open: dialog !== void 0,
|
|
9370
9457
|
onClose: closeDialog,
|
|
9371
9458
|
title: t("diffMergePr"),
|
|
@@ -9397,6 +9484,7 @@ window.__ModuleLoader__.load({
|
|
|
9397
9484
|
style: diffModalBody,
|
|
9398
9485
|
children: [
|
|
9399
9486
|
/* @__PURE__ */ jsxs("div", {
|
|
9487
|
+
className: "dshClaudeUtilitySummary",
|
|
9400
9488
|
style: diffModalMeta,
|
|
9401
9489
|
children: [/* @__PURE__ */ jsxs("strong", {
|
|
9402
9490
|
style: diffModalMetaText,
|
|
@@ -9416,6 +9504,7 @@ window.__ModuleLoader__.load({
|
|
|
9416
9504
|
children: pullRequest.title
|
|
9417
9505
|
}),
|
|
9418
9506
|
/* @__PURE__ */ jsxs("label", {
|
|
9507
|
+
className: "dshClaudeUtilityOption",
|
|
9419
9508
|
style: diffModalCheckbox,
|
|
9420
9509
|
children: [/* @__PURE__ */ jsx("input", {
|
|
9421
9510
|
type: "checkbox",
|
|
@@ -9645,143 +9734,24 @@ window.__ModuleLoader__.load({
|
|
|
9645
9734
|
]
|
|
9646
9735
|
});
|
|
9647
9736
|
}
|
|
9648
|
-
const linkedExpanded = /* @__PURE__ */ new Map();
|
|
9649
|
-
/** Where the Host's jump-to-latest button sits relative to the linked
|
|
9650
|
-
* stack, remembered from the last time it was on screen: the seat the fold
|
|
9651
|
-
* control takes while the Host's button is away. Until it has been seen
|
|
9652
|
-
* once, the Host's own geometry: 16px in from the column's edge, 16px above
|
|
9653
|
-
* the composer. */
|
|
9654
|
-
let hostSeat = {
|
|
9655
|
-
top: -50,
|
|
9656
|
-
rightInset: 16
|
|
9657
|
-
};
|
|
9658
|
-
const HOST_JUMP_GAP = 8;
|
|
9659
|
-
/** The fold control's place: the Host's seat, or 8px left of the Host's
|
|
9660
|
-
* button while that is showing. Found by the Host's class stem; one cheap
|
|
9661
|
-
* query and two rects per DOM change or resize, on the next frame. */
|
|
9662
|
-
function useHostJumpSeat(stack) {
|
|
9663
|
-
const [seat, setSeat] = useState({
|
|
9664
|
-
shown: false,
|
|
9665
|
-
top: hostSeat.top,
|
|
9666
|
-
right: hostSeat.rightInset
|
|
9667
|
-
});
|
|
9668
|
-
useEffect(() => {
|
|
9669
|
-
if (typeof document === "undefined" || typeof MutationObserver === "undefined") return;
|
|
9670
|
-
let frame;
|
|
9671
|
-
const check = () => {
|
|
9672
|
-
frame = void 0;
|
|
9673
|
-
const native = document.querySelector("button[class*=\"toBottom\"]");
|
|
9674
|
-
const frameRect = stack.current?.getBoundingClientRect();
|
|
9675
|
-
if (native === null || frameRect === void 0) {
|
|
9676
|
-
setSeat({
|
|
9677
|
-
shown: false,
|
|
9678
|
-
top: hostSeat.top,
|
|
9679
|
-
right: hostSeat.rightInset
|
|
9680
|
-
});
|
|
9681
|
-
return;
|
|
9682
|
-
}
|
|
9683
|
-
const rect = native.getBoundingClientRect();
|
|
9684
|
-
if (rect.width > 0) hostSeat = {
|
|
9685
|
-
top: rect.top - frameRect.top,
|
|
9686
|
-
rightInset: frameRect.right - rect.right
|
|
9687
|
-
};
|
|
9688
|
-
setSeat({
|
|
9689
|
-
shown: true,
|
|
9690
|
-
top: hostSeat.top,
|
|
9691
|
-
right: frameRect.right - rect.left + HOST_JUMP_GAP
|
|
9692
|
-
});
|
|
9693
|
-
};
|
|
9694
|
-
const schedule = () => {
|
|
9695
|
-
if (frame === void 0) frame = requestAnimationFrame(check);
|
|
9696
|
-
};
|
|
9697
|
-
check();
|
|
9698
|
-
const observer = new MutationObserver(schedule);
|
|
9699
|
-
observer.observe(document.body, {
|
|
9700
|
-
childList: true,
|
|
9701
|
-
subtree: true
|
|
9702
|
-
});
|
|
9703
|
-
window.addEventListener("resize", schedule);
|
|
9704
|
-
return () => {
|
|
9705
|
-
observer.disconnect();
|
|
9706
|
-
window.removeEventListener("resize", schedule);
|
|
9707
|
-
if (frame !== void 0) cancelAnimationFrame(frame);
|
|
9708
|
-
};
|
|
9709
|
-
}, [stack]);
|
|
9710
|
-
return seat;
|
|
9711
|
-
}
|
|
9712
|
-
/** The fold control floats above the dock in the Host's jump-to-latest seat,
|
|
9713
|
-
* stepping left of that button while the Host shows it: a circle holding a
|
|
9714
|
-
* double chevron pointing where the bars will go -- up while folded, since
|
|
9715
|
-
* unfolding stacks more bars upward; down once open, since folding pulls
|
|
9716
|
-
* them back down toward the composer. The count and the words live in its
|
|
9717
|
-
* tooltip and accessible name. */
|
|
9718
|
-
function LinkedFoldChip({ sessionId, hidden, expanded, onToggle, t, seat }) {
|
|
9719
|
-
const label = expanded ? t("linkedCollapse") : `${t("linkedMore", { count: hidden })} · ${t("linkedShowAll")}`;
|
|
9720
|
-
return /* @__PURE__ */ jsx(Tooltip, {
|
|
9721
|
-
label,
|
|
9722
|
-
side: "top",
|
|
9723
|
-
delayMs: 250,
|
|
9724
|
-
children: /* @__PURE__ */ jsx("button", {
|
|
9725
|
-
type: "button",
|
|
9726
|
-
style: {
|
|
9727
|
-
...linkedFoldChip,
|
|
9728
|
-
top: seat.top,
|
|
9729
|
-
right: seat.right
|
|
9730
|
-
},
|
|
9731
|
-
"aria-expanded": expanded,
|
|
9732
|
-
"aria-label": label,
|
|
9733
|
-
"data-dsh-claude-linked-fold": sessionId,
|
|
9734
|
-
onClick: onToggle,
|
|
9735
|
-
children: /* @__PURE__ */ jsx("span", {
|
|
9736
|
-
className: linkedFoldGlyphClass,
|
|
9737
|
-
style: linkedFoldGlyph,
|
|
9738
|
-
"aria-hidden": "true",
|
|
9739
|
-
children: expanded ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconChevronDownOutline14, {}), /* @__PURE__ */ jsx(IconChevronDownOutline14, {})] }) : /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(IconChevronUpOutline14, {}), /* @__PURE__ */ jsx(IconChevronUpOutline14, {})] })
|
|
9740
|
-
})
|
|
9741
|
-
})
|
|
9742
|
-
});
|
|
9743
|
-
}
|
|
9744
9737
|
function ClaudeRepositoryStatus({ sessionId, useSessions, useClaudeProjection, t, openDiff, submitPrompt, openOverview, deleteWorkspace }) {
|
|
9745
9738
|
const blank = useSessions((value) => value.byId[sessionId]?.blank === true);
|
|
9746
9739
|
const running = useSessions((value) => value.byId[sessionId]?.running === true);
|
|
9747
9740
|
const projection = useClaudeProjection((value) => value);
|
|
9748
9741
|
const repository = projection.repository;
|
|
9749
9742
|
const { toast, report } = useActionToast();
|
|
9750
|
-
const [expanded, setExpanded] = useState(() => linkedExpanded.get(sessionId) ?? false);
|
|
9751
|
-
useEffect(() => {
|
|
9752
|
-
setExpanded(linkedExpanded.get(sessionId) ?? false);
|
|
9753
|
-
}, [sessionId]);
|
|
9754
|
-
const stackRef = useRef(null);
|
|
9755
|
-
const seat = useHostJumpSeat(stackRef);
|
|
9756
9743
|
if (blank || !projection.owned || repository === void 0) return null;
|
|
9757
9744
|
const branch = branchLabel(repository, t);
|
|
9758
9745
|
const merged = repository.pullRequest?.state === "merged";
|
|
9759
|
-
const
|
|
9760
|
-
|
|
9761
|
-
|
|
9762
|
-
|
|
9763
|
-
|
|
9764
|
-
|
|
9765
|
-
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
seat,
|
|
9769
|
-
t,
|
|
9770
|
-
onToggle: () => {
|
|
9771
|
-
const next = !expanded;
|
|
9772
|
-
setExpanded(next);
|
|
9773
|
-
linkedExpanded.set(sessionId, next);
|
|
9774
|
-
}
|
|
9775
|
-
}) : null, shown.map((item) => /* @__PURE__ */ jsx(LinkedRepositoryBar, {
|
|
9776
|
-
sessionId,
|
|
9777
|
-
repository: item,
|
|
9778
|
-
running,
|
|
9779
|
-
t,
|
|
9780
|
-
openDiff,
|
|
9781
|
-
report,
|
|
9782
|
-
...submitPrompt === void 0 ? {} : { submitPrompt }
|
|
9783
|
-
}, item.root ?? `${item.remote ?? item.cwd}#${item.pullRequest?.number ?? ""}`))]
|
|
9784
|
-
});
|
|
9746
|
+
const linked = (projection.repositories ?? []).map((item) => /* @__PURE__ */ jsx(LinkedRepositoryBar, {
|
|
9747
|
+
sessionId,
|
|
9748
|
+
repository: item,
|
|
9749
|
+
running,
|
|
9750
|
+
t,
|
|
9751
|
+
openDiff,
|
|
9752
|
+
report,
|
|
9753
|
+
...submitPrompt === void 0 ? {} : { submitPrompt }
|
|
9754
|
+
}, item.root ?? `${item.remote ?? item.cwd}#${item.pullRequest?.number ?? ""}`));
|
|
9785
9755
|
if (repository.status !== "ready") return /* @__PURE__ */ jsxs("div", {
|
|
9786
9756
|
style: repositoryBarFrame,
|
|
9787
9757
|
[CLAUDE_COMPOSER_BAR_ATTRIBUTE]: "",
|
|
@@ -9800,9 +9770,9 @@ window.__ModuleLoader__.load({
|
|
|
9800
9770
|
style: repositoryBarFrame,
|
|
9801
9771
|
[CLAUDE_COMPOSER_BAR_ATTRIBUTE]: "",
|
|
9802
9772
|
children: [
|
|
9803
|
-
/* @__PURE__ */
|
|
9773
|
+
/* @__PURE__ */ jsx("style", {
|
|
9804
9774
|
"data-dsh-claude-repository-bar-styles": true,
|
|
9805
|
-
children:
|
|
9775
|
+
children: repositoryAutoFixCss
|
|
9806
9776
|
}),
|
|
9807
9777
|
toast,
|
|
9808
9778
|
linked,
|
|
@@ -15118,6 +15088,7 @@ window.__ModuleLoader__.load({
|
|
|
15118
15088
|
style: diffFile,
|
|
15119
15089
|
children: [/* @__PURE__ */ jsxs("button", {
|
|
15120
15090
|
type: "button",
|
|
15091
|
+
className: diffFileHeaderClass,
|
|
15121
15092
|
style: diffFileHeader,
|
|
15122
15093
|
"aria-expanded": open,
|
|
15123
15094
|
onClick: () => onOpenChange(!open),
|
|
@@ -15420,10 +15391,15 @@ window.__ModuleLoader__.load({
|
|
|
15420
15391
|
loading: true,
|
|
15421
15392
|
submitting: false
|
|
15422
15393
|
});
|
|
15423
|
-
|
|
15424
|
-
|
|
15425
|
-
|
|
15426
|
-
|
|
15394
|
+
if (action === "create-pr") {
|
|
15395
|
+
const [pullRequest, generated] = await Promise.all([generatePullRequestText(sessionId, preview.fingerprint, void 0, controller.signal, root), preview.files.length > 0 ? generateCommitMessage(sessionId, preview.fingerprint, controller.signal, root) : Promise.resolve(void 0)]);
|
|
15396
|
+
setMessage((current) => current.trim() === "" ? generated ?? pullRequest.title : current);
|
|
15397
|
+
setPrTitle((current) => current.trim() === "" ? pullRequest.title : current);
|
|
15398
|
+
setPrBody((current) => current.trim() === "" ? pullRequest.body : current);
|
|
15399
|
+
} else {
|
|
15400
|
+
const generated = await generateCommitMessage(sessionId, preview.fingerprint, controller.signal, root);
|
|
15401
|
+
setMessage((current) => current.trim() === "" ? generated : current);
|
|
15402
|
+
}
|
|
15427
15403
|
setDialog((current) => current === void 0 ? current : {
|
|
15428
15404
|
...current,
|
|
15429
15405
|
loading: false
|
|
@@ -15895,13 +15871,12 @@ window.__ModuleLoader__.load({
|
|
|
15895
15871
|
]
|
|
15896
15872
|
}),
|
|
15897
15873
|
/* @__PURE__ */ jsxs(Modal, {
|
|
15898
|
-
className: "dshClaudeRepositoryActionModal",
|
|
15899
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
15874
|
+
className: "dshClaudeRepositoryActionModal dshClaudeCommitDialog",
|
|
15875
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeCommitContent",
|
|
15900
15876
|
open: dialog !== void 0,
|
|
15901
15877
|
onClose: closeDialog,
|
|
15902
15878
|
title: dialog === void 0 ? t("diffCommit") : actionLabel(dialog.action, t),
|
|
15903
15879
|
closeLabel: t("diffCancel"),
|
|
15904
|
-
description: t("diffConfirmDescription"),
|
|
15905
15880
|
footer: /* @__PURE__ */ jsxs("div", {
|
|
15906
15881
|
style: diffModalFooter,
|
|
15907
15882
|
children: [/* @__PURE__ */ jsx("button", {
|
|
@@ -15921,120 +15896,161 @@ window.__ModuleLoader__.load({
|
|
|
15921
15896
|
},
|
|
15922
15897
|
disabled: dialog?.submitting === true || dialog?.preview === void 0 || dialog.action !== "push" && message.trim() === "",
|
|
15923
15898
|
onClick: () => void confirm(),
|
|
15924
|
-
children: dialog?.submitting === true ? t("diffSubmitting") : t("
|
|
15899
|
+
children: dialog?.submitting === true ? t("diffSubmitting") : dialog === void 0 ? t("diffCommit") : actionLabel(dialog.action, t)
|
|
15925
15900
|
})]
|
|
15926
15901
|
}),
|
|
15927
15902
|
children: [
|
|
15928
15903
|
dialog?.loading === true ? /* @__PURE__ */ jsx("p", {
|
|
15929
|
-
|
|
15930
|
-
|
|
15904
|
+
className: "dshClaudeCommitProgress",
|
|
15905
|
+
role: "status",
|
|
15906
|
+
children: t(dialog.preview === void 0 ? "diffLoadingPreview" : "diffGeneratingMessage")
|
|
15931
15907
|
}) : null,
|
|
15932
15908
|
dialog?.preview !== void 0 ? /* @__PURE__ */ jsxs("div", {
|
|
15933
15909
|
style: diffModalBody,
|
|
15934
|
-
children: [
|
|
15935
|
-
|
|
15936
|
-
|
|
15937
|
-
|
|
15938
|
-
|
|
15939
|
-
|
|
15940
|
-
|
|
15910
|
+
children: [/* @__PURE__ */ jsxs("div", {
|
|
15911
|
+
className: "dshClaudeCommitContext",
|
|
15912
|
+
children: [
|
|
15913
|
+
/* @__PURE__ */ jsx("strong", {
|
|
15914
|
+
title: dialog.preview.root,
|
|
15915
|
+
children: repositoryLabel({
|
|
15916
|
+
root: dialog.preview.root,
|
|
15917
|
+
cwd: dialog.preview.root
|
|
15918
|
+
})
|
|
15919
|
+
}),
|
|
15920
|
+
/* @__PURE__ */ jsx("span", {
|
|
15921
|
+
className: "dshClaudeCommitBranch",
|
|
15922
|
+
children: dialog.preview.branch
|
|
15923
|
+
}),
|
|
15924
|
+
dialog.action === "push" || dialog.action === "commit-push" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
15925
|
+
"aria-hidden": "true",
|
|
15926
|
+
children: "→"
|
|
15941
15927
|
}), /* @__PURE__ */ jsx("span", {
|
|
15942
|
-
|
|
15943
|
-
children: dialog.
|
|
15944
|
-
})]
|
|
15945
|
-
|
|
15946
|
-
|
|
15947
|
-
|
|
15928
|
+
className: "dshClaudeCommitBranch",
|
|
15929
|
+
children: dialog.preview.upstream ?? `origin/${dialog.preview.branch}`
|
|
15930
|
+
})] }) : null
|
|
15931
|
+
]
|
|
15932
|
+
}), dialog.action === "push" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsxs("section", {
|
|
15933
|
+
className: "dshClaudeCommitSection",
|
|
15934
|
+
children: [/* @__PURE__ */ jsx("h3", { children: t("diffPushAhead", { count: dialog.preview.unpushedTruncated ? `${dialog.preview.unpushedCommits.length}+` : dialog.preview.unpushedCommits.length }) }), /* @__PURE__ */ jsx("div", {
|
|
15935
|
+
className: "dshClaudeCommitFiles",
|
|
15948
15936
|
children: dialog.preview.unpushedCommits.map((commit) => /* @__PURE__ */ jsxs("div", {
|
|
15949
|
-
|
|
15950
|
-
children: [/* @__PURE__ */ jsx("
|
|
15951
|
-
|
|
15937
|
+
className: "dshClaudeCommitFile",
|
|
15938
|
+
children: [/* @__PURE__ */ jsx("code", {
|
|
15939
|
+
className: "dshClaudeCommitHash",
|
|
15940
|
+
children: commit.hash.slice(0, 8)
|
|
15941
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
15942
|
+
className: "dshClaudeCommitPath",
|
|
15952
15943
|
title: commit.subject,
|
|
15953
15944
|
children: commit.subject
|
|
15954
|
-
}), /* @__PURE__ */ jsx("span", {
|
|
15955
|
-
style: diffModalFileState,
|
|
15956
|
-
children: commit.hash.slice(0, 8)
|
|
15957
15945
|
})]
|
|
15958
15946
|
}, commit.hash))
|
|
15959
|
-
})
|
|
15960
|
-
|
|
15961
|
-
|
|
15962
|
-
|
|
15963
|
-
|
|
15964
|
-
|
|
15965
|
-
|
|
15966
|
-
|
|
15967
|
-
|
|
15968
|
-
|
|
15969
|
-
|
|
15970
|
-
|
|
15971
|
-
|
|
15972
|
-
|
|
15973
|
-
children:
|
|
15947
|
+
})]
|
|
15948
|
+
}), /* @__PURE__ */ jsx("p", {
|
|
15949
|
+
style: diffModalStatus,
|
|
15950
|
+
children: t("diffPushDescription")
|
|
15951
|
+
})] }) : /* @__PURE__ */ jsxs("div", {
|
|
15952
|
+
className: "dshClaudeCommitGrid",
|
|
15953
|
+
children: [/* @__PURE__ */ jsxs("section", {
|
|
15954
|
+
className: "dshClaudeCommitSection dshClaudeCommitChanges",
|
|
15955
|
+
children: [
|
|
15956
|
+
/* @__PURE__ */ jsx("h3", { children: t("diffFilesShort", { count: dialog.preview.files.length }) }),
|
|
15957
|
+
/* @__PURE__ */ jsx("div", {
|
|
15958
|
+
className: "dshClaudeCommitFiles",
|
|
15959
|
+
children: dialog.preview.files.map((file) => /* @__PURE__ */ jsxs("div", {
|
|
15960
|
+
className: "dshClaudeCommitFile",
|
|
15961
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
15962
|
+
className: "dshClaudeCommitPath",
|
|
15963
|
+
title: file.path,
|
|
15964
|
+
children: file.path
|
|
15965
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
15966
|
+
className: "dshClaudeCommitState",
|
|
15967
|
+
"data-staged": file.staged && !file.unstaged && !file.untracked,
|
|
15968
|
+
children: file.untracked ? t("diffUntracked") : file.staged && file.unstaged ? t("diffStagedUnstaged") : file.staged ? t("diffStaged") : t("diffUnstaged")
|
|
15969
|
+
})]
|
|
15970
|
+
}, file.path))
|
|
15971
|
+
}),
|
|
15972
|
+
/* @__PURE__ */ jsxs("label", {
|
|
15973
|
+
style: diffModalCheckbox,
|
|
15974
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
15975
|
+
type: "checkbox",
|
|
15976
|
+
checked: includeUnstaged,
|
|
15977
|
+
disabled: !dialog.preview.hasUnstaged && !dialog.preview.hasUntracked,
|
|
15978
|
+
onChange: (event) => setIncludeUnstaged(event.currentTarget.checked)
|
|
15979
|
+
}), t("diffIncludeUnstaged")]
|
|
15980
|
+
})
|
|
15981
|
+
]
|
|
15982
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
15983
|
+
className: "dshClaudeCommitEditor",
|
|
15984
|
+
children: [
|
|
15985
|
+
dialog.action === "create-pr" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
15986
|
+
/* @__PURE__ */ jsxs("label", {
|
|
15987
|
+
style: diffModalField,
|
|
15988
|
+
children: [t("diffPrTitle"), /* @__PURE__ */ jsx("input", {
|
|
15989
|
+
style: {
|
|
15990
|
+
...diffModalTextInput,
|
|
15991
|
+
fontWeight: 400
|
|
15992
|
+
},
|
|
15993
|
+
value: prTitle,
|
|
15994
|
+
maxLength: 256,
|
|
15995
|
+
onChange: (event) => setPrTitle(event.currentTarget.value)
|
|
15996
|
+
})]
|
|
15997
|
+
}),
|
|
15998
|
+
/* @__PURE__ */ jsxs("label", {
|
|
15999
|
+
style: diffModalField,
|
|
16000
|
+
children: [t("diffPrBase"), /* @__PURE__ */ jsx("input", {
|
|
16001
|
+
style: {
|
|
16002
|
+
...diffModalTextInput,
|
|
16003
|
+
fontWeight: 400
|
|
16004
|
+
},
|
|
16005
|
+
value: baseBranch,
|
|
16006
|
+
maxLength: 512,
|
|
16007
|
+
placeholder: t("diffPrBaseDefault"),
|
|
16008
|
+
onChange: (event) => setBaseBranch(event.currentTarget.value)
|
|
16009
|
+
})]
|
|
16010
|
+
}),
|
|
16011
|
+
/* @__PURE__ */ jsxs("label", {
|
|
16012
|
+
style: diffModalField,
|
|
16013
|
+
children: [t("diffPrDescription"), /* @__PURE__ */ jsx("textarea", {
|
|
16014
|
+
style: {
|
|
16015
|
+
...diffModalTextarea,
|
|
16016
|
+
fontWeight: 400,
|
|
16017
|
+
minHeight: 180
|
|
16018
|
+
},
|
|
16019
|
+
value: prBody,
|
|
16020
|
+
maxLength: 8192,
|
|
16021
|
+
onChange: (event) => setPrBody(event.currentTarget.value)
|
|
16022
|
+
})]
|
|
16023
|
+
}),
|
|
16024
|
+
/* @__PURE__ */ jsxs("label", {
|
|
16025
|
+
style: diffModalCheckbox,
|
|
16026
|
+
children: [/* @__PURE__ */ jsx("input", {
|
|
16027
|
+
type: "checkbox",
|
|
16028
|
+
checked: draft,
|
|
16029
|
+
onChange: (event) => setDraft(event.currentTarget.checked)
|
|
16030
|
+
}), t("diffPrDraft")]
|
|
16031
|
+
})
|
|
16032
|
+
] }) : null,
|
|
16033
|
+
/* @__PURE__ */ jsxs("label", {
|
|
16034
|
+
style: diffModalField,
|
|
16035
|
+
children: [t("diffCommitMessage"), /* @__PURE__ */ jsx("textarea", {
|
|
16036
|
+
style: {
|
|
16037
|
+
...diffModalTextarea,
|
|
16038
|
+
fontWeight: 400,
|
|
16039
|
+
minHeight: dialog.action === "create-pr" ? 100 : 220
|
|
16040
|
+
},
|
|
16041
|
+
value: message,
|
|
16042
|
+
maxLength: 2048,
|
|
16043
|
+
placeholder: t("diffCommitMessagePlaceholder"),
|
|
16044
|
+
onChange: (event) => setMessage(event.currentTarget.value)
|
|
15974
16045
|
})]
|
|
15975
|
-
},
|
|
15976
|
-
|
|
15977
|
-
|
|
15978
|
-
|
|
15979
|
-
|
|
15980
|
-
|
|
15981
|
-
|
|
15982
|
-
|
|
15983
|
-
onChange: (event) => setIncludeUnstaged(event.currentTarget.checked)
|
|
15984
|
-
}), t("diffIncludeUnstaged")]
|
|
15985
|
-
}),
|
|
15986
|
-
/* @__PURE__ */ jsxs("label", {
|
|
15987
|
-
style: diffModalField,
|
|
15988
|
-
children: [t("diffCommitMessage"), /* @__PURE__ */ jsx("textarea", {
|
|
15989
|
-
style: diffModalTextarea,
|
|
15990
|
-
value: message,
|
|
15991
|
-
maxLength: 512,
|
|
15992
|
-
onChange: (event) => setMessage(event.currentTarget.value)
|
|
15993
|
-
})]
|
|
15994
|
-
})
|
|
15995
|
-
] }),
|
|
15996
|
-
dialog.action === "create-pr" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
15997
|
-
/* @__PURE__ */ jsxs("label", {
|
|
15998
|
-
style: diffModalField,
|
|
15999
|
-
children: [t("diffPrTitle"), /* @__PURE__ */ jsx("input", {
|
|
16000
|
-
style: diffModalTextInput,
|
|
16001
|
-
value: prTitle,
|
|
16002
|
-
maxLength: 256,
|
|
16003
|
-
onChange: (event) => setPrTitle(event.currentTarget.value)
|
|
16004
|
-
})]
|
|
16005
|
-
}),
|
|
16006
|
-
/* @__PURE__ */ jsxs("label", {
|
|
16007
|
-
style: diffModalField,
|
|
16008
|
-
children: [t("diffPrBase"), /* @__PURE__ */ jsx("input", {
|
|
16009
|
-
style: diffModalTextInput,
|
|
16010
|
-
value: baseBranch,
|
|
16011
|
-
maxLength: 512,
|
|
16012
|
-
placeholder: t("diffPrBaseDefault"),
|
|
16013
|
-
onChange: (event) => setBaseBranch(event.currentTarget.value)
|
|
16014
|
-
})]
|
|
16015
|
-
}),
|
|
16016
|
-
/* @__PURE__ */ jsxs("label", {
|
|
16017
|
-
style: diffModalField,
|
|
16018
|
-
children: [t("diffPrDescription"), /* @__PURE__ */ jsx("textarea", {
|
|
16019
|
-
style: {
|
|
16020
|
-
...diffModalTextarea,
|
|
16021
|
-
minHeight: 240
|
|
16022
|
-
},
|
|
16023
|
-
value: prBody,
|
|
16024
|
-
maxLength: 8192,
|
|
16025
|
-
onChange: (event) => setPrBody(event.currentTarget.value)
|
|
16026
|
-
})]
|
|
16027
|
-
}),
|
|
16028
|
-
/* @__PURE__ */ jsxs("label", {
|
|
16029
|
-
style: diffModalCheckbox,
|
|
16030
|
-
children: [/* @__PURE__ */ jsx("input", {
|
|
16031
|
-
type: "checkbox",
|
|
16032
|
-
checked: draft,
|
|
16033
|
-
onChange: (event) => setDraft(event.currentTarget.checked)
|
|
16034
|
-
}), t("diffPrDraft")]
|
|
16035
|
-
})
|
|
16036
|
-
] }) : null
|
|
16037
|
-
]
|
|
16046
|
+
}),
|
|
16047
|
+
/* @__PURE__ */ jsx("p", {
|
|
16048
|
+
className: "dshClaudeCommitHint",
|
|
16049
|
+
children: t("diffCommitMessageHint")
|
|
16050
|
+
})
|
|
16051
|
+
]
|
|
16052
|
+
})]
|
|
16053
|
+
})]
|
|
16038
16054
|
}) : null,
|
|
16039
16055
|
dialog?.error !== void 0 ? /* @__PURE__ */ jsxs("p", {
|
|
16040
16056
|
role: "alert",
|
|
@@ -16709,6 +16725,10 @@ window.__ModuleLoader__.load({
|
|
|
16709
16725
|
"data-dsh-claude-ask-styles": true,
|
|
16710
16726
|
children: [panelIconButtonCss, askHighlightCss]
|
|
16711
16727
|
}),
|
|
16728
|
+
/* @__PURE__ */ jsx("strong", {
|
|
16729
|
+
style: promptSaveHeading,
|
|
16730
|
+
children: t("askTooltip")
|
|
16731
|
+
}),
|
|
16712
16732
|
/* @__PURE__ */ jsx("p", {
|
|
16713
16733
|
style: askQuote,
|
|
16714
16734
|
children: selection.text
|
|
@@ -17175,8 +17195,8 @@ window.__ModuleLoader__.load({
|
|
|
17175
17195
|
children: diffModalCss
|
|
17176
17196
|
}),
|
|
17177
17197
|
/* @__PURE__ */ jsx(Modal, {
|
|
17178
|
-
className: "dshClaudeRepositoryActionModal",
|
|
17179
|
-
contentClassName: "dshClaudeRepositoryActionModalContent",
|
|
17198
|
+
className: "dshClaudeRepositoryActionModal dshClaudeUtilityDialog",
|
|
17199
|
+
contentClassName: "dshClaudeRepositoryActionModalContent dshClaudeUtilityContent",
|
|
17180
17200
|
open: target !== void 0,
|
|
17181
17201
|
onClose: close,
|
|
17182
17202
|
title: t("rewindTitle"),
|
|
@@ -17212,6 +17232,7 @@ window.__ModuleLoader__.load({
|
|
|
17212
17232
|
children: target.text.slice(0, 2e3)
|
|
17213
17233
|
}),
|
|
17214
17234
|
/* @__PURE__ */ jsxs("label", {
|
|
17235
|
+
className: "dshClaudeUtilityOption",
|
|
17215
17236
|
style: diffModalCheckbox,
|
|
17216
17237
|
children: [/* @__PURE__ */ jsx("input", {
|
|
17217
17238
|
type: "checkbox",
|
|
@@ -18724,7 +18745,10 @@ window.__ModuleLoader__.load({
|
|
|
18724
18745
|
role: "dialog",
|
|
18725
18746
|
"aria-label": label,
|
|
18726
18747
|
children: panel.kind === "saved" ? /* @__PURE__ */ jsxs(Fragment$1, { children: [
|
|
18727
|
-
/* @__PURE__ */ jsx("span", {
|
|
18748
|
+
/* @__PURE__ */ jsx("span", {
|
|
18749
|
+
style: promptSaveHeading,
|
|
18750
|
+
children: t("promptSaved", { name: panel.prompt.name })
|
|
18751
|
+
}),
|
|
18728
18752
|
/* @__PURE__ */ jsx("span", {
|
|
18729
18753
|
style: promptSaveLocation,
|
|
18730
18754
|
children: panel.prompt.location
|
|
@@ -18747,8 +18771,13 @@ window.__ModuleLoader__.load({
|
|
|
18747
18771
|
children: [
|
|
18748
18772
|
/* @__PURE__ */ jsx("span", {
|
|
18749
18773
|
style: promptSaveHeading,
|
|
18750
|
-
children:
|
|
18774
|
+
children: label
|
|
18751
18775
|
}),
|
|
18776
|
+
panel.suggesting ? /* @__PURE__ */ jsx("span", {
|
|
18777
|
+
role: "status",
|
|
18778
|
+
style: repositoryChecksHint,
|
|
18779
|
+
children: t("promptSaveNaming")
|
|
18780
|
+
}) : null,
|
|
18752
18781
|
/* @__PURE__ */ jsx("input", {
|
|
18753
18782
|
className: promptSaveFieldClass,
|
|
18754
18783
|
"aria-label": t("promptSaveName"),
|
|
@@ -19203,9 +19232,6 @@ window.__ModuleLoader__.load({
|
|
|
19203
19232
|
presetHeaderHint: "当前会话运行的 Agent 预设",
|
|
19204
19233
|
diffRepository: "仓库",
|
|
19205
19234
|
repositoryLinked: "关联仓库:本会话改动过",
|
|
19206
|
-
linkedMore: "还有 {count} 个关联仓库",
|
|
19207
|
-
linkedShowAll: "全部展开",
|
|
19208
|
-
linkedCollapse: "收起关联仓库",
|
|
19209
19235
|
linkedRepositoryPrompt: "以下内容针对关联仓库 {root}(分支 {branch}),不是本会话自己的仓库。",
|
|
19210
19236
|
diffFiles: "{count} 个已修改文件",
|
|
19211
19237
|
diffFilesShort: "{count} 个文件",
|
|
@@ -19231,6 +19257,9 @@ window.__ModuleLoader__.load({
|
|
|
19231
19257
|
diffPushAhead: "{count} 个未推送的 commit",
|
|
19232
19258
|
diffPushCompleted: "已推送 commit {commit}",
|
|
19233
19259
|
diffGeneratingMessage: "正在生成建议的 commit message,只会填进你没写的字段。",
|
|
19260
|
+
diffLoadingPreview: "正在读取仓库变更…",
|
|
19261
|
+
diffCommitMessagePlaceholder: "简要描述这次修改…",
|
|
19262
|
+
diffCommitMessageHint: "首行写修改摘要,空一行后可补充详细说明。",
|
|
19234
19263
|
diffActionFailed: "仓库操作失败。",
|
|
19235
19264
|
diffIncludeUnstaged: "包含 unstaged 和 untracked 改动",
|
|
19236
19265
|
diffCommitMessage: "Commit message",
|
|
@@ -19647,9 +19676,6 @@ window.__ModuleLoader__.load({
|
|
|
19647
19676
|
presetHeaderHint: "The agent preset this session runs",
|
|
19648
19677
|
diffRepository: "Repository",
|
|
19649
19678
|
repositoryLinked: "Linked repository: changed by this session",
|
|
19650
|
-
linkedMore: "{count} more linked repositories",
|
|
19651
|
-
linkedShowAll: "Show all",
|
|
19652
|
-
linkedCollapse: "Collapse linked repositories",
|
|
19653
19679
|
linkedRepositoryPrompt: "The following concerns the linked repository at {root} (branch {branch}), not this session's own checkout.",
|
|
19654
19680
|
diffFiles: "{count} modified file(s)",
|
|
19655
19681
|
diffFilesShort: "{count} files",
|
|
@@ -19675,6 +19701,9 @@ window.__ModuleLoader__.load({
|
|
|
19675
19701
|
diffPushAhead: "{count} unpushed commit(s)",
|
|
19676
19702
|
diffPushCompleted: "Pushed commit {commit}",
|
|
19677
19703
|
diffGeneratingMessage: "Suggesting a commit message. It only fills the fields you leave empty.",
|
|
19704
|
+
diffLoadingPreview: "Loading repository changes…",
|
|
19705
|
+
diffCommitMessagePlaceholder: "Describe what changed…",
|
|
19706
|
+
diffCommitMessageHint: "Start with a short summary. Add details after a blank line.",
|
|
19678
19707
|
diffActionFailed: "Repository action failed.",
|
|
19679
19708
|
diffIncludeUnstaged: "Include unstaged and untracked changes",
|
|
19680
19709
|
diffCommitMessage: "Commit message",
|