@laoyuehanni/dsh-git-worktree 0.4.15 → 0.4.16
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/README.md +2 -1
- package/README.zh.md +2 -1
- package/docs/DETAIL.md +1 -0
- package/docs/DETAIL.zh.md +1 -0
- package/lib/client.js +2032 -509
- package/lib/deferred-worktree.d.ts +2 -1
- package/lib/deferred-worktree.js +2 -1
- package/lib/git.d.ts +76 -0
- package/lib/git.js +303 -0
- package/lib/index.js +45 -3
- package/lib/pr.d.ts +177 -0
- package/lib/pr.js +672 -0
- package/lib/routes.d.ts +30 -3
- package/lib/routes.js +392 -4
- package/lib/wire.d.ts +136 -0
- package/lib/wire.js +6 -0
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -117,6 +117,12 @@ window.__ModuleLoader__.load((() => {
|
|
|
117
117
|
const ROUTE_DEFERRED_ARM = `${ROUTE_PREFIX}/deferred/arm`;
|
|
118
118
|
/** POST ROUTE_PREFIX/deferred/action — cancel, retry, or withdraw a deferred worktree. */
|
|
119
119
|
const ROUTE_DEFERRED_ACTION = `${ROUTE_PREFIX}/deferred/action`;
|
|
120
|
+
/** POST ROUTE_PREFIX/pr-context — remotes, optional forge readiness, and open PR/MR candidates. */
|
|
121
|
+
const ROUTE_PR_CONTEXT = `${ROUTE_PREFIX}/pr-context`;
|
|
122
|
+
/** POST ROUTE_PREFIX/pr-resolve — resolve a PR/MR ID or URL to its fetch ref, branch, and path. */
|
|
123
|
+
const ROUTE_PR_RESOLVE = `${ROUTE_PREFIX}/pr-resolve`;
|
|
124
|
+
/** POST ROUTE_PREFIX/pr-checkout — stream PR/MR fetch + isolated worktree creation. */
|
|
125
|
+
const ROUTE_PR_CHECKOUT = `${ROUTE_PREFIX}/pr-checkout`;
|
|
120
126
|
//#endregion
|
|
121
127
|
//#region src/client/api.ts
|
|
122
128
|
/** Read-only history requests can be cancelled when the user browses another branch. */
|
|
@@ -172,10 +178,15 @@ window.__ModuleLoader__.load((() => {
|
|
|
172
178
|
error: `HTTP ${String(response.status)}`
|
|
173
179
|
};
|
|
174
180
|
}
|
|
175
|
-
if (!response.ok)
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
181
|
+
if (!response.ok) {
|
|
182
|
+
const error = payload;
|
|
183
|
+
return {
|
|
184
|
+
ok: false,
|
|
185
|
+
error: error.error ?? `HTTP ${String(response.status)}`,
|
|
186
|
+
...error.code === void 0 ? {} : { code: error.code },
|
|
187
|
+
...error.params === void 0 ? {} : { params: error.params }
|
|
188
|
+
};
|
|
189
|
+
}
|
|
179
190
|
return {
|
|
180
191
|
...payload,
|
|
181
192
|
ok: true
|
|
@@ -231,10 +242,15 @@ window.__ModuleLoader__.load((() => {
|
|
|
231
242
|
ok: false,
|
|
232
243
|
error: STREAM_CUT
|
|
233
244
|
};
|
|
234
|
-
if (done.status < 200 || done.status >= 300)
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
245
|
+
if (done.status < 200 || done.status >= 300) {
|
|
246
|
+
const error = done.body;
|
|
247
|
+
return {
|
|
248
|
+
ok: false,
|
|
249
|
+
error: error?.error ?? `HTTP ${String(done.status)}`,
|
|
250
|
+
...error?.code === void 0 ? {} : { code: error.code },
|
|
251
|
+
...error?.params === void 0 ? {} : { params: error.params }
|
|
252
|
+
};
|
|
253
|
+
}
|
|
238
254
|
return {
|
|
239
255
|
...done.body,
|
|
240
256
|
ok: true
|
|
@@ -514,6 +530,61 @@ window.__ModuleLoader__.load((() => {
|
|
|
514
530
|
function requestPurgeDirectory(path) {
|
|
515
531
|
return post(ROUTE_PURGE, { path });
|
|
516
532
|
}
|
|
533
|
+
/**
|
|
534
|
+
* Probe remotes, optional host `ctx.forge` readiness, and open PR/MR candidates for a repository.
|
|
535
|
+
* @param repoPath - absolute directory inside the repository.
|
|
536
|
+
* @param signalOrOptions - optional cancellation signal or `{ remote, signal }`.
|
|
537
|
+
*/
|
|
538
|
+
async function requestPrContext(repoPath, signalOrOptions) {
|
|
539
|
+
const signal = signalOrOptions instanceof AbortSignal ? signalOrOptions : signalOrOptions?.signal;
|
|
540
|
+
const remote = signalOrOptions instanceof AbortSignal ? void 0 : signalOrOptions?.remote;
|
|
541
|
+
try {
|
|
542
|
+
return await readEnvelope(await fetch(ROUTE_PR_CONTEXT, {
|
|
543
|
+
method: "POST",
|
|
544
|
+
headers: { "content-type": "application/json" },
|
|
545
|
+
body: JSON.stringify({
|
|
546
|
+
repoPath,
|
|
547
|
+
...remote === void 0 || remote === "" ? {} : { remote }
|
|
548
|
+
}),
|
|
549
|
+
cache: "no-store",
|
|
550
|
+
...signal === void 0 ? {} : { signal }
|
|
551
|
+
}));
|
|
552
|
+
} catch (cause) {
|
|
553
|
+
return {
|
|
554
|
+
ok: false,
|
|
555
|
+
error: cause instanceof Error ? cause.message : String(cause)
|
|
556
|
+
};
|
|
557
|
+
}
|
|
558
|
+
}
|
|
559
|
+
/**
|
|
560
|
+
* Resolve and validate a PR/MR ID or URL against repository remotes.
|
|
561
|
+
* @param body - repoPath, input, and optional remote/provider overrides.
|
|
562
|
+
* @param signal - optional cancellation signal.
|
|
563
|
+
*/
|
|
564
|
+
async function requestPrResolve(body, signal) {
|
|
565
|
+
try {
|
|
566
|
+
return await readEnvelope(await fetch(ROUTE_PR_RESOLVE, {
|
|
567
|
+
method: "POST",
|
|
568
|
+
headers: { "content-type": "application/json" },
|
|
569
|
+
body: JSON.stringify(body),
|
|
570
|
+
cache: "no-store",
|
|
571
|
+
...signal === void 0 ? {} : { signal }
|
|
572
|
+
}));
|
|
573
|
+
} catch (cause) {
|
|
574
|
+
return {
|
|
575
|
+
ok: false,
|
|
576
|
+
error: cause instanceof Error ? cause.message : String(cause)
|
|
577
|
+
};
|
|
578
|
+
}
|
|
579
|
+
}
|
|
580
|
+
/**
|
|
581
|
+
* Stream PR/MR fetch + isolated worktree creation (or safe reuse/update).
|
|
582
|
+
* @param body - checkout request payload.
|
|
583
|
+
* @param live - progress listener and cancellation signal.
|
|
584
|
+
*/
|
|
585
|
+
function requestPrCheckout(body, live) {
|
|
586
|
+
return postStream(ROUTE_PR_CHECKOUT, body, live);
|
|
587
|
+
}
|
|
517
588
|
//#endregion
|
|
518
589
|
//#region src/client/worktree-remove-flow.ts
|
|
519
590
|
/**
|
|
@@ -938,7 +1009,6 @@ window.__ModuleLoader__.load((() => {
|
|
|
938
1009
|
"chevron": "chevron_517543419",
|
|
939
1010
|
"targetWrap": "targetWrap_517543419",
|
|
940
1011
|
"targetName": "targetName_517543419",
|
|
941
|
-
"badge": "badge_517543419",
|
|
942
1012
|
"editor": "editor_517543419",
|
|
943
1013
|
"editorEnd": "editorEnd_517543419",
|
|
944
1014
|
"editorHead": "editorHead_517543419",
|
|
@@ -1350,8 +1420,8 @@ window.__ModuleLoader__.load((() => {
|
|
|
1350
1420
|
})
|
|
1351
1421
|
]
|
|
1352
1422
|
}),
|
|
1353
|
-
preview?.targetOid === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
1354
|
-
|
|
1423
|
+
preview?.targetOid === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
1424
|
+
tone: "neutral",
|
|
1355
1425
|
children: t("pushNew")
|
|
1356
1426
|
})
|
|
1357
1427
|
]
|
|
@@ -1505,6 +1575,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
1505
1575
|
title: t("pushForceHint"),
|
|
1506
1576
|
children: t("pushForce")
|
|
1507
1577
|
}),
|
|
1578
|
+
danger: true,
|
|
1508
1579
|
disabled: !canPush
|
|
1509
1580
|
}],
|
|
1510
1581
|
onSelect: () => {
|
|
@@ -1827,6 +1898,1010 @@ window.__ModuleLoader__.load((() => {
|
|
|
1827
1898
|
}
|
|
1828
1899
|
return "ignored";
|
|
1829
1900
|
}
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region src/client/pr-error.ts
|
|
1903
|
+
const KNOWN_PR_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
1904
|
+
"no_remotes",
|
|
1905
|
+
"empty_input",
|
|
1906
|
+
"invalid_input",
|
|
1907
|
+
"unsupported_provider",
|
|
1908
|
+
"url_repo_mismatch",
|
|
1909
|
+
"remote_not_found",
|
|
1910
|
+
"provider_undetected",
|
|
1911
|
+
"occupied_by_main",
|
|
1912
|
+
"worktree_dirty",
|
|
1913
|
+
"worktree_diverged",
|
|
1914
|
+
"pr_ref_not_found",
|
|
1915
|
+
"pr_auth_failed",
|
|
1916
|
+
"pr_timeout",
|
|
1917
|
+
"pr_network_failed"
|
|
1918
|
+
]);
|
|
1919
|
+
function isPrErrorCode(code) {
|
|
1920
|
+
return code !== void 0 && KNOWN_PR_ERROR_CODES.has(code);
|
|
1921
|
+
}
|
|
1922
|
+
function translateKnownPrError(code, params, t) {
|
|
1923
|
+
switch (code) {
|
|
1924
|
+
case "no_remotes": return t("prModal.errNoRemotes");
|
|
1925
|
+
case "empty_input": return t("prModal.errEmptyInput");
|
|
1926
|
+
case "invalid_input": return t("prModal.errInvalidInput");
|
|
1927
|
+
case "unsupported_provider": return t("prModal.errUnsupportedProvider", { provider: String(params?.provider ?? "") });
|
|
1928
|
+
case "url_repo_mismatch": return t("prModal.errUrlRepoMismatch", {
|
|
1929
|
+
owner: String(params?.owner ?? ""),
|
|
1930
|
+
repo: String(params?.repo ?? ""),
|
|
1931
|
+
host: String(params?.host ?? "")
|
|
1932
|
+
});
|
|
1933
|
+
case "remote_not_found": return t("prModal.errRemoteNotFound", { remote: String(params?.remote ?? "") });
|
|
1934
|
+
case "provider_undetected": return t("prModal.errProviderUndetected", { remote: String(params?.remote ?? "") });
|
|
1935
|
+
case "occupied_by_main": return t("prModal.occupiedByMain", { branch: String(params?.branch ?? "") });
|
|
1936
|
+
case "worktree_dirty": return t("prModal.errWorktreeDirty");
|
|
1937
|
+
case "worktree_diverged": return t("prModal.divergedTitle", { branch: String(params?.branch ?? "") });
|
|
1938
|
+
case "pr_ref_not_found": return t("prModal.errPrRefNotFound", {
|
|
1939
|
+
ref: String(params?.ref ?? ""),
|
|
1940
|
+
remote: String(params?.remote ?? "")
|
|
1941
|
+
});
|
|
1942
|
+
case "pr_auth_failed": return t("prModal.errPrAuthFailed", { remote: String(params?.remote ?? "") });
|
|
1943
|
+
case "pr_timeout": return t("prModal.errPrTimeout", { remote: String(params?.remote ?? "") });
|
|
1944
|
+
case "pr_network_failed": return t("prModal.errPrNetworkFailed", { remote: String(params?.remote ?? "") });
|
|
1945
|
+
}
|
|
1946
|
+
return code;
|
|
1947
|
+
}
|
|
1948
|
+
/** Translate a structured PR/MR route failure into localized copy, falling back to the raw error message. */
|
|
1949
|
+
function formatPrError(error, code, params, t) {
|
|
1950
|
+
if (!isPrErrorCode(code)) return error;
|
|
1951
|
+
return translateKnownPrError(code, params, t);
|
|
1952
|
+
}
|
|
1953
|
+
//#endregion
|
|
1954
|
+
//#region src/client/toast-bus.ts
|
|
1955
|
+
let nextSeq = 0;
|
|
1956
|
+
let queue = [];
|
|
1957
|
+
let mountedHosts = 0;
|
|
1958
|
+
const listeners$2 = /* @__PURE__ */ new Set();
|
|
1959
|
+
function notify$1() {
|
|
1960
|
+
for (const listener of listeners$2) listener();
|
|
1961
|
+
}
|
|
1962
|
+
/**
|
|
1963
|
+
* Push a toast message onto the global sequential queue.
|
|
1964
|
+
* @param text - localized message to display.
|
|
1965
|
+
* @param tone - optional `'success'` tone for affirmative confirmations.
|
|
1966
|
+
*/
|
|
1967
|
+
function emitToast(text, tone) {
|
|
1968
|
+
nextSeq += 1;
|
|
1969
|
+
const entry = tone === void 0 ? {
|
|
1970
|
+
seq: nextSeq,
|
|
1971
|
+
text
|
|
1972
|
+
} : {
|
|
1973
|
+
seq: nextSeq,
|
|
1974
|
+
text,
|
|
1975
|
+
tone
|
|
1976
|
+
};
|
|
1977
|
+
queue = [...queue, entry];
|
|
1978
|
+
notify$1();
|
|
1979
|
+
}
|
|
1980
|
+
/** Dismiss the currently visible head toast (if its seq still matches). */
|
|
1981
|
+
function shiftToast(seq) {
|
|
1982
|
+
if (queue[0]?.seq !== seq) return;
|
|
1983
|
+
queue = queue.slice(1);
|
|
1984
|
+
notify$1();
|
|
1985
|
+
}
|
|
1986
|
+
/** Current head toast waiting to be rendered, or undefined when empty. */
|
|
1987
|
+
function peekToast() {
|
|
1988
|
+
return queue[0];
|
|
1989
|
+
}
|
|
1990
|
+
/** Subscribe to queue changes. */
|
|
1991
|
+
function subscribeToasts(listener) {
|
|
1992
|
+
listeners$2.add(listener);
|
|
1993
|
+
return () => {
|
|
1994
|
+
listeners$2.delete(listener);
|
|
1995
|
+
};
|
|
1996
|
+
}
|
|
1997
|
+
/** Register one mounted `shell.overlay` host and return its unregister disposer. */
|
|
1998
|
+
function registerToastHost() {
|
|
1999
|
+
mountedHosts += 1;
|
|
2000
|
+
return () => {
|
|
2001
|
+
mountedHosts = Math.max(0, mountedHosts - 1);
|
|
2002
|
+
};
|
|
2003
|
+
}
|
|
2004
|
+
/** Whether a `shell.overlay` host is currently mounted to drain the queue. */
|
|
2005
|
+
function hasGlobalToastHost() {
|
|
2006
|
+
return mountedHosts > 0;
|
|
2007
|
+
}
|
|
2008
|
+
//#endregion
|
|
2009
|
+
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/CheckoutPrModal.module.css?inline
|
|
2010
|
+
var CheckoutPrModal_module_default = {
|
|
2011
|
+
"dialog": "dialog_174350820",
|
|
2012
|
+
"body": "body_174350820",
|
|
2013
|
+
"subtitle": "subtitle_174350820",
|
|
2014
|
+
"banner": "banner_174350820",
|
|
2015
|
+
"controlsRow": "controlsRow_174350820",
|
|
2016
|
+
"input": "input_174350820",
|
|
2017
|
+
"select": "select_174350820",
|
|
2018
|
+
"filterRow": "filterRow_174350820",
|
|
2019
|
+
"filterTabs": "filterTabs_174350820",
|
|
2020
|
+
"refreshTab": "refreshTab_174350820",
|
|
2021
|
+
"filterTab": "filterTab_174350820",
|
|
2022
|
+
"filterTabActive": "filterTabActive_174350820",
|
|
2023
|
+
"candidateList": "candidateList_174350820",
|
|
2024
|
+
"emptyList": "emptyList_174350820",
|
|
2025
|
+
"candidateRow": "candidateRow_174350820",
|
|
2026
|
+
"candidateRowSelected": "candidateRowSelected_174350820",
|
|
2027
|
+
"candidateTop": "candidateTop_174350820",
|
|
2028
|
+
"candidateNum": "candidateNum_174350820",
|
|
2029
|
+
"candidateTitle": "candidateTitle_174350820",
|
|
2030
|
+
"candidateMeta": "candidateMeta_174350820",
|
|
2031
|
+
"previewCard": "previewCard_174350820",
|
|
2032
|
+
"previewHeader": "previewHeader_174350820",
|
|
2033
|
+
"previewTitle": "previewTitle_174350820",
|
|
2034
|
+
"previewLine": "previewLine_174350820",
|
|
2035
|
+
"previewDl": "previewDl_174350820",
|
|
2036
|
+
"ciBadge": "ciBadge_174350820",
|
|
2037
|
+
"dotSafe": "dotSafe_174350820",
|
|
2038
|
+
"dotPending": "dotPending_174350820",
|
|
2039
|
+
"dotWarn": "dotWarn_174350820",
|
|
2040
|
+
"dotNeutral": "dotNeutral_174350820",
|
|
2041
|
+
"existingOptions": "existingOptions_174350820",
|
|
2042
|
+
"radioLabel": "radioLabel_174350820",
|
|
2043
|
+
"radioCard": "radioCard_174350820",
|
|
2044
|
+
"radioCardSelected": "radioCardSelected_174350820",
|
|
2045
|
+
"infoNote": "infoNote_174350820",
|
|
2046
|
+
"progressCard": "progressCard_174350820",
|
|
2047
|
+
"progressTrack": "progressTrack_174350820",
|
|
2048
|
+
"progressFill": "progressFill_174350820",
|
|
2049
|
+
"progressLog": "progressLog_174350820",
|
|
2050
|
+
"footerWrap": "footerWrap_174350820",
|
|
2051
|
+
"footerButtons": "footerButtons_174350820",
|
|
2052
|
+
"status": "status_174350820",
|
|
2053
|
+
"error": "error_174350820",
|
|
2054
|
+
"divergedCard": "divergedCard_174350820",
|
|
2055
|
+
"divergedHead": "divergedHead_174350820",
|
|
2056
|
+
"divergedTitle": "divergedTitle_174350820",
|
|
2057
|
+
"divergedDesc": "divergedDesc_174350820",
|
|
2058
|
+
"divergedActions": "divergedActions_174350820",
|
|
2059
|
+
"dangerButton": "dangerButton_174350820"
|
|
2060
|
+
};
|
|
2061
|
+
//#endregion
|
|
2062
|
+
//#region src/client/CheckoutPrModal.tsx
|
|
2063
|
+
/**
|
|
2064
|
+
* CheckoutPrModal: checkout a GitHub PR or GitLab MR into an isolated Git worktree.
|
|
2065
|
+
* Supports optional `ctx.forge` candidate lists & metadata preview with automatic
|
|
2066
|
+
* fallback to zero-dependency native `git fetch refs/pull|merge-requests`.
|
|
2067
|
+
*/
|
|
2068
|
+
/** Reusable PR/MR vector glyph shared across BranchMenu toolbar and Forge slot entries. */
|
|
2069
|
+
function PrCheckoutGlyph({ size = 16 }) {
|
|
2070
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("svg", {
|
|
2071
|
+
width: size,
|
|
2072
|
+
height: size,
|
|
2073
|
+
viewBox: "0 0 16 16",
|
|
2074
|
+
fill: "none",
|
|
2075
|
+
stroke: "currentColor",
|
|
2076
|
+
strokeWidth: "1.45",
|
|
2077
|
+
"aria-hidden": "true",
|
|
2078
|
+
children: [
|
|
2079
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
2080
|
+
cx: "4",
|
|
2081
|
+
cy: "3.5",
|
|
2082
|
+
r: "1.5"
|
|
2083
|
+
}),
|
|
2084
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
2085
|
+
cx: "4",
|
|
2086
|
+
cy: "12.5",
|
|
2087
|
+
r: "1.5"
|
|
2088
|
+
}),
|
|
2089
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("circle", {
|
|
2090
|
+
cx: "12",
|
|
2091
|
+
cy: "12.5",
|
|
2092
|
+
r: "1.5"
|
|
2093
|
+
}),
|
|
2094
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2095
|
+
d: "M4 5v6",
|
|
2096
|
+
strokeLinecap: "round"
|
|
2097
|
+
}),
|
|
2098
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2099
|
+
d: "M12 11V6.5a2 2 0 0 0-2-2H8",
|
|
2100
|
+
strokeLinecap: "round"
|
|
2101
|
+
}),
|
|
2102
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", {
|
|
2103
|
+
d: "M9.6 3.1L8 4.5l1.6 1.4",
|
|
2104
|
+
strokeLinecap: "round",
|
|
2105
|
+
strokeLinejoin: "round"
|
|
2106
|
+
})
|
|
2107
|
+
]
|
|
2108
|
+
});
|
|
2109
|
+
}
|
|
2110
|
+
/** Pure filter helper exported for unit testing. */
|
|
2111
|
+
function filterPrCandidates(candidates, filter, query) {
|
|
2112
|
+
const trimmed = query.trim().toLowerCase();
|
|
2113
|
+
if (trimmed === "") return filter === "all" ? [...candidates] : candidates.filter((item) => item.filter === filter);
|
|
2114
|
+
const needle = trimmed.replace(/^[#!]/, "");
|
|
2115
|
+
return candidates.filter((item) => String(item.number).includes(needle) || item.title.toLowerCase().includes(trimmed) || (item.author?.toLowerCase().includes(trimmed) ?? false) || item.url.toLowerCase().includes(trimmed));
|
|
2116
|
+
}
|
|
2117
|
+
/** True when user input looks like an explicit PR/MR number or URL rather than a candidate list search keyword. */
|
|
2118
|
+
function looksLikePrTarget(input) {
|
|
2119
|
+
const trimmed = input.trim();
|
|
2120
|
+
if (trimmed === "") return false;
|
|
2121
|
+
return /^[#!]?\d+$/.test(trimmed) || /^https?:\/\//i.test(trimmed);
|
|
2122
|
+
}
|
|
2123
|
+
function ciText(checksRollup, t) {
|
|
2124
|
+
if (checksRollup === "success") return t("prModal.ciSuccess");
|
|
2125
|
+
if (checksRollup === "pending") return t("prModal.ciPending");
|
|
2126
|
+
if (checksRollup === "failure") return t("prModal.ciFailure");
|
|
2127
|
+
return null;
|
|
2128
|
+
}
|
|
2129
|
+
function ciDotClass(checksRollup) {
|
|
2130
|
+
if (checksRollup === "success") return CheckoutPrModal_module_default.dotSafe ?? "";
|
|
2131
|
+
if (checksRollup === "pending") return CheckoutPrModal_module_default.dotPending ?? "";
|
|
2132
|
+
if (checksRollup === "failure") return CheckoutPrModal_module_default.dotWarn ?? "";
|
|
2133
|
+
return CheckoutPrModal_module_default.dotNeutral ?? "";
|
|
2134
|
+
}
|
|
2135
|
+
/** Modal for resolving and checking out a PR/MR into a dedicated worktree. */
|
|
2136
|
+
function CheckoutPrModal({ repoPath, repoName, initialInput, reuseBlankSessionId, initialIfExists, forgeTrackAvailable, adoptWorktree, isSwitchSessionDirectory, armDeferredWorktree, currentSessionPath, hasStandaloneWorkspace, trackCurrentSessionPr, pruneWorktrees, onCreated, onClose, t }) {
|
|
2137
|
+
const [context, setContext] = (0, react.useState)(null);
|
|
2138
|
+
const [loadError, setLoadError] = (0, react.useState)(null);
|
|
2139
|
+
const [switchingRemote, setSwitchingRemote] = (0, react.useState)(false);
|
|
2140
|
+
const [query, setQuery] = (0, react.useState)(initialInput ?? "");
|
|
2141
|
+
const [selectedCandidate, setSelectedCandidate] = (0, react.useState)(null);
|
|
2142
|
+
const [remote, setRemote] = (0, react.useState)("");
|
|
2143
|
+
const [providerOverride, setProviderOverride] = (0, react.useState)("");
|
|
2144
|
+
const [filter, setFilter] = (0, react.useState)("all");
|
|
2145
|
+
const [resolved, setResolved] = (0, react.useState)(null);
|
|
2146
|
+
const [resolving, setResolving] = (0, react.useState)(false);
|
|
2147
|
+
const [resolveError, setResolveError] = (0, react.useState)(null);
|
|
2148
|
+
const [ifExists, setIfExists] = (0, react.useState)(initialIfExists ?? "reuse");
|
|
2149
|
+
const [divergedPrompt, setDivergedPrompt] = (0, react.useState)(false);
|
|
2150
|
+
const [autoTrack, setAutoTrack] = (0, react.useState)(true);
|
|
2151
|
+
const [busy, setBusy] = (0, react.useState)(false);
|
|
2152
|
+
const [busyMode, setBusyMode] = (0, react.useState)("create");
|
|
2153
|
+
const [stageText, setStageText] = (0, react.useState)(null);
|
|
2154
|
+
const [progressPercent, setProgressPercent] = (0, react.useState)(null);
|
|
2155
|
+
const [progressLog, setProgressLog] = (0, react.useState)(null);
|
|
2156
|
+
const [checkoutError, setCheckoutError] = (0, react.useState)(null);
|
|
2157
|
+
const inputRef = (0, react.useRef)(null);
|
|
2158
|
+
const abortRef = (0, react.useRef)(null);
|
|
2159
|
+
const remoteSwitchAbortRef = (0, react.useRef)(null);
|
|
2160
|
+
const resolvedTargetKeyRef = (0, react.useRef)(null);
|
|
2161
|
+
const tRef = (0, react.useRef)(t);
|
|
2162
|
+
tRef.current = t;
|
|
2163
|
+
(0, react.useEffect)(() => {
|
|
2164
|
+
const controller = new AbortController();
|
|
2165
|
+
setContext(null);
|
|
2166
|
+
setLoadError(null);
|
|
2167
|
+
setSwitchingRemote(false);
|
|
2168
|
+
setSelectedCandidate(null);
|
|
2169
|
+
setRemote("");
|
|
2170
|
+
setProviderOverride("");
|
|
2171
|
+
setQuery(initialInput ?? "");
|
|
2172
|
+
setResolved(null);
|
|
2173
|
+
setResolveError(null);
|
|
2174
|
+
setResolving(false);
|
|
2175
|
+
setIfExists(initialIfExists ?? "reuse");
|
|
2176
|
+
setDivergedPrompt(false);
|
|
2177
|
+
setCheckoutError(null);
|
|
2178
|
+
resolvedTargetKeyRef.current = null;
|
|
2179
|
+
requestPrContext(repoPath, controller.signal).then((result) => {
|
|
2180
|
+
if (controller.signal.aborted) return;
|
|
2181
|
+
if (!result.ok) {
|
|
2182
|
+
setLoadError(formatPrError(result.error, result.code, result.params, tRef.current));
|
|
2183
|
+
return;
|
|
2184
|
+
}
|
|
2185
|
+
setContext(result);
|
|
2186
|
+
setRemote(result.defaultRemote ?? result.remotes[0]?.name ?? "");
|
|
2187
|
+
setFilter("all");
|
|
2188
|
+
});
|
|
2189
|
+
return () => {
|
|
2190
|
+
controller.abort();
|
|
2191
|
+
remoteSwitchAbortRef.current?.abort();
|
|
2192
|
+
};
|
|
2193
|
+
}, [
|
|
2194
|
+
repoPath,
|
|
2195
|
+
initialInput,
|
|
2196
|
+
initialIfExists
|
|
2197
|
+
]);
|
|
2198
|
+
(0, react.useEffect)(() => {
|
|
2199
|
+
if (context !== null) inputRef.current?.focus();
|
|
2200
|
+
}, [context]);
|
|
2201
|
+
(0, react.useEffect)(() => () => {
|
|
2202
|
+
abortRef.current?.abort();
|
|
2203
|
+
remoteSwitchAbortRef.current?.abort();
|
|
2204
|
+
}, []);
|
|
2205
|
+
const forgeReady = context?.forge.available === true && context.forge.readiness === "ready";
|
|
2206
|
+
const hasCandidateList = forgeReady && (context?.candidates.length ?? 0) > 0;
|
|
2207
|
+
const effectiveInput = selectedCandidate !== null ? selectedCandidate.url : query.trim();
|
|
2208
|
+
const effectiveRemote = selectedCandidate !== null ? selectedCandidate.remote : remote;
|
|
2209
|
+
const selectedRemoteInfo = (0, react.useMemo)(() => context?.remotes.find((r) => r.name === effectiveRemote), [context, effectiveRemote]);
|
|
2210
|
+
const needsProviderPicker = (0, react.useMemo)(() => {
|
|
2211
|
+
return selectedCandidate === null && /^[#!]?\d+$/.test(effectiveInput) && selectedRemoteInfo?.provider === null;
|
|
2212
|
+
}, [
|
|
2213
|
+
selectedCandidate,
|
|
2214
|
+
effectiveInput,
|
|
2215
|
+
selectedRemoteInfo
|
|
2216
|
+
]);
|
|
2217
|
+
const defaultPickerProvider = effectiveInput.startsWith("!") ? "gitlab" : "github";
|
|
2218
|
+
const effectiveProvider = needsProviderPicker ? providerOverride || defaultPickerProvider : void 0;
|
|
2219
|
+
(0, react.useEffect)(() => {
|
|
2220
|
+
if (context === null || context.remotes.length === 0) return;
|
|
2221
|
+
if (effectiveInput === "") {
|
|
2222
|
+
resolvedTargetKeyRef.current = null;
|
|
2223
|
+
setResolved(null);
|
|
2224
|
+
setResolveError(null);
|
|
2225
|
+
setResolving(false);
|
|
2226
|
+
setDivergedPrompt(false);
|
|
2227
|
+
return;
|
|
2228
|
+
}
|
|
2229
|
+
if (selectedCandidate === null && hasCandidateList && !looksLikePrTarget(effectiveInput)) {
|
|
2230
|
+
resolvedTargetKeyRef.current = null;
|
|
2231
|
+
setResolved(null);
|
|
2232
|
+
setResolveError(null);
|
|
2233
|
+
setResolving(false);
|
|
2234
|
+
setDivergedPrompt(false);
|
|
2235
|
+
return;
|
|
2236
|
+
}
|
|
2237
|
+
const controller = new AbortController();
|
|
2238
|
+
setResolved(null);
|
|
2239
|
+
setResolving(true);
|
|
2240
|
+
setResolveError(null);
|
|
2241
|
+
setDivergedPrompt(false);
|
|
2242
|
+
const timer = setTimeout(() => {
|
|
2243
|
+
requestPrResolve({
|
|
2244
|
+
repoPath,
|
|
2245
|
+
input: effectiveInput,
|
|
2246
|
+
...effectiveRemote === "" ? {} : { remote: effectiveRemote },
|
|
2247
|
+
...effectiveProvider === void 0 ? {} : { provider: effectiveProvider },
|
|
2248
|
+
...selectedCandidate === null ? {} : { verifyRemote: false }
|
|
2249
|
+
}, controller.signal).then((result) => {
|
|
2250
|
+
if (controller.signal.aborted) return;
|
|
2251
|
+
setResolving(false);
|
|
2252
|
+
if (!result.ok) {
|
|
2253
|
+
resolvedTargetKeyRef.current = null;
|
|
2254
|
+
setResolved(null);
|
|
2255
|
+
setResolveError(formatPrError(result.error, result.code, result.params, tRef.current));
|
|
2256
|
+
return;
|
|
2257
|
+
}
|
|
2258
|
+
const targetKey = `${result.remote}:${result.provider}:${result.number}`;
|
|
2259
|
+
setResolved(result);
|
|
2260
|
+
if (resolvedTargetKeyRef.current !== targetKey) {
|
|
2261
|
+
resolvedTargetKeyRef.current = targetKey;
|
|
2262
|
+
setIfExists(initialIfExists ?? "reuse");
|
|
2263
|
+
}
|
|
2264
|
+
});
|
|
2265
|
+
}, 180);
|
|
2266
|
+
return () => {
|
|
2267
|
+
clearTimeout(timer);
|
|
2268
|
+
controller.abort();
|
|
2269
|
+
};
|
|
2270
|
+
}, [
|
|
2271
|
+
context,
|
|
2272
|
+
repoPath,
|
|
2273
|
+
effectiveInput,
|
|
2274
|
+
effectiveRemote,
|
|
2275
|
+
effectiveProvider,
|
|
2276
|
+
selectedCandidate,
|
|
2277
|
+
hasCandidateList,
|
|
2278
|
+
initialIfExists
|
|
2279
|
+
]);
|
|
2280
|
+
const counts = (0, react.useMemo)(() => {
|
|
2281
|
+
const map = {
|
|
2282
|
+
all: context?.candidates.length ?? 0,
|
|
2283
|
+
"review-requested": 0,
|
|
2284
|
+
authored: 0,
|
|
2285
|
+
involved: 0
|
|
2286
|
+
};
|
|
2287
|
+
for (const item of context?.candidates ?? []) map[item.filter] += 1;
|
|
2288
|
+
return map;
|
|
2289
|
+
}, [context]);
|
|
2290
|
+
const visibleCandidates = (0, react.useMemo)(() => filterPrCandidates(context?.candidates ?? [], filter, query), [
|
|
2291
|
+
context,
|
|
2292
|
+
filter,
|
|
2293
|
+
query
|
|
2294
|
+
]);
|
|
2295
|
+
const matchedCandidate = (0, react.useMemo)(() => {
|
|
2296
|
+
if (resolved === null) return selectedCandidate;
|
|
2297
|
+
if (selectedCandidate !== null && selectedCandidate.provider === resolved.provider && selectedCandidate.number === resolved.number && selectedCandidate.remote === resolved.remote) return selectedCandidate;
|
|
2298
|
+
return context?.candidates.find((c) => c.provider === resolved.provider && c.number === resolved.number && c.remote === resolved.remote) ?? null;
|
|
2299
|
+
}, [
|
|
2300
|
+
resolved,
|
|
2301
|
+
selectedCandidate,
|
|
2302
|
+
context
|
|
2303
|
+
]);
|
|
2304
|
+
const handleRemoteChange = (nextRemote, options) => {
|
|
2305
|
+
const preserve = options?.preserveSelection === true;
|
|
2306
|
+
setRemote(nextRemote);
|
|
2307
|
+
if (!preserve) {
|
|
2308
|
+
setProviderOverride("");
|
|
2309
|
+
setSelectedCandidate(null);
|
|
2310
|
+
setResolved(null);
|
|
2311
|
+
setResolveError(null);
|
|
2312
|
+
}
|
|
2313
|
+
setCheckoutError(null);
|
|
2314
|
+
setDivergedPrompt(false);
|
|
2315
|
+
if (context === null) return;
|
|
2316
|
+
remoteSwitchAbortRef.current?.abort();
|
|
2317
|
+
const controller = new AbortController();
|
|
2318
|
+
remoteSwitchAbortRef.current = controller;
|
|
2319
|
+
setSwitchingRemote(true);
|
|
2320
|
+
requestPrContext(repoPath, {
|
|
2321
|
+
remote: nextRemote,
|
|
2322
|
+
signal: controller.signal
|
|
2323
|
+
}).then((result) => {
|
|
2324
|
+
if (controller.signal.aborted) return;
|
|
2325
|
+
setSwitchingRemote(false);
|
|
2326
|
+
if (!result.ok) {
|
|
2327
|
+
const message = formatPrError(result.error, result.code, result.params, tRef.current);
|
|
2328
|
+
setContext((prev) => prev === null ? null : {
|
|
2329
|
+
...prev,
|
|
2330
|
+
candidates: [],
|
|
2331
|
+
forge: prev.forge.available ? {
|
|
2332
|
+
available: true,
|
|
2333
|
+
readiness: "unavailable",
|
|
2334
|
+
message
|
|
2335
|
+
} : prev.forge
|
|
2336
|
+
});
|
|
2337
|
+
setCheckoutError(message);
|
|
2338
|
+
return;
|
|
2339
|
+
}
|
|
2340
|
+
setContext(result);
|
|
2341
|
+
if (filter !== "all" && !result.candidates.some((c) => c.filter === filter)) setFilter("all");
|
|
2342
|
+
});
|
|
2343
|
+
};
|
|
2344
|
+
const handleClose = () => {
|
|
2345
|
+
if (busy) {
|
|
2346
|
+
if (abortRef.current !== null) {
|
|
2347
|
+
abortRef.current.abort();
|
|
2348
|
+
return;
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
onClose();
|
|
2352
|
+
};
|
|
2353
|
+
const executeCheckout = (modeOverride) => {
|
|
2354
|
+
if (busy || resolved === null || resolved.occupiedByMain === true) return;
|
|
2355
|
+
const effectiveMode = modeOverride ?? (resolved.existingWorktreePath === void 0 ? void 0 : ifExists);
|
|
2356
|
+
const canDeferPr = isSwitchSessionDirectory?.() === true && armDeferredWorktree !== void 0;
|
|
2357
|
+
const alreadyInTargetWorktree = resolved.existingWorktreePath !== void 0 && isPathWithinWorktree(currentSessionPath?.(), resolved.existingWorktreePath);
|
|
2358
|
+
const hasExistingStandalone = resolved.existingWorktreePath !== void 0 && hasStandaloneWorkspace?.(resolved.existingWorktreePath) === true;
|
|
2359
|
+
const shouldDeferAfterAction = canDeferPr && !alreadyInTargetWorktree && !hasExistingStandalone;
|
|
2360
|
+
const buildTrackUrl = (canonical) => autoTrack && forgeTrackAvailable ? canonical ?? null : null;
|
|
2361
|
+
const armPrDeferred = (mode, canonical) => {
|
|
2362
|
+
const trackUrl = buildTrackUrl(canonical);
|
|
2363
|
+
return armDeferredWorktree({
|
|
2364
|
+
repoPath,
|
|
2365
|
+
branch: resolved.localBranch,
|
|
2366
|
+
cutout: false,
|
|
2367
|
+
pr: {
|
|
2368
|
+
input: effectiveInput,
|
|
2369
|
+
remote: resolved.remote,
|
|
2370
|
+
provider: resolved.provider,
|
|
2371
|
+
...mode === void 0 ? {} : { ifExists: mode },
|
|
2372
|
+
canonicalUrl: trackUrl
|
|
2373
|
+
}
|
|
2374
|
+
}, {
|
|
2375
|
+
...reuseBlankSessionId === void 0 ? {} : { reuseBlankSessionId },
|
|
2376
|
+
...context === null ? {} : { repoRoot: context.repoRoot }
|
|
2377
|
+
});
|
|
2378
|
+
};
|
|
2379
|
+
if (shouldDeferAfterAction && (resolved.existingWorktreePath === void 0 || effectiveMode === "reuse")) {
|
|
2380
|
+
setBusy(true);
|
|
2381
|
+
setBusyMode(effectiveMode === "reuse" ? "open" : "create");
|
|
2382
|
+
setCheckoutError(null);
|
|
2383
|
+
setDivergedPrompt(false);
|
|
2384
|
+
armPrDeferred(effectiveMode, resolved.canonicalUrl).then(() => {
|
|
2385
|
+
onClose();
|
|
2386
|
+
}, (reason) => {
|
|
2387
|
+
setBusy(false);
|
|
2388
|
+
setCheckoutError(reason instanceof Error ? reason.message : String(reason));
|
|
2389
|
+
});
|
|
2390
|
+
return;
|
|
2391
|
+
}
|
|
2392
|
+
const nextBusyMode = effectiveMode === "reuse" ? "open" : effectiveMode === "update" || effectiveMode === "reset" ? "update" : "create";
|
|
2393
|
+
const controller = new AbortController();
|
|
2394
|
+
abortRef.current = controller;
|
|
2395
|
+
setBusy(true);
|
|
2396
|
+
setBusyMode(nextBusyMode);
|
|
2397
|
+
setCheckoutError(null);
|
|
2398
|
+
setDivergedPrompt(false);
|
|
2399
|
+
setStageText(resolved.existingWorktreePath !== void 0 && effectiveMode === "reuse" ? null : t("prModal.stageFetch"));
|
|
2400
|
+
setProgressPercent(null);
|
|
2401
|
+
setProgressLog(null);
|
|
2402
|
+
requestPrCheckout({
|
|
2403
|
+
repoPath,
|
|
2404
|
+
input: effectiveInput,
|
|
2405
|
+
remote: resolved.remote,
|
|
2406
|
+
provider: resolved.provider,
|
|
2407
|
+
...effectiveMode === void 0 ? {} : { ifExists: effectiveMode }
|
|
2408
|
+
}, {
|
|
2409
|
+
signal: controller.signal,
|
|
2410
|
+
onEvent: (event) => {
|
|
2411
|
+
if (event.type === "stage") setStageText(event.stage === "fetch" ? t("prModal.stageFetch") : event.stage === "worktree" ? t("prModal.stageWorktree") : t("prModal.stageCopy"));
|
|
2412
|
+
else if (event.type === "progress") {
|
|
2413
|
+
if (event.percent !== void 0) setProgressPercent(event.percent);
|
|
2414
|
+
setProgressLog(event.text);
|
|
2415
|
+
}
|
|
2416
|
+
}
|
|
2417
|
+
}).then(async (result) => {
|
|
2418
|
+
abortRef.current = null;
|
|
2419
|
+
if (controller.signal.aborted) {
|
|
2420
|
+
setBusy(false);
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2423
|
+
if (!result.ok) {
|
|
2424
|
+
setBusy(false);
|
|
2425
|
+
if (result.code === "worktree_diverged") {
|
|
2426
|
+
setDivergedPrompt(true);
|
|
2427
|
+
return;
|
|
2428
|
+
}
|
|
2429
|
+
setCheckoutError(formatPrError(result.error, result.code, result.params, tRef.current));
|
|
2430
|
+
return;
|
|
2431
|
+
}
|
|
2432
|
+
try {
|
|
2433
|
+
onCreated(result.path);
|
|
2434
|
+
if (alreadyInTargetWorktree && !result.created) {
|
|
2435
|
+
const trackUrl = buildTrackUrl(result.canonicalUrl);
|
|
2436
|
+
if (trackUrl !== null) trackCurrentSessionPr?.(trackUrl);
|
|
2437
|
+
} else if (shouldDeferAfterAction) await armPrDeferred("reuse", result.canonicalUrl);
|
|
2438
|
+
else {
|
|
2439
|
+
const trackUrl = buildTrackUrl(result.canonicalUrl);
|
|
2440
|
+
const adoptOptions = {
|
|
2441
|
+
...reuseBlankSessionId === void 0 ? {} : { reuseBlankSessionId },
|
|
2442
|
+
...context === null ? {} : { repoRoot: context.repoRoot },
|
|
2443
|
+
...trackUrl === null ? {} : { trackPrUrl: trackUrl }
|
|
2444
|
+
};
|
|
2445
|
+
await adoptWorktree(result.path, Object.keys(adoptOptions).length === 0 ? void 0 : adoptOptions);
|
|
2446
|
+
}
|
|
2447
|
+
if (result.reset === true) emitToast(t("prModal.resetToast", { branch: result.branch }), "success");
|
|
2448
|
+
else if (result.forceUpdated === true) emitToast(t("prModal.forceUpdatedToast", { branch: result.branch }), "success");
|
|
2449
|
+
else if (result.updated === true) emitToast(t("prModal.updatedToast", { branch: result.branch }), "success");
|
|
2450
|
+
else if (result.updated === false) emitToast(t("prModal.upToDateToast", { branch: result.branch }), "success");
|
|
2451
|
+
if (result.preservedLocalBranch === true) emitToast(t("prModal.preservedLocalBranchToast", { branch: result.branch }));
|
|
2452
|
+
if (result.fetchWarning !== void 0) emitToast(t("fetchWarning", { message: result.fetchWarning }));
|
|
2453
|
+
if (result.excludeWarning !== void 0) emitToast(t("excludeWarning", { message: result.excludeWarning }));
|
|
2454
|
+
if (result.copyWarning !== void 0) emitToast(t("copyWarning", { message: result.copyWarning }));
|
|
2455
|
+
if (pruneWorktrees !== void 0 && result.created) pruneWorktrees(result.path).then((report) => {
|
|
2456
|
+
if (report === void 0) return;
|
|
2457
|
+
if (report.removed.length > 0) emitToast(t("pruneDone", { n: report.removed.length }));
|
|
2458
|
+
if (report.failed.length > 0) emitToast(t("pruneFailed", { n: report.failed.length }));
|
|
2459
|
+
});
|
|
2460
|
+
onClose();
|
|
2461
|
+
} catch (reason) {
|
|
2462
|
+
setBusy(false);
|
|
2463
|
+
setCheckoutError(reason instanceof Error ? reason.message : String(reason));
|
|
2464
|
+
}
|
|
2465
|
+
}, (reason) => {
|
|
2466
|
+
abortRef.current = null;
|
|
2467
|
+
setBusy(false);
|
|
2468
|
+
setCheckoutError(reason instanceof Error ? reason.message : String(reason));
|
|
2469
|
+
});
|
|
2470
|
+
};
|
|
2471
|
+
const submitLabel = busy ? busyMode === "open" ? t("prModal.busyOpen") : busyMode === "update" ? t("prModal.busyUpdate") : t("prModal.busy") : resolved?.existingWorktreePath !== void 0 ? ifExists === "update" ? t("prModal.submitUpdate") : t("prModal.submitOpen") : t("prModal.submitCreate");
|
|
2472
|
+
const canSubmit = !busy && !resolving && resolved !== null && resolved.occupiedByMain !== true && (context?.remotes.length ?? 0) > 0;
|
|
2473
|
+
const previewTitleText = resolved === null ? null : resolved.meta !== void 0 ? `#${resolved.number} · ${resolved.meta.title}` : matchedCandidate !== null ? `#${resolved.number} · ${matchedCandidate.title}` : t("prModal.previewHeading");
|
|
2474
|
+
const previewAuthor = resolved?.meta?.author ?? matchedCandidate?.author ?? null;
|
|
2475
|
+
const previewDraft = resolved?.meta?.draft ?? matchedCandidate?.draft ?? false;
|
|
2476
|
+
const previewStateLabel = resolved?.meta?.state === "merged" ? t("prModal.tagMerged") : resolved?.meta?.state === "closed" ? t("prModal.tagClosed") : null;
|
|
2477
|
+
const previewChecks = matchedCandidate === null ? null : matchedCandidate.checksRollup;
|
|
2478
|
+
const previewCi = previewChecks === null ? null : ciText(previewChecks, t);
|
|
2479
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
2480
|
+
open: true,
|
|
2481
|
+
onClose: handleClose,
|
|
2482
|
+
closeLabel: t("close"),
|
|
2483
|
+
title: t("prModal.title", { repo: repoName }),
|
|
2484
|
+
className: CheckoutPrModal_module_default.dialog ?? "",
|
|
2485
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2486
|
+
className: CheckoutPrModal_module_default.footerWrap,
|
|
2487
|
+
children: [forgeTrackAvailable && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2488
|
+
className: CheckoutPrModal_module_default.radioLabel,
|
|
2489
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2490
|
+
type: "checkbox",
|
|
2491
|
+
checked: autoTrack,
|
|
2492
|
+
disabled: busy,
|
|
2493
|
+
onChange: (event) => {
|
|
2494
|
+
setAutoTrack(event.target.checked);
|
|
2495
|
+
}
|
|
2496
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("prModal.autoTrack") })]
|
|
2497
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2498
|
+
className: CheckoutPrModal_module_default.footerButtons,
|
|
2499
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2500
|
+
variant: "outline",
|
|
2501
|
+
onClick: handleClose,
|
|
2502
|
+
children: t("cancel")
|
|
2503
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2504
|
+
variant: "primary",
|
|
2505
|
+
disabled: !canSubmit,
|
|
2506
|
+
onClick: () => {
|
|
2507
|
+
executeCheckout();
|
|
2508
|
+
},
|
|
2509
|
+
children: submitLabel
|
|
2510
|
+
})]
|
|
2511
|
+
})]
|
|
2512
|
+
}),
|
|
2513
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2514
|
+
className: CheckoutPrModal_module_default.body,
|
|
2515
|
+
children: [
|
|
2516
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
2517
|
+
className: CheckoutPrModal_module_default.subtitle,
|
|
2518
|
+
children: t("prModal.subtitle")
|
|
2519
|
+
}),
|
|
2520
|
+
context === null && loadError === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2521
|
+
className: CheckoutPrModal_module_default.status,
|
|
2522
|
+
role: "status",
|
|
2523
|
+
children: t("prModal.loading")
|
|
2524
|
+
}),
|
|
2525
|
+
loadError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2526
|
+
className: CheckoutPrModal_module_default.error,
|
|
2527
|
+
role: "alert",
|
|
2528
|
+
children: t("prModal.loadFailed", { message: loadError })
|
|
2529
|
+
}),
|
|
2530
|
+
context !== null && context.remotes.length === 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2531
|
+
className: CheckoutPrModal_module_default.error,
|
|
2532
|
+
role: "alert",
|
|
2533
|
+
children: t("prModal.noRemotes")
|
|
2534
|
+
}),
|
|
2535
|
+
context !== null && context.remotes.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2536
|
+
context.forge.readiness === "unauthenticated" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2537
|
+
className: CheckoutPrModal_module_default.banner,
|
|
2538
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("prModal.forgeUnauth") }), context.forge.signInCommand !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2539
|
+
size: "sm",
|
|
2540
|
+
variant: "outline",
|
|
2541
|
+
onClick: () => {
|
|
2542
|
+
(0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(context.forge.signInCommand).then((ok) => {
|
|
2543
|
+
if (ok) emitToast(t("hover.copied"), "success");
|
|
2544
|
+
});
|
|
2545
|
+
},
|
|
2546
|
+
children: t("copy")
|
|
2547
|
+
})]
|
|
2548
|
+
}),
|
|
2549
|
+
context.forge.available && context.forge.readiness === "unavailable" && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2550
|
+
className: CheckoutPrModal_module_default.banner,
|
|
2551
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: context.forge.listUnsupported === true ? t("prModal.forgeListUnsupported") : context.forge.message !== void 0 && context.forge.message.trim() !== "" ? t("prModal.forgeUnavailableWithReason", { message: context.forge.message }) : t("prModal.forgeUnavailable") })
|
|
2552
|
+
}),
|
|
2553
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2554
|
+
className: CheckoutPrModal_module_default.controlsRow,
|
|
2555
|
+
children: [
|
|
2556
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2557
|
+
ref: inputRef,
|
|
2558
|
+
type: "text",
|
|
2559
|
+
className: CheckoutPrModal_module_default.input,
|
|
2560
|
+
value: query,
|
|
2561
|
+
disabled: busy,
|
|
2562
|
+
placeholder: t("prModal.inputPlaceholder"),
|
|
2563
|
+
"aria-label": t("prModal.inputPlaceholder"),
|
|
2564
|
+
onChange: (event) => {
|
|
2565
|
+
setQuery(event.target.value);
|
|
2566
|
+
setSelectedCandidate(null);
|
|
2567
|
+
setResolved(null);
|
|
2568
|
+
setResolveError(null);
|
|
2569
|
+
setCheckoutError(null);
|
|
2570
|
+
setDivergedPrompt(false);
|
|
2571
|
+
},
|
|
2572
|
+
onKeyDown: (event) => {
|
|
2573
|
+
if (event.key === "Enter" && !event.nativeEvent.isComposing && canSubmit) {
|
|
2574
|
+
event.preventDefault();
|
|
2575
|
+
executeCheckout();
|
|
2576
|
+
}
|
|
2577
|
+
}
|
|
2578
|
+
}),
|
|
2579
|
+
context.remotes.length > 1 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("select", {
|
|
2580
|
+
className: CheckoutPrModal_module_default.select,
|
|
2581
|
+
"aria-label": t("prModal.remoteLabel"),
|
|
2582
|
+
value: remote,
|
|
2583
|
+
disabled: busy,
|
|
2584
|
+
onChange: (event) => {
|
|
2585
|
+
handleRemoteChange(event.target.value);
|
|
2586
|
+
},
|
|
2587
|
+
children: context.remotes.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2588
|
+
value: item.name,
|
|
2589
|
+
children: item.owner !== null && item.repo !== null ? `${item.name} (${item.owner}/${item.repo})` : item.name
|
|
2590
|
+
}, item.name))
|
|
2591
|
+
}),
|
|
2592
|
+
needsProviderPicker && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("select", {
|
|
2593
|
+
className: CheckoutPrModal_module_default.select,
|
|
2594
|
+
"aria-label": t("prModal.providerLabel"),
|
|
2595
|
+
value: effectiveProvider ?? defaultPickerProvider,
|
|
2596
|
+
disabled: busy,
|
|
2597
|
+
onChange: (event) => {
|
|
2598
|
+
setProviderOverride(event.target.value);
|
|
2599
|
+
setResolved(null);
|
|
2600
|
+
setResolveError(null);
|
|
2601
|
+
},
|
|
2602
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2603
|
+
value: "github",
|
|
2604
|
+
children: t("prModal.providerGithub")
|
|
2605
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("option", {
|
|
2606
|
+
value: "gitlab",
|
|
2607
|
+
children: t("prModal.providerGitlab")
|
|
2608
|
+
})]
|
|
2609
|
+
})
|
|
2610
|
+
]
|
|
2611
|
+
}),
|
|
2612
|
+
switchingRemote && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2613
|
+
className: CheckoutPrModal_module_default.status,
|
|
2614
|
+
role: "status",
|
|
2615
|
+
children: t("prModal.loadingRemote", { remote })
|
|
2616
|
+
}),
|
|
2617
|
+
forgeReady && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2618
|
+
className: CheckoutPrModal_module_default.filterRow,
|
|
2619
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2620
|
+
className: CheckoutPrModal_module_default.filterTabs,
|
|
2621
|
+
role: "tablist",
|
|
2622
|
+
children: [
|
|
2623
|
+
["all", "prModal.filterAll"],
|
|
2624
|
+
["review-requested", "prModal.filterReviewRequested"],
|
|
2625
|
+
["authored", "prModal.filterAuthored"],
|
|
2626
|
+
["involved", "prModal.filterInvolved"]
|
|
2627
|
+
].map(([key, labelKey]) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2628
|
+
type: "button",
|
|
2629
|
+
role: "tab",
|
|
2630
|
+
"aria-selected": filter === key,
|
|
2631
|
+
className: filter === key ? `${CheckoutPrModal_module_default.filterTab} ${CheckoutPrModal_module_default.filterTabActive}` : CheckoutPrModal_module_default.filterTab,
|
|
2632
|
+
disabled: busy,
|
|
2633
|
+
onClick: () => {
|
|
2634
|
+
setFilter(key);
|
|
2635
|
+
},
|
|
2636
|
+
children: t(labelKey, { n: counts[key] })
|
|
2637
|
+
}, key))
|
|
2638
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2639
|
+
type: "button",
|
|
2640
|
+
className: CheckoutPrModal_module_default.refreshTab,
|
|
2641
|
+
disabled: busy || switchingRemote,
|
|
2642
|
+
onClick: () => {
|
|
2643
|
+
handleRemoteChange(remote, { preserveSelection: true });
|
|
2644
|
+
},
|
|
2645
|
+
children: t("prModal.refreshCandidates")
|
|
2646
|
+
})]
|
|
2647
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2648
|
+
className: CheckoutPrModal_module_default.candidateList,
|
|
2649
|
+
role: "listbox",
|
|
2650
|
+
children: visibleCandidates.length === 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2651
|
+
className: CheckoutPrModal_module_default.emptyList,
|
|
2652
|
+
children: counts.all === 0 ? t("prModal.emptyRepoCandidates") : t("prModal.noCandidates")
|
|
2653
|
+
}) : visibleCandidates.map((item) => {
|
|
2654
|
+
const trimmedQuery = query.trim();
|
|
2655
|
+
const normalizedNum = trimmedQuery.replace(/^[#!]/, "");
|
|
2656
|
+
const selected = selectedCandidate !== null && selectedCandidate.provider === item.provider && selectedCandidate.number === item.number && selectedCandidate.remote === item.remote || selectedCandidate === null && item.remote === remote && (trimmedQuery === item.url || normalizedNum === String(item.number));
|
|
2657
|
+
const checks = ciText(item.checksRollup, t);
|
|
2658
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
2659
|
+
type: "button",
|
|
2660
|
+
role: "option",
|
|
2661
|
+
"aria-selected": selected,
|
|
2662
|
+
disabled: busy,
|
|
2663
|
+
className: selected ? `${CheckoutPrModal_module_default.candidateRow} ${CheckoutPrModal_module_default.candidateRowSelected}` : CheckoutPrModal_module_default.candidateRow,
|
|
2664
|
+
onClick: () => {
|
|
2665
|
+
remoteSwitchAbortRef.current?.abort();
|
|
2666
|
+
remoteSwitchAbortRef.current = null;
|
|
2667
|
+
setSwitchingRemote(false);
|
|
2668
|
+
setSelectedCandidate(item);
|
|
2669
|
+
setRemote(item.remote);
|
|
2670
|
+
setProviderOverride("");
|
|
2671
|
+
setCheckoutError(null);
|
|
2672
|
+
setDivergedPrompt(false);
|
|
2673
|
+
},
|
|
2674
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2675
|
+
className: CheckoutPrModal_module_default.candidateTop,
|
|
2676
|
+
children: [
|
|
2677
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2678
|
+
className: CheckoutPrModal_module_default.candidateNum,
|
|
2679
|
+
children: ["#", item.number]
|
|
2680
|
+
}),
|
|
2681
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2682
|
+
className: CheckoutPrModal_module_default.candidateTitle,
|
|
2683
|
+
children: item.title
|
|
2684
|
+
}),
|
|
2685
|
+
item.draft && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2686
|
+
tone: "neutral",
|
|
2687
|
+
children: t("prModal.tagDraft")
|
|
2688
|
+
}),
|
|
2689
|
+
item.existingWorktreePath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2690
|
+
tone: "neutral",
|
|
2691
|
+
children: t("prModal.tagWorktree")
|
|
2692
|
+
})
|
|
2693
|
+
]
|
|
2694
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2695
|
+
className: CheckoutPrModal_module_default.candidateMeta,
|
|
2696
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: item.author ?? item.owner }), checks !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2697
|
+
className: CheckoutPrModal_module_default.ciBadge,
|
|
2698
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2699
|
+
className: ciDotClass(item.checksRollup),
|
|
2700
|
+
"aria-hidden": "true"
|
|
2701
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: checks })]
|
|
2702
|
+
})]
|
|
2703
|
+
})]
|
|
2704
|
+
}, `${item.provider}:${item.number}`);
|
|
2705
|
+
})
|
|
2706
|
+
})] }),
|
|
2707
|
+
resolving && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2708
|
+
className: CheckoutPrModal_module_default.status,
|
|
2709
|
+
role: "status",
|
|
2710
|
+
children: t("prModal.resolving")
|
|
2711
|
+
}),
|
|
2712
|
+
resolveError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2713
|
+
className: CheckoutPrModal_module_default.error,
|
|
2714
|
+
role: "alert",
|
|
2715
|
+
children: resolveError
|
|
2716
|
+
}),
|
|
2717
|
+
resolved !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2718
|
+
className: CheckoutPrModal_module_default.previewCard,
|
|
2719
|
+
children: resolved.occupiedByMain === true ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2720
|
+
className: CheckoutPrModal_module_default.error,
|
|
2721
|
+
role: "alert",
|
|
2722
|
+
children: t("prModal.occupiedByMain", { branch: resolved.localBranch })
|
|
2723
|
+
}) : resolved.existingWorktreePath !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2724
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2725
|
+
className: CheckoutPrModal_module_default.previewHeader,
|
|
2726
|
+
children: [
|
|
2727
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2728
|
+
className: CheckoutPrModal_module_default.previewTitle,
|
|
2729
|
+
children: t("prModal.existingHeading", { branch: resolved.localBranch })
|
|
2730
|
+
}),
|
|
2731
|
+
previewDraft && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2732
|
+
tone: "neutral",
|
|
2733
|
+
children: t("prModal.tagDraft")
|
|
2734
|
+
}),
|
|
2735
|
+
previewStateLabel !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2736
|
+
tone: "neutral",
|
|
2737
|
+
children: previewStateLabel
|
|
2738
|
+
})
|
|
2739
|
+
]
|
|
2740
|
+
}),
|
|
2741
|
+
previewTitleText !== null && previewTitleText !== t("prModal.previewHeading") && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2742
|
+
className: CheckoutPrModal_module_default.previewLine,
|
|
2743
|
+
children: previewTitleText
|
|
2744
|
+
}),
|
|
2745
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
2746
|
+
className: CheckoutPrModal_module_default.previewDl,
|
|
2747
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("prModal.labelExistingPath") }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", {
|
|
2748
|
+
title: resolved.existingWorktreePath,
|
|
2749
|
+
children: resolved.existingWorktreePath
|
|
2750
|
+
})]
|
|
2751
|
+
}),
|
|
2752
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2753
|
+
className: CheckoutPrModal_module_default.existingOptions,
|
|
2754
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2755
|
+
className: ifExists === "reuse" ? `${CheckoutPrModal_module_default.radioCard} ${CheckoutPrModal_module_default.radioCardSelected}` : CheckoutPrModal_module_default.radioCard,
|
|
2756
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2757
|
+
type: "radio",
|
|
2758
|
+
name: "pr-if-exists",
|
|
2759
|
+
checked: ifExists === "reuse",
|
|
2760
|
+
disabled: busy,
|
|
2761
|
+
onChange: () => {
|
|
2762
|
+
setIfExists("reuse");
|
|
2763
|
+
setDivergedPrompt(false);
|
|
2764
|
+
setCheckoutError(null);
|
|
2765
|
+
}
|
|
2766
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("prModal.existingReuse") })]
|
|
2767
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("label", {
|
|
2768
|
+
className: ifExists === "update" ? `${CheckoutPrModal_module_default.radioCard} ${CheckoutPrModal_module_default.radioCardSelected}` : CheckoutPrModal_module_default.radioCard,
|
|
2769
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
2770
|
+
type: "radio",
|
|
2771
|
+
name: "pr-if-exists",
|
|
2772
|
+
checked: ifExists === "update",
|
|
2773
|
+
disabled: busy,
|
|
2774
|
+
onChange: () => {
|
|
2775
|
+
setIfExists("update");
|
|
2776
|
+
setDivergedPrompt(false);
|
|
2777
|
+
setCheckoutError(null);
|
|
2778
|
+
}
|
|
2779
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("prModal.existingUpdate") })]
|
|
2780
|
+
})]
|
|
2781
|
+
})
|
|
2782
|
+
] }) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
2783
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2784
|
+
className: CheckoutPrModal_module_default.previewHeader,
|
|
2785
|
+
children: [
|
|
2786
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2787
|
+
className: CheckoutPrModal_module_default.previewTitle,
|
|
2788
|
+
children: previewTitleText
|
|
2789
|
+
}),
|
|
2790
|
+
previewDraft && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2791
|
+
tone: "neutral",
|
|
2792
|
+
children: t("prModal.tagDraft")
|
|
2793
|
+
}),
|
|
2794
|
+
previewStateLabel !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
2795
|
+
tone: "neutral",
|
|
2796
|
+
children: previewStateLabel
|
|
2797
|
+
})
|
|
2798
|
+
]
|
|
2799
|
+
}),
|
|
2800
|
+
(previewAuthor !== null || previewCi !== null) && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2801
|
+
className: CheckoutPrModal_module_default.candidateMeta,
|
|
2802
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: previewAuthor ?? "" }), previewCi !== null && previewChecks !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
2803
|
+
className: CheckoutPrModal_module_default.ciBadge,
|
|
2804
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2805
|
+
className: ciDotClass(previewChecks),
|
|
2806
|
+
"aria-hidden": "true"
|
|
2807
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: previewCi })]
|
|
2808
|
+
})]
|
|
2809
|
+
}),
|
|
2810
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("dl", {
|
|
2811
|
+
className: CheckoutPrModal_module_default.previewDl,
|
|
2812
|
+
children: [
|
|
2813
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("prModal.labelRef") }),
|
|
2814
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: `${resolved.remote} ${resolved.refSpec}` }),
|
|
2815
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("prModal.labelBranch") }),
|
|
2816
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", { children: resolved.localBranch }),
|
|
2817
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dt", { children: t("prModal.labelPath") }),
|
|
2818
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("dd", {
|
|
2819
|
+
title: resolved.targetPath,
|
|
2820
|
+
children: resolved.targetPath
|
|
2821
|
+
})
|
|
2822
|
+
]
|
|
2823
|
+
}),
|
|
2824
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2825
|
+
className: CheckoutPrModal_module_default.infoNote,
|
|
2826
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2827
|
+
className: CheckoutPrModal_module_default.dotNeutral,
|
|
2828
|
+
"aria-hidden": "true"
|
|
2829
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("prModal.forkPushNote") })]
|
|
2830
|
+
})
|
|
2831
|
+
] })
|
|
2832
|
+
}),
|
|
2833
|
+
divergedPrompt && resolved !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2834
|
+
className: CheckoutPrModal_module_default.divergedCard,
|
|
2835
|
+
role: "alert",
|
|
2836
|
+
children: [
|
|
2837
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2838
|
+
className: CheckoutPrModal_module_default.divergedHead,
|
|
2839
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2840
|
+
className: CheckoutPrModal_module_default.dotWarn,
|
|
2841
|
+
"aria-hidden": "true"
|
|
2842
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
2843
|
+
className: CheckoutPrModal_module_default.divergedTitle,
|
|
2844
|
+
children: t("prModal.divergedTitle", { branch: resolved.localBranch })
|
|
2845
|
+
})]
|
|
2846
|
+
}),
|
|
2847
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2848
|
+
className: CheckoutPrModal_module_default.divergedDesc,
|
|
2849
|
+
children: t("prModal.divergedDesc")
|
|
2850
|
+
}),
|
|
2851
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2852
|
+
className: CheckoutPrModal_module_default.divergedActions,
|
|
2853
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2854
|
+
size: "sm",
|
|
2855
|
+
variant: "outline",
|
|
2856
|
+
disabled: busy,
|
|
2857
|
+
onClick: () => {
|
|
2858
|
+
executeCheckout("reuse");
|
|
2859
|
+
},
|
|
2860
|
+
children: t("prModal.divergedKeep")
|
|
2861
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
2862
|
+
size: "sm",
|
|
2863
|
+
variant: "outline",
|
|
2864
|
+
className: CheckoutPrModal_module_default.dangerButton ?? "",
|
|
2865
|
+
disabled: busy,
|
|
2866
|
+
onClick: () => {
|
|
2867
|
+
executeCheckout("reset");
|
|
2868
|
+
},
|
|
2869
|
+
children: t("prModal.divergedReset")
|
|
2870
|
+
})]
|
|
2871
|
+
})
|
|
2872
|
+
]
|
|
2873
|
+
}),
|
|
2874
|
+
busy && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2875
|
+
className: CheckoutPrModal_module_default.progressCard,
|
|
2876
|
+
role: "status",
|
|
2877
|
+
children: [
|
|
2878
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2879
|
+
className: CheckoutPrModal_module_default.previewTitle,
|
|
2880
|
+
children: stageText ?? t("prModal.busy")
|
|
2881
|
+
}),
|
|
2882
|
+
progressPercent !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2883
|
+
className: CheckoutPrModal_module_default.progressTrack,
|
|
2884
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2885
|
+
className: CheckoutPrModal_module_default.progressFill,
|
|
2886
|
+
style: { width: `${Math.min(100, Math.max(0, progressPercent))}%` }
|
|
2887
|
+
})
|
|
2888
|
+
}),
|
|
2889
|
+
progressLog !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2890
|
+
className: CheckoutPrModal_module_default.progressLog,
|
|
2891
|
+
children: progressLog
|
|
2892
|
+
})
|
|
2893
|
+
]
|
|
2894
|
+
}),
|
|
2895
|
+
checkoutError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
2896
|
+
className: CheckoutPrModal_module_default.error,
|
|
2897
|
+
role: "alert",
|
|
2898
|
+
children: checkoutError
|
|
2899
|
+
})
|
|
2900
|
+
] })
|
|
2901
|
+
]
|
|
2902
|
+
})
|
|
2903
|
+
});
|
|
2904
|
+
}
|
|
1830
2905
|
/** Next page loads when the user scrolls an overflowing list to its end.
|
|
1831
2906
|
* A short list has no end to reach, and a failed page must not retry itself. */
|
|
1832
2907
|
function shouldAutoLoadHistory(metrics, state) {
|
|
@@ -2472,72 +3547,17 @@ window.__ModuleLoader__.load((() => {
|
|
|
2472
3547
|
if (!Number.isFinite(n)) return null;
|
|
2473
3548
|
return n > 0 ? n : 0;
|
|
2474
3549
|
};
|
|
2475
|
-
return px(chrome) ?? px(clearance) ?? 0;
|
|
2476
|
-
}
|
|
2477
|
-
//#endregion
|
|
2478
|
-
//#region src/client/graph-open.ts
|
|
2479
|
-
/** Graph mode across a branch-menu open transition.
|
|
2480
|
-
* Turning the setting on makes the click that opens the menu start in the
|
|
2481
|
-
* graph. While the setting is off, a mode the user already chose survives
|
|
2482
|
-
* closing the popup. An already-open menu is left alone. */
|
|
2483
|
-
function graphOpenAfter(wasOpen, open, defaultGraph, graphOpen) {
|
|
2484
|
-
if (open && !wasOpen && defaultGraph) return true;
|
|
2485
|
-
return graphOpen;
|
|
2486
|
-
}
|
|
2487
|
-
//#endregion
|
|
2488
|
-
//#region src/client/toast-bus.ts
|
|
2489
|
-
let nextSeq = 0;
|
|
2490
|
-
let queue = [];
|
|
2491
|
-
let mountedHosts = 0;
|
|
2492
|
-
const listeners$2 = /* @__PURE__ */ new Set();
|
|
2493
|
-
function notify$1() {
|
|
2494
|
-
for (const listener of listeners$2) listener();
|
|
2495
|
-
}
|
|
2496
|
-
/**
|
|
2497
|
-
* Push a toast message onto the global sequential queue.
|
|
2498
|
-
* @param text - localized message to display.
|
|
2499
|
-
* @param tone - optional `'success'` tone for affirmative confirmations.
|
|
2500
|
-
*/
|
|
2501
|
-
function emitToast(text, tone) {
|
|
2502
|
-
nextSeq += 1;
|
|
2503
|
-
const entry = tone === void 0 ? {
|
|
2504
|
-
seq: nextSeq,
|
|
2505
|
-
text
|
|
2506
|
-
} : {
|
|
2507
|
-
seq: nextSeq,
|
|
2508
|
-
text,
|
|
2509
|
-
tone
|
|
2510
|
-
};
|
|
2511
|
-
queue = [...queue, entry];
|
|
2512
|
-
notify$1();
|
|
2513
|
-
}
|
|
2514
|
-
/** Dismiss the currently visible head toast (if its seq still matches). */
|
|
2515
|
-
function shiftToast(seq) {
|
|
2516
|
-
if (queue[0]?.seq !== seq) return;
|
|
2517
|
-
queue = queue.slice(1);
|
|
2518
|
-
notify$1();
|
|
2519
|
-
}
|
|
2520
|
-
/** Current head toast waiting to be rendered, or undefined when empty. */
|
|
2521
|
-
function peekToast() {
|
|
2522
|
-
return queue[0];
|
|
2523
|
-
}
|
|
2524
|
-
/** Subscribe to queue changes. */
|
|
2525
|
-
function subscribeToasts(listener) {
|
|
2526
|
-
listeners$2.add(listener);
|
|
2527
|
-
return () => {
|
|
2528
|
-
listeners$2.delete(listener);
|
|
2529
|
-
};
|
|
2530
|
-
}
|
|
2531
|
-
/** Register one mounted `shell.overlay` host and return its unregister disposer. */
|
|
2532
|
-
function registerToastHost() {
|
|
2533
|
-
mountedHosts += 1;
|
|
2534
|
-
return () => {
|
|
2535
|
-
mountedHosts = Math.max(0, mountedHosts - 1);
|
|
2536
|
-
};
|
|
2537
|
-
}
|
|
2538
|
-
/** Whether a `shell.overlay` host is currently mounted to drain the queue. */
|
|
2539
|
-
function hasGlobalToastHost() {
|
|
2540
|
-
return mountedHosts > 0;
|
|
3550
|
+
return px(chrome) ?? px(clearance) ?? 0;
|
|
3551
|
+
}
|
|
3552
|
+
//#endregion
|
|
3553
|
+
//#region src/client/graph-open.ts
|
|
3554
|
+
/** Graph mode across a branch-menu open transition.
|
|
3555
|
+
* Turning the setting on makes the click that opens the menu start in the
|
|
3556
|
+
* graph. While the setting is off, a mode the user already chose survives
|
|
3557
|
+
* closing the popup. An already-open menu is left alone. */
|
|
3558
|
+
function graphOpenAfter(wasOpen, open, defaultGraph, graphOpen) {
|
|
3559
|
+
if (open && !wasOpen && defaultGraph) return true;
|
|
3560
|
+
return graphOpen;
|
|
2541
3561
|
}
|
|
2542
3562
|
//#endregion
|
|
2543
3563
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/BranchChip.module.css?inline
|
|
@@ -2550,8 +3570,16 @@ window.__ModuleLoader__.load((() => {
|
|
|
2550
3570
|
"popCard": "popCard_1594205807",
|
|
2551
3571
|
"popAsk": "popAsk_1594205807",
|
|
2552
3572
|
"popSubject": "popSubject_1594205807",
|
|
3573
|
+
"popTargetCard": "popTargetCard_1594205807",
|
|
3574
|
+
"popSubjectRow": "popSubjectRow_1594205807",
|
|
3575
|
+
"popSubjectName": "popSubjectName_1594205807",
|
|
3576
|
+
"popTargetPath": "popTargetPath_1594205807",
|
|
2553
3577
|
"popDetails": "popDetails_1594205807",
|
|
2554
3578
|
"popDetail": "popDetail_1594205807",
|
|
3579
|
+
"popDotSafe": "popDotSafe_1594205807",
|
|
3580
|
+
"popDotNeutral": "popDotNeutral_1594205807",
|
|
3581
|
+
"popDotWarn": "popDotWarn_1594205807",
|
|
3582
|
+
"popDetailBanner": "popDetailBanner_1594205807",
|
|
2555
3583
|
"popDetailWarn": "popDetailWarn_1594205807",
|
|
2556
3584
|
"popActions": "popActions_1594205807",
|
|
2557
3585
|
"popConfirmDanger": "popConfirmDanger_1594205807",
|
|
@@ -2686,6 +3714,67 @@ window.__ModuleLoader__.load((() => {
|
|
|
2686
3714
|
* branch's chain starts open (centering still lands it mid-viewport); at
|
|
2687
3715
|
* or under it, every folder starts open — few branches have nothing to hide.
|
|
2688
3716
|
*/
|
|
3717
|
+
/** Shared body for confirm flyouts across BranchMenu and BranchChipDock. */
|
|
3718
|
+
function PopConfirmBody({ ask, targetBranch, targetBadge, targetPath, subject, details, busy, draft, onDraftChange, draftPlaceholder, draftInvalid, draftHint, draftInputRef, onConfirm }) {
|
|
3719
|
+
const displayBranch = targetBranch ?? subject;
|
|
3720
|
+
const showTargetCard = displayBranch !== void 0 || targetPath !== void 0;
|
|
3721
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
3722
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3723
|
+
className: BranchChip_module_default.popAsk,
|
|
3724
|
+
children: ask
|
|
3725
|
+
}),
|
|
3726
|
+
showTargetCard && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3727
|
+
className: BranchChip_module_default.popTargetCard,
|
|
3728
|
+
children: [displayBranch !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3729
|
+
className: BranchChip_module_default.popSubjectRow,
|
|
3730
|
+
children: [
|
|
3731
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, { size: 13 }),
|
|
3732
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
3733
|
+
className: BranchChip_module_default.popSubjectName,
|
|
3734
|
+
title: displayBranch,
|
|
3735
|
+
children: displayBranch
|
|
3736
|
+
}),
|
|
3737
|
+
targetBadge !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
3738
|
+
tone: "neutral",
|
|
3739
|
+
children: targetBadge
|
|
3740
|
+
})
|
|
3741
|
+
]
|
|
3742
|
+
}), targetPath !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3743
|
+
className: BranchChip_module_default.popTargetPath,
|
|
3744
|
+
title: targetPath,
|
|
3745
|
+
children: targetPath
|
|
3746
|
+
})]
|
|
3747
|
+
}),
|
|
3748
|
+
details !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3749
|
+
className: BranchChip_module_default.popDetails,
|
|
3750
|
+
children: details
|
|
3751
|
+
}),
|
|
3752
|
+
onDraftChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
3753
|
+
ref: draftInputRef,
|
|
3754
|
+
className: BranchChip_module_default.menuCreate,
|
|
3755
|
+
type: "text",
|
|
3756
|
+
value: draft ?? "",
|
|
3757
|
+
placeholder: draftPlaceholder,
|
|
3758
|
+
"aria-label": draftPlaceholder,
|
|
3759
|
+
"aria-invalid": draftInvalid === true,
|
|
3760
|
+
spellCheck: false,
|
|
3761
|
+
disabled: busy,
|
|
3762
|
+
onChange: (event) => {
|
|
3763
|
+
onDraftChange(event.target.value);
|
|
3764
|
+
},
|
|
3765
|
+
onKeyDown: (event) => {
|
|
3766
|
+
if (event.key === "Enter" && draftInvalid !== true && !busy) {
|
|
3767
|
+
event.preventDefault();
|
|
3768
|
+
onConfirm();
|
|
3769
|
+
}
|
|
3770
|
+
}
|
|
3771
|
+
}), draftInvalid === true && draftHint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
3772
|
+
className: BranchChip_module_default.menuCreateHintBad,
|
|
3773
|
+
role: "status",
|
|
3774
|
+
children: draftHint
|
|
3775
|
+
})] })
|
|
3776
|
+
] });
|
|
3777
|
+
}
|
|
2689
3778
|
/**
|
|
2690
3779
|
* The fetch/update glyph in IDEA's posture: a diagonal running from the
|
|
2691
3780
|
* top-right down to a bottom-left arrowhead. `dashed` marks the metadata
|
|
@@ -2842,7 +3931,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
2842
3931
|
* @param props - anchor, rows, confirm bundle, callbacks, and the class sheet.
|
|
2843
3932
|
* @returns null while closed or unplaced; otherwise the portaled card (+flyout).
|
|
2844
3933
|
*/
|
|
2845
|
-
function BranchMenu({ open, repoPath, anchorRef, rows, currentBranch, confirm, onSelect, canCreate, canAdopt, canWorktree, onWorktree, onCutWorktree, onRemoveWorktree, worktreeRemovalBlocked, onCreate, onRename, onDelete, busy, onFetch, fetchBusy, onUpdate, onPush, hasRemotes, updateBusy, onClose, defaultGraph = false, branchEpoch = 0, t }) {
|
|
3934
|
+
function BranchMenu({ open, repoPath, anchorRef, rows, currentBranch, confirm, onSelect, canCreate, canAdopt, canWorktree, onWorktree, onCutWorktree, onRemoveWorktree, worktreeRemovalBlocked, onCreate, onRename, onDelete, busy, onFetch, fetchBusy, onUpdate, onPush, onCheckoutPr, hasRemotes, updateBusy, onClose, defaultGraph = false, branchEpoch = 0, t }) {
|
|
2846
3935
|
const cardRef = (0, react.useRef)(null);
|
|
2847
3936
|
const [graphOpen, setGraphOpen] = (0, react.useState)(false);
|
|
2848
3937
|
const [menuWasOpen, setMenuWasOpen] = (0, react.useState)(open);
|
|
@@ -4239,6 +5328,21 @@ window.__ModuleLoader__.load((() => {
|
|
|
4239
5328
|
},
|
|
4240
5329
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(FetchGlyph, {})
|
|
4241
5330
|
}),
|
|
5331
|
+
onCheckoutPr !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5332
|
+
type: "button",
|
|
5333
|
+
className: BranchChip_module_default.menuToolButton,
|
|
5334
|
+
title: t("menuCheckoutPr"),
|
|
5335
|
+
"aria-label": t("menuCheckoutPr"),
|
|
5336
|
+
disabled: busy,
|
|
5337
|
+
onClick: () => {
|
|
5338
|
+
confirmRef.current?.onCancel();
|
|
5339
|
+
setCreating(false);
|
|
5340
|
+
setRenaming(null);
|
|
5341
|
+
setCtx(null);
|
|
5342
|
+
onCheckoutPr();
|
|
5343
|
+
},
|
|
5344
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrCheckoutGlyph, { size: 15 })
|
|
5345
|
+
}),
|
|
4242
5346
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4243
5347
|
type: "button",
|
|
4244
5348
|
className: BranchChip_module_default.menuToolButton,
|
|
@@ -4320,60 +5424,25 @@ window.__ModuleLoader__.load((() => {
|
|
|
4320
5424
|
style: flyPos ?? FLY_MEASURE,
|
|
4321
5425
|
role: "dialog",
|
|
4322
5426
|
"aria-label": confirm.ask,
|
|
4323
|
-
children: [
|
|
4324
|
-
|
|
4325
|
-
|
|
4326
|
-
|
|
4327
|
-
|
|
4328
|
-
|
|
4329
|
-
|
|
4330
|
-
children: confirm.subject
|
|
4331
|
-
}),
|
|
4332
|
-
confirm.details !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
4333
|
-
className: BranchChip_module_default.popDetails,
|
|
4334
|
-
children: confirm.details
|
|
4335
|
-
}),
|
|
4336
|
-
confirm.onDraftChange !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
4337
|
-
ref: flyInputRef,
|
|
4338
|
-
className: BranchChip_module_default.menuCreate,
|
|
4339
|
-
type: "text",
|
|
4340
|
-
value: confirm.draft ?? "",
|
|
4341
|
-
placeholder: confirm.draftPlaceholder,
|
|
4342
|
-
"aria-label": confirm.draftPlaceholder,
|
|
4343
|
-
"aria-invalid": confirm.draftInvalid === true,
|
|
4344
|
-
spellCheck: false,
|
|
5427
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopConfirmBody, {
|
|
5428
|
+
...confirm,
|
|
5429
|
+
draftInputRef: flyInputRef
|
|
5430
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5431
|
+
className: BranchChip_module_default.popActions,
|
|
5432
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5433
|
+
type: "button",
|
|
4345
5434
|
disabled: confirm.busy,
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
})
|
|
4356
|
-
|
|
4357
|
-
role: "status",
|
|
4358
|
-
children: confirm.draftHint
|
|
4359
|
-
})] }),
|
|
4360
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4361
|
-
className: BranchChip_module_default.popActions,
|
|
4362
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4363
|
-
type: "button",
|
|
4364
|
-
disabled: confirm.busy,
|
|
4365
|
-
onClick: confirm.onCancel,
|
|
4366
|
-
children: confirm.cancelLabel
|
|
4367
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4368
|
-
ref: flyConfirmRef,
|
|
4369
|
-
type: "button",
|
|
4370
|
-
className: confirm.danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
4371
|
-
disabled: confirm.busy || confirm.draftInvalid === true,
|
|
4372
|
-
onClick: confirm.onConfirm,
|
|
4373
|
-
children: confirm.confirmLabel
|
|
4374
|
-
})]
|
|
4375
|
-
})
|
|
4376
|
-
]
|
|
5435
|
+
onClick: confirm.onCancel,
|
|
5436
|
+
children: confirm.cancelLabel
|
|
5437
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5438
|
+
ref: flyConfirmRef,
|
|
5439
|
+
type: "button",
|
|
5440
|
+
className: confirm.danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
5441
|
+
disabled: confirm.busy || confirm.draftInvalid === true,
|
|
5442
|
+
onClick: confirm.onConfirm,
|
|
5443
|
+
children: confirm.confirmLabel
|
|
5444
|
+
})]
|
|
5445
|
+
})]
|
|
4377
5446
|
}), document.body),
|
|
4378
5447
|
creating && (0, react_dom.createPortal)(/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
4379
5448
|
ref: createFlyRef,
|
|
@@ -4574,6 +5643,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
4574
5643
|
}]);
|
|
4575
5644
|
const onEvent = (event) => {
|
|
4576
5645
|
if (controller.signal.aborted) return;
|
|
5646
|
+
if (event.type === "stage") return;
|
|
4577
5647
|
const before = jobs.find((job) => job.id === id);
|
|
4578
5648
|
if (before === void 0) return;
|
|
4579
5649
|
const remote = event.type === "progress" ? event.remote ?? before.remote : void 0;
|
|
@@ -4637,6 +5707,69 @@ window.__ModuleLoader__.load((() => {
|
|
|
4637
5707
|
return failure;
|
|
4638
5708
|
}
|
|
4639
5709
|
//#endregion
|
|
5710
|
+
//#region src/client/action-bus.ts
|
|
5711
|
+
let currentAction = null;
|
|
5712
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
5713
|
+
function notify() {
|
|
5714
|
+
for (const listener of [...listeners]) listener();
|
|
5715
|
+
}
|
|
5716
|
+
/** Read the currently active overlay action, or null when idle. */
|
|
5717
|
+
function getWorktreeAction() {
|
|
5718
|
+
return currentAction;
|
|
5719
|
+
}
|
|
5720
|
+
/** Subscribe to active overlay action changes. */
|
|
5721
|
+
function subscribeWorktreeAction(listener) {
|
|
5722
|
+
listeners.add(listener);
|
|
5723
|
+
return () => {
|
|
5724
|
+
listeners.delete(listener);
|
|
5725
|
+
};
|
|
5726
|
+
}
|
|
5727
|
+
/** Open the worktree manager modal, optionally pre-scoped to one repository. */
|
|
5728
|
+
function openManageWorktrees(repoFilter) {
|
|
5729
|
+
currentAction = repoFilter === void 0 ? { kind: "manage" } : {
|
|
5730
|
+
kind: "manage",
|
|
5731
|
+
repoFilter
|
|
5732
|
+
};
|
|
5733
|
+
notify();
|
|
5734
|
+
}
|
|
5735
|
+
/** Open the create-worktree-from-branch modal for a repository workspace. */
|
|
5736
|
+
function openCreateWorktree(repoPath, repoName) {
|
|
5737
|
+
currentAction = {
|
|
5738
|
+
kind: "create",
|
|
5739
|
+
repoPath,
|
|
5740
|
+
repoName
|
|
5741
|
+
};
|
|
5742
|
+
notify();
|
|
5743
|
+
}
|
|
5744
|
+
/** Open the guarded worktree removal confirmation modal for a linked worktree path. */
|
|
5745
|
+
function openRemoveWorktree(path, branch) {
|
|
5746
|
+
currentAction = {
|
|
5747
|
+
kind: "remove",
|
|
5748
|
+
path,
|
|
5749
|
+
branch
|
|
5750
|
+
};
|
|
5751
|
+
notify();
|
|
5752
|
+
}
|
|
5753
|
+
/** Open the checkout-PR/MR-to-worktree modal for a repository workspace. */
|
|
5754
|
+
function openCheckoutPr(repoPath, repoName, initialInputOrOptions) {
|
|
5755
|
+
const opts = typeof initialInputOrOptions === "string" ? { initialInput: initialInputOrOptions } : initialInputOrOptions ?? {};
|
|
5756
|
+
currentAction = {
|
|
5757
|
+
kind: "checkout-pr",
|
|
5758
|
+
repoPath,
|
|
5759
|
+
repoName,
|
|
5760
|
+
...opts.initialInput === void 0 ? {} : { initialInput: opts.initialInput },
|
|
5761
|
+
...opts.reuseBlankSessionId === void 0 ? {} : { reuseBlankSessionId: opts.reuseBlankSessionId },
|
|
5762
|
+
...opts.initialIfExists === void 0 ? {} : { initialIfExists: opts.initialIfExists }
|
|
5763
|
+
};
|
|
5764
|
+
notify();
|
|
5765
|
+
}
|
|
5766
|
+
/** Dismiss the active overlay action. */
|
|
5767
|
+
function closeWorktreeAction() {
|
|
5768
|
+
if (currentAction === null) return;
|
|
5769
|
+
currentAction = null;
|
|
5770
|
+
notify();
|
|
5771
|
+
}
|
|
5772
|
+
//#endregion
|
|
4640
5773
|
//#region src/client/git-error.ts
|
|
4641
5774
|
/**
|
|
4642
5775
|
* Strip `git <args> failed (exit N): ` wrapper prefixes so pattern matching
|
|
@@ -5129,7 +6262,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
5129
6262
|
* the naming input (cutout flow) takes focus when present, else the
|
|
5130
6263
|
* confirm button does so Enter commits.
|
|
5131
6264
|
*/
|
|
5132
|
-
function ChipConfirm({ anchorRef,
|
|
6265
|
+
function ChipConfirm({ anchorRef, confirmLabel, cancelLabel, danger, onCancel, ...body }) {
|
|
5133
6266
|
const popRef = (0, react.useRef)(null);
|
|
5134
6267
|
const confirmRef = (0, react.useRef)(null);
|
|
5135
6268
|
const draftInputRef = (0, react.useRef)(null);
|
|
@@ -5185,61 +6318,26 @@ window.__ModuleLoader__.load((() => {
|
|
|
5185
6318
|
className: BranchChip_module_default.popCard,
|
|
5186
6319
|
style: pos ?? POP_MEASURE,
|
|
5187
6320
|
role: "dialog",
|
|
5188
|
-
"aria-label": ask,
|
|
5189
|
-
children: [
|
|
5190
|
-
|
|
5191
|
-
|
|
5192
|
-
|
|
5193
|
-
|
|
5194
|
-
|
|
5195
|
-
|
|
5196
|
-
|
|
5197
|
-
|
|
5198
|
-
|
|
5199
|
-
|
|
5200
|
-
|
|
5201
|
-
|
|
5202
|
-
|
|
5203
|
-
|
|
5204
|
-
|
|
5205
|
-
|
|
5206
|
-
|
|
5207
|
-
|
|
5208
|
-
"aria-label": draftPlaceholder,
|
|
5209
|
-
"aria-invalid": draftInvalid,
|
|
5210
|
-
spellCheck: false,
|
|
5211
|
-
disabled: busy,
|
|
5212
|
-
onChange: (event) => {
|
|
5213
|
-
onDraftChange(event.target.value);
|
|
5214
|
-
},
|
|
5215
|
-
onKeyDown: (event) => {
|
|
5216
|
-
if (event.key === "Enter" && draftInvalid !== true && !busy) {
|
|
5217
|
-
event.preventDefault();
|
|
5218
|
-
onConfirm();
|
|
5219
|
-
}
|
|
5220
|
-
}
|
|
5221
|
-
}), draftInvalid === true && draftHint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
5222
|
-
className: BranchChip_module_default.menuCreateHintBad,
|
|
5223
|
-
role: "status",
|
|
5224
|
-
children: draftHint
|
|
5225
|
-
})] }),
|
|
5226
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
5227
|
-
className: BranchChip_module_default.popActions,
|
|
5228
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5229
|
-
type: "button",
|
|
5230
|
-
disabled: busy,
|
|
5231
|
-
onClick: onCancel,
|
|
5232
|
-
children: cancelLabel
|
|
5233
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
5234
|
-
ref: confirmRef,
|
|
5235
|
-
type: "button",
|
|
5236
|
-
className: danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
5237
|
-
disabled: busy || draftInvalid === true,
|
|
5238
|
-
onClick: onConfirm,
|
|
5239
|
-
children: confirmLabel
|
|
5240
|
-
})]
|
|
5241
|
-
})
|
|
5242
|
-
]
|
|
6321
|
+
"aria-label": body.ask,
|
|
6322
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(PopConfirmBody, {
|
|
6323
|
+
...body,
|
|
6324
|
+
draftInputRef
|
|
6325
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6326
|
+
className: BranchChip_module_default.popActions,
|
|
6327
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6328
|
+
type: "button",
|
|
6329
|
+
disabled: body.busy,
|
|
6330
|
+
onClick: onCancel,
|
|
6331
|
+
children: cancelLabel
|
|
6332
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6333
|
+
ref: confirmRef,
|
|
6334
|
+
type: "button",
|
|
6335
|
+
className: danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
6336
|
+
disabled: body.busy || body.draftInvalid === true,
|
|
6337
|
+
onClick: body.onConfirm,
|
|
6338
|
+
children: confirmLabel
|
|
6339
|
+
})]
|
|
6340
|
+
})]
|
|
5243
6341
|
}), document.body);
|
|
5244
6342
|
}
|
|
5245
6343
|
/** The tool-row entry registered into conversation.input.left. */
|
|
@@ -5751,23 +6849,42 @@ window.__ModuleLoader__.load((() => {
|
|
|
5751
6849
|
const cutoutHint = cutoutDuplicate ? t("menuNewBranchExists") : cutoutIssue !== null ? t("menuNewBranchBad") : void 0;
|
|
5752
6850
|
const existingWorktree = confirm === null || confirm.kind !== "worktree" ? void 0 : facts.worktrees.find((w) => w.branch === confirmLocalName);
|
|
5753
6851
|
const removalFactsNow = confirm?.kind === "remove-worktree" && confirm.path !== void 0 && removalPath === confirm.path ? removalFacts : void 0;
|
|
5754
|
-
const removalDetails = confirm?.kind === "remove-worktree" && confirm.path !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [removalFactsNow === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
6852
|
+
const removalDetails = confirm?.kind === "remove-worktree" && confirm.path !== void 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [removalFactsNow === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
5755
6853
|
className: BranchChip_module_default.popDetail,
|
|
5756
|
-
children:
|
|
6854
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6855
|
+
className: BranchChip_module_default.popDotNeutral,
|
|
6856
|
+
"aria-hidden": "true"
|
|
6857
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("worktreeRemove.inspecting") })]
|
|
5757
6858
|
}), removalFactsNow != null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [
|
|
5758
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
5759
|
-
className:
|
|
5760
|
-
|
|
6859
|
+
(removalFactsNow.dirty ?? 0) > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6860
|
+
className: BranchChip_module_default.popDetailBanner,
|
|
6861
|
+
role: "status",
|
|
6862
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6863
|
+
className: BranchChip_module_default.popDotWarn,
|
|
6864
|
+
"aria-hidden": "true"
|
|
6865
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t((removalFactsNow.dirty ?? 0) === 1 ? "worktreeRemove.dirty.one" : "worktreeRemove.dirty.other", { n: removalFactsNow.dirty ?? 0 }) })]
|
|
6866
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
6867
|
+
className: BranchChip_module_default.popDetail,
|
|
6868
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6869
|
+
className: BranchChip_module_default.popDotSafe,
|
|
6870
|
+
"aria-hidden": "true"
|
|
6871
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("worktreeRemove.clean") })]
|
|
5761
6872
|
}),
|
|
5762
|
-
(removalFactsNow.ahead ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
6873
|
+
(removalFactsNow.ahead ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
5763
6874
|
className: BranchChip_module_default.popDetail,
|
|
5764
|
-
children:
|
|
6875
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6876
|
+
className: BranchChip_module_default.popDotNeutral,
|
|
6877
|
+
"aria-hidden": "true"
|
|
6878
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("worktreeRemove.ahead", { n: removalFactsNow.ahead ?? 0 }) })]
|
|
5765
6879
|
}),
|
|
5766
6880
|
(() => {
|
|
5767
6881
|
const count = describeWorktreeRemoval(confirm.path).archiveCount;
|
|
5768
|
-
return count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.
|
|
6882
|
+
return count > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("p", {
|
|
5769
6883
|
className: BranchChip_module_default.popDetail,
|
|
5770
|
-
children:
|
|
6884
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6885
|
+
className: BranchChip_module_default.popDotNeutral,
|
|
6886
|
+
"aria-hidden": "true"
|
|
6887
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(count === 1 ? "worktreeRemove.sessions.one" : "worktreeRemove.sessions.other", { n: count }) })]
|
|
5771
6888
|
}) : null;
|
|
5772
6889
|
})()
|
|
5773
6890
|
] })] }) : void 0;
|
|
@@ -5778,11 +6895,13 @@ window.__ModuleLoader__.load((() => {
|
|
|
5778
6895
|
* name. Remote worktree picks keep the ask line SHORT and name the
|
|
5779
6896
|
* branch on its own weight-500 line. */
|
|
5780
6897
|
const confirmBundle = confirm === null ? null : {
|
|
5781
|
-
ask: confirm.kind === "worktree-cutout" ? t("cutoutFlyAsk", { branch: confirm.branch }) : confirm.kind === "delete" ? t("deleteBranchAsk", { branch: confirm.branch }) : confirm.kind === "remove-worktree" ? t("worktreeRemove.desc"
|
|
6898
|
+
ask: confirm.kind === "worktree-cutout" ? t("cutoutFlyAsk", { branch: confirm.branch }) : confirm.kind === "delete" ? t("deleteBranchAsk", { branch: confirm.branch }) : confirm.kind === "remove-worktree" ? t("worktreeRemove.desc") : confirm.remote === true ? t("worktreeAskRemote") : t(existingWorktree !== void 0 ? "worktreeAskReuse" : "worktreeAskNew", { branch: confirmLocalName }),
|
|
5782
6899
|
...confirm.kind === "remove-worktree" ? {
|
|
5783
|
-
|
|
6900
|
+
targetBranch: confirm.branch,
|
|
6901
|
+
targetBadge: t("worktreeRemove.branchKeptBadge"),
|
|
6902
|
+
...confirm.path === void 0 ? {} : { targetPath: confirm.path },
|
|
5784
6903
|
details: removalDetails
|
|
5785
|
-
} : confirm.remote === true ?
|
|
6904
|
+
} : { targetBranch: confirm.remote === true ? confirm.branch : confirm.kind === "worktree" ? confirmLocalName : confirm.branch },
|
|
5786
6905
|
confirmLabel: busy ? confirm.kind === "delete" ? t("deleteBranchBusy") : confirm.kind === "remove-worktree" ? t("worktreeRemove.busy") : t("worktreeBusy") : t(confirm.kind === "remove-worktree" ? "worktreeRemove.menu" : "actionConfirm"),
|
|
5787
6906
|
cancelLabel: t("actionCancel"),
|
|
5788
6907
|
...confirm.kind === "delete" || confirm.kind === "remove-worktree" ? { danger: true } : {},
|
|
@@ -5881,6 +7000,11 @@ window.__ModuleLoader__.load((() => {
|
|
|
5881
7000
|
onUpdate: () => {
|
|
5882
7001
|
doUpdate();
|
|
5883
7002
|
},
|
|
7003
|
+
onCheckoutPr: () => {
|
|
7004
|
+
setConfirm(null);
|
|
7005
|
+
setMenuOpen(false);
|
|
7006
|
+
openCheckoutPr(facts.repoRoot, facts.repoName, { reuseBlankSessionId: session.blank && facts.main ? sessionId : void 0 });
|
|
7007
|
+
},
|
|
5884
7008
|
hasRemotes: repoHasRemotes(facts.branches),
|
|
5885
7009
|
onPush: (branch) => {
|
|
5886
7010
|
if (blocked()) return;
|
|
@@ -6130,99 +7254,49 @@ window.__ModuleLoader__.load((() => {
|
|
|
6130
7254
|
return user !== void 0 && Object.hasOwn(user, "rootDir");
|
|
6131
7255
|
}
|
|
6132
7256
|
/** The resolved (draft-free) text of the field; '' means inherited. */
|
|
6133
|
-
effectiveRoot() {
|
|
6134
|
-
const value = this.scope.getSnapshot().value?.[ROOT_FIELD];
|
|
6135
|
-
return typeof value === "string" ? value : "";
|
|
6136
|
-
}
|
|
6137
|
-
project() {
|
|
6138
|
-
const snapshot = this.scope.getSnapshot();
|
|
6139
|
-
const keepText = this.effectiveKeepText();
|
|
6140
|
-
const keepParsed = this.parseKeep(keepText);
|
|
6141
|
-
const copyFilesText = this.effectiveCopyFilesText();
|
|
6142
|
-
const copyFilesValid = this.parseCopyFiles(copyFilesText).every(isSafeCopyRelativePath);
|
|
6143
|
-
const keepDirty = this.keepDraft !== void 0 && this.keepDraft !== String(this.scope.getSnapshot().value?.["keepWorktrees"] ?? 30);
|
|
6144
|
-
const copyFilesDirty = this.copyFilesDraft !== void 0 && this.copyFilesDraft !== this.storedCopyFilesText();
|
|
6145
|
-
return {
|
|
6146
|
-
available: snapshot.status === "ready",
|
|
6147
|
-
writable: snapshot.writable,
|
|
6148
|
-
rootDir: this.effectiveRoot(),
|
|
6149
|
-
overridden: this.storedRoot(),
|
|
6150
|
-
dirty: keepDirty || copyFilesDirty,
|
|
6151
|
-
saving: this.saving,
|
|
6152
|
-
failed: this.failed,
|
|
6153
|
-
fetchBeforeCreate: this.scope.getSnapshot().value?.fetchBeforeCreate ?? false,
|
|
6154
|
-
openGraphByDefault: this.scope.getSnapshot().value?.openGraphByDefault ?? false,
|
|
6155
|
-
autoPruneWorktrees: this.scope.getSnapshot().value?.autoPruneWorktrees ?? false,
|
|
6156
|
-
hideOfficialWorktreeEntry: this.scope.getSnapshot().value?.hideOfficialWorktreeEntry ?? true,
|
|
6157
|
-
switchSessionDirectory: this.scope.getSnapshot().value?.switchSessionDirectory ?? false,
|
|
6158
|
-
manageOfficialWorktrees: this.scope.getSnapshot().value?.manageOfficialWorktrees ?? false,
|
|
6159
|
-
keepWorktreesText: keepText,
|
|
6160
|
-
keepWorktreesValid: keepParsed !== void 0 && keepParsed >= 1,
|
|
6161
|
-
switchFailed: this.switchFailed,
|
|
6162
|
-
postCreateCopyFilesText: copyFilesText,
|
|
6163
|
-
postCreateCopyFilesValid: copyFilesValid
|
|
6164
|
-
};
|
|
6165
|
-
}
|
|
6166
|
-
/** Replace the snapshot reference and notify, only when the fact moved. */
|
|
6167
|
-
store(next) {
|
|
6168
|
-
if (next === this.snapshotValue) return;
|
|
6169
|
-
this.snapshotValue = next;
|
|
6170
|
-
for (const listener of this.listeners) listener();
|
|
6171
|
-
}
|
|
6172
|
-
publish() {
|
|
6173
|
-
this.store(this.project());
|
|
6174
|
-
}
|
|
6175
|
-
};
|
|
6176
|
-
//#endregion
|
|
6177
|
-
//#region src/client/action-bus.ts
|
|
6178
|
-
let currentAction = null;
|
|
6179
|
-
const listeners = /* @__PURE__ */ new Set();
|
|
6180
|
-
function notify() {
|
|
6181
|
-
for (const listener of [...listeners]) listener();
|
|
6182
|
-
}
|
|
6183
|
-
/** Read the currently active overlay action, or null when idle. */
|
|
6184
|
-
function getWorktreeAction() {
|
|
6185
|
-
return currentAction;
|
|
6186
|
-
}
|
|
6187
|
-
/** Subscribe to active overlay action changes. */
|
|
6188
|
-
function subscribeWorktreeAction(listener) {
|
|
6189
|
-
listeners.add(listener);
|
|
6190
|
-
return () => {
|
|
6191
|
-
listeners.delete(listener);
|
|
6192
|
-
};
|
|
6193
|
-
}
|
|
6194
|
-
/** Open the worktree manager modal, optionally pre-scoped to one repository. */
|
|
6195
|
-
function openManageWorktrees(repoFilter) {
|
|
6196
|
-
currentAction = repoFilter === void 0 ? { kind: "manage" } : {
|
|
6197
|
-
kind: "manage",
|
|
6198
|
-
repoFilter
|
|
6199
|
-
};
|
|
6200
|
-
notify();
|
|
6201
|
-
}
|
|
6202
|
-
/** Open the create-worktree-from-branch modal for a repository workspace. */
|
|
6203
|
-
function openCreateWorktree(repoPath, repoName) {
|
|
6204
|
-
currentAction = {
|
|
6205
|
-
kind: "create",
|
|
6206
|
-
repoPath,
|
|
6207
|
-
repoName
|
|
6208
|
-
};
|
|
6209
|
-
notify();
|
|
6210
|
-
}
|
|
6211
|
-
/** Open the guarded worktree removal confirmation modal for a linked worktree path. */
|
|
6212
|
-
function openRemoveWorktree(path, branch) {
|
|
6213
|
-
currentAction = {
|
|
6214
|
-
kind: "remove",
|
|
6215
|
-
path,
|
|
6216
|
-
branch
|
|
6217
|
-
};
|
|
6218
|
-
notify();
|
|
6219
|
-
}
|
|
6220
|
-
/** Dismiss the active overlay action. */
|
|
6221
|
-
function closeWorktreeAction() {
|
|
6222
|
-
if (currentAction === null) return;
|
|
6223
|
-
currentAction = null;
|
|
6224
|
-
notify();
|
|
6225
|
-
}
|
|
7257
|
+
effectiveRoot() {
|
|
7258
|
+
const value = this.scope.getSnapshot().value?.[ROOT_FIELD];
|
|
7259
|
+
return typeof value === "string" ? value : "";
|
|
7260
|
+
}
|
|
7261
|
+
project() {
|
|
7262
|
+
const snapshot = this.scope.getSnapshot();
|
|
7263
|
+
const keepText = this.effectiveKeepText();
|
|
7264
|
+
const keepParsed = this.parseKeep(keepText);
|
|
7265
|
+
const copyFilesText = this.effectiveCopyFilesText();
|
|
7266
|
+
const copyFilesValid = this.parseCopyFiles(copyFilesText).every(isSafeCopyRelativePath);
|
|
7267
|
+
const keepDirty = this.keepDraft !== void 0 && this.keepDraft !== String(this.scope.getSnapshot().value?.["keepWorktrees"] ?? 30);
|
|
7268
|
+
const copyFilesDirty = this.copyFilesDraft !== void 0 && this.copyFilesDraft !== this.storedCopyFilesText();
|
|
7269
|
+
return {
|
|
7270
|
+
available: snapshot.status === "ready",
|
|
7271
|
+
writable: snapshot.writable,
|
|
7272
|
+
rootDir: this.effectiveRoot(),
|
|
7273
|
+
overridden: this.storedRoot(),
|
|
7274
|
+
dirty: keepDirty || copyFilesDirty,
|
|
7275
|
+
saving: this.saving,
|
|
7276
|
+
failed: this.failed,
|
|
7277
|
+
fetchBeforeCreate: this.scope.getSnapshot().value?.fetchBeforeCreate ?? false,
|
|
7278
|
+
openGraphByDefault: this.scope.getSnapshot().value?.openGraphByDefault ?? false,
|
|
7279
|
+
autoPruneWorktrees: this.scope.getSnapshot().value?.autoPruneWorktrees ?? false,
|
|
7280
|
+
hideOfficialWorktreeEntry: this.scope.getSnapshot().value?.hideOfficialWorktreeEntry ?? true,
|
|
7281
|
+
switchSessionDirectory: this.scope.getSnapshot().value?.switchSessionDirectory ?? false,
|
|
7282
|
+
manageOfficialWorktrees: this.scope.getSnapshot().value?.manageOfficialWorktrees ?? false,
|
|
7283
|
+
keepWorktreesText: keepText,
|
|
7284
|
+
keepWorktreesValid: keepParsed !== void 0 && keepParsed >= 1,
|
|
7285
|
+
switchFailed: this.switchFailed,
|
|
7286
|
+
postCreateCopyFilesText: copyFilesText,
|
|
7287
|
+
postCreateCopyFilesValid: copyFilesValid
|
|
7288
|
+
};
|
|
7289
|
+
}
|
|
7290
|
+
/** Replace the snapshot reference and notify, only when the fact moved. */
|
|
7291
|
+
store(next) {
|
|
7292
|
+
if (next === this.snapshotValue) return;
|
|
7293
|
+
this.snapshotValue = next;
|
|
7294
|
+
for (const listener of this.listeners) listener();
|
|
7295
|
+
}
|
|
7296
|
+
publish() {
|
|
7297
|
+
this.store(this.project());
|
|
7298
|
+
}
|
|
7299
|
+
};
|
|
6226
7300
|
//#endregion
|
|
6227
7301
|
//#region src/client/workspace-git-cache.ts
|
|
6228
7302
|
/** Whether cached git facts identify a linked worktree (not the main checkout). */
|
|
@@ -6323,6 +7397,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
6323
7397
|
/** Icon keys dispatched through `contextMenu.icon`. */
|
|
6324
7398
|
const CONTEXT_MENU_ICON_KEYS = {
|
|
6325
7399
|
create: "git-worktree.create",
|
|
7400
|
+
checkoutPr: "git-worktree.checkoutPr",
|
|
6326
7401
|
manage: "git-worktree.manage",
|
|
6327
7402
|
remove: "git-worktree.remove"
|
|
6328
7403
|
};
|
|
@@ -6385,25 +7460,36 @@ window.__ModuleLoader__.load((() => {
|
|
|
6385
7460
|
openRemoveWorktree(path, facts.branch);
|
|
6386
7461
|
}
|
|
6387
7462
|
}];
|
|
6388
|
-
return [
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6397
|
-
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
}
|
|
7463
|
+
return [
|
|
7464
|
+
{
|
|
7465
|
+
id: "create",
|
|
7466
|
+
label: t("contextMenu.newWorktree"),
|
|
7467
|
+
icon: { key: CONTEXT_MENU_ICON_KEYS.create },
|
|
7468
|
+
separatorBefore: true,
|
|
7469
|
+
run: () => {
|
|
7470
|
+
openCreateWorktree(path, facts.repoName);
|
|
7471
|
+
}
|
|
7472
|
+
},
|
|
7473
|
+
{
|
|
7474
|
+
id: "checkout-pr",
|
|
7475
|
+
label: t("contextMenu.checkoutPr"),
|
|
7476
|
+
icon: { key: CONTEXT_MENU_ICON_KEYS.checkoutPr },
|
|
7477
|
+
run: () => {
|
|
7478
|
+
openCheckoutPr(path, facts.repoName);
|
|
7479
|
+
}
|
|
7480
|
+
},
|
|
7481
|
+
{
|
|
7482
|
+
id: "manage",
|
|
7483
|
+
label: t("contextMenu.manageWorktrees"),
|
|
7484
|
+
icon: { key: CONTEXT_MENU_ICON_KEYS.manage },
|
|
7485
|
+
run: () => {
|
|
7486
|
+
openManageWorktrees({
|
|
7487
|
+
repoRoot: facts.repoRoot,
|
|
7488
|
+
repoName: facts.repoName
|
|
7489
|
+
});
|
|
7490
|
+
}
|
|
6405
7491
|
}
|
|
6406
|
-
|
|
7492
|
+
];
|
|
6407
7493
|
}
|
|
6408
7494
|
}),
|
|
6409
7495
|
contextMenus.register({
|
|
@@ -6532,6 +7618,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
6532
7618
|
return index < at ? "done" : "waiting";
|
|
6533
7619
|
}
|
|
6534
7620
|
function describeArmedTarget(spec, t) {
|
|
7621
|
+
if (spec.pr !== void 0) return t("deferred.armedPr", { branch: spec.branch });
|
|
6535
7622
|
if (spec.cutout) {
|
|
6536
7623
|
const explicit = spec.name?.trim();
|
|
6537
7624
|
if (explicit !== void 0 && explicit !== "") return t("deferred.armedCutout", {
|
|
@@ -6756,6 +7843,110 @@ window.__ModuleLoader__.load((() => {
|
|
|
6756
7843
|
});
|
|
6757
7844
|
}
|
|
6758
7845
|
//#endregion
|
|
7846
|
+
//#region src/client/ForgeIntegration.tsx
|
|
7847
|
+
/**
|
|
7848
|
+
* Optional slot contributions for `@deepseek-ai/dsh-experimental-client-ui-forge`:
|
|
7849
|
+
* - `ForgeCardCheckoutButton` mounts on `forge.change-request.card.actions`
|
|
7850
|
+
* - `ForgeDiffToolbarCheckoutButton` mounts on `forge.changes.toolbar`
|
|
7851
|
+
*
|
|
7852
|
+
* When `client-ui-forge` is not enabled on the host, `ctx.slots.inject` simply waits
|
|
7853
|
+
* without rendering anything or adding runtime dependencies.
|
|
7854
|
+
*/
|
|
7855
|
+
function prBranchFromUrl(url) {
|
|
7856
|
+
try {
|
|
7857
|
+
const parsed = new URL(url.trim());
|
|
7858
|
+
const gl = /^\/.+?(?:\/-)?\/merge_requests\/(\d+)(?:\/.*)?$/i.exec(parsed.pathname);
|
|
7859
|
+
if (gl !== null && gl[1] !== void 0) return `gitlab-mr-${gl[1]}`;
|
|
7860
|
+
const gh = /^\/[^/]+\/[^/]+\/pull\/(\d+)(?:\/.*)?$/i.exec(parsed.pathname);
|
|
7861
|
+
if (gh !== null && gh[1] !== void 0) return `github-pr-${gh[1]}`;
|
|
7862
|
+
return null;
|
|
7863
|
+
} catch {
|
|
7864
|
+
return null;
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
function useRepoTarget(sessionId, gitCache, resolveSessionPath) {
|
|
7868
|
+
(0, react.useSyncExternalStore)((listener) => gitCache.subscribe(listener), () => gitCache.getSnapshot(), () => gitCache.getSnapshot());
|
|
7869
|
+
const cwd = sessionId === void 0 ? void 0 : resolveSessionPath(sessionId);
|
|
7870
|
+
const facts = cwd === void 0 ? void 0 : gitCache.get(cwd);
|
|
7871
|
+
(0, react.useEffect)(() => {
|
|
7872
|
+
if (cwd !== void 0 && facts === void 0) gitCache.syncPaths([cwd]);
|
|
7873
|
+
}, [
|
|
7874
|
+
cwd,
|
|
7875
|
+
facts,
|
|
7876
|
+
gitCache
|
|
7877
|
+
]);
|
|
7878
|
+
if (facts === void 0 || facts === null) return null;
|
|
7879
|
+
return {
|
|
7880
|
+
repoRoot: facts.repoRoot,
|
|
7881
|
+
repoName: facts.repoName,
|
|
7882
|
+
branch: facts.branch,
|
|
7883
|
+
main: facts.main
|
|
7884
|
+
};
|
|
7885
|
+
}
|
|
7886
|
+
function isInTargetPrWorktree(repo, url) {
|
|
7887
|
+
if (repo.main || repo.branch === null) return false;
|
|
7888
|
+
const expected = prBranchFromUrl(url);
|
|
7889
|
+
return expected !== null && repo.branch === expected;
|
|
7890
|
+
}
|
|
7891
|
+
/** Icon button added to the Forge change-request card header (`forge.change-request.card.actions`). */
|
|
7892
|
+
function ForgeCardCheckoutButton({ sessionId, url, gitCache, resolveSessionPath, t }) {
|
|
7893
|
+
const repo = useRepoTarget(sessionId, gitCache, resolveSessionPath);
|
|
7894
|
+
if (repo === null) return null;
|
|
7895
|
+
const inPrWorktree = isInTargetPrWorktree(repo, url);
|
|
7896
|
+
const label = inPrWorktree ? t("forgeSlot.syncTooltip") : t("forgeSlot.checkoutTooltip");
|
|
7897
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
7898
|
+
label,
|
|
7899
|
+
side: "top",
|
|
7900
|
+
delayMs: 500,
|
|
7901
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7902
|
+
size: "sm",
|
|
7903
|
+
variant: "ghost",
|
|
7904
|
+
"aria-label": label,
|
|
7905
|
+
onClick: (event) => {
|
|
7906
|
+
event.stopPropagation();
|
|
7907
|
+
openCheckoutPr(repo.repoRoot, repo.repoName, {
|
|
7908
|
+
initialInput: url,
|
|
7909
|
+
...inPrWorktree ? { initialIfExists: "update" } : {}
|
|
7910
|
+
});
|
|
7911
|
+
},
|
|
7912
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrCheckoutGlyph, { size: 14 })
|
|
7913
|
+
})
|
|
7914
|
+
});
|
|
7915
|
+
}
|
|
7916
|
+
/** Toolbar/menu entry added to the Forge right-sidebar PR diff view (`forge.changes.toolbar`). */
|
|
7917
|
+
function ForgeDiffToolbarCheckoutButton({ target, form, close, gitCache, resolveSessionPath, t }) {
|
|
7918
|
+
const repo = useRepoTarget(target.source.kind === "change" ? target.sessionId : void 0, gitCache, resolveSessionPath);
|
|
7919
|
+
if (target.source.kind !== "change" || repo === null) return null;
|
|
7920
|
+
const prUrl = target.source.url;
|
|
7921
|
+
const inPrWorktree = isInTargetPrWorktree(repo, prUrl);
|
|
7922
|
+
const tooltip = inPrWorktree ? t("forgeSlot.syncTooltip") : t("forgeSlot.checkoutTooltip");
|
|
7923
|
+
const label = inPrWorktree ? t("forgeSlot.syncLabel") : t("forgeSlot.checkoutLabel");
|
|
7924
|
+
const launch = () => {
|
|
7925
|
+
close();
|
|
7926
|
+
openCheckoutPr(repo.repoRoot, repo.repoName, {
|
|
7927
|
+
initialInput: prUrl,
|
|
7928
|
+
...inPrWorktree ? { initialIfExists: "update" } : {}
|
|
7929
|
+
});
|
|
7930
|
+
};
|
|
7931
|
+
if (form === "menu") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.MenuItemButton, {
|
|
7932
|
+
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrCheckoutGlyph, { size: 14 }),
|
|
7933
|
+
onSelect: launch,
|
|
7934
|
+
children: label
|
|
7935
|
+
});
|
|
7936
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tooltip, {
|
|
7937
|
+
label: tooltip,
|
|
7938
|
+
side: "bottom",
|
|
7939
|
+
delayMs: 500,
|
|
7940
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7941
|
+
size: "sm",
|
|
7942
|
+
variant: "ghost",
|
|
7943
|
+
"aria-label": tooltip,
|
|
7944
|
+
onClick: launch,
|
|
7945
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(PrCheckoutGlyph, { size: 14 })
|
|
7946
|
+
})
|
|
7947
|
+
});
|
|
7948
|
+
}
|
|
7949
|
+
//#endregion
|
|
6759
7950
|
//#region src/client/prune-history.ts
|
|
6760
7951
|
const KEY = "git-worktree:prune-history";
|
|
6761
7952
|
/** The log is a recent-activity trail, not an archive: the oldest runs fall
|
|
@@ -6940,6 +8131,141 @@ window.__ModuleLoader__.load((() => {
|
|
|
6940
8131
|
}] : groups;
|
|
6941
8132
|
}
|
|
6942
8133
|
//#endregion
|
|
8134
|
+
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/RemoveConfirmModal.module.css?inline
|
|
8135
|
+
var RemoveConfirmModal_module_default = {
|
|
8136
|
+
"dialog": "dialog_316074196",
|
|
8137
|
+
"body": "body_316074196",
|
|
8138
|
+
"targetCard": "targetCard_316074196",
|
|
8139
|
+
"branchRow": "branchRow_316074196",
|
|
8140
|
+
"branchIcon": "branchIcon_316074196",
|
|
8141
|
+
"branchName": "branchName_316074196",
|
|
8142
|
+
"targetPath": "targetPath_316074196",
|
|
8143
|
+
"facts": "facts_316074196",
|
|
8144
|
+
"factRow": "factRow_316074196",
|
|
8145
|
+
"dotNeutral": "dotNeutral_316074196",
|
|
8146
|
+
"dotSafe": "dotSafe_316074196",
|
|
8147
|
+
"warnBanner": "warnBanner_316074196",
|
|
8148
|
+
"dotWarn": "dotWarn_316074196",
|
|
8149
|
+
"status": "status_316074196",
|
|
8150
|
+
"error": "error_316074196",
|
|
8151
|
+
"dangerButton": "dangerButton_316074196"
|
|
8152
|
+
};
|
|
8153
|
+
//#endregion
|
|
8154
|
+
//#region src/client/RemoveConfirmModal.tsx
|
|
8155
|
+
/**
|
|
8156
|
+
* Shared confirmation modal for removing a linked git worktree or purging an
|
|
8157
|
+
* orphaned folder from disk, used by both WorktreeActionHost and WorktreeManagerModal.
|
|
8158
|
+
*/
|
|
8159
|
+
/** Structured remove/purge confirmation dialog separating path identity from risk indicators. */
|
|
8160
|
+
function RemoveConfirmModal({ open, kind, path, branch, running = false, inspect, inspectError = null, archiveCount, removing, removeError, onConfirm, onClose, t }) {
|
|
8161
|
+
const isOrphan = kind === "orphan";
|
|
8162
|
+
const title = t(isOrphan ? "worktreePurge.title" : "worktreeRemove.title");
|
|
8163
|
+
const description = t(isOrphan ? "worktreePurge.desc" : "worktreeRemove.desc");
|
|
8164
|
+
const confirmLabel = removing ? t(isOrphan ? "worktreePurge.busy" : "worktreeRemove.busy") : t(isOrphan ? "manager.purgeMenu" : "worktreeRemove.menu");
|
|
8165
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
8166
|
+
open,
|
|
8167
|
+
onClose,
|
|
8168
|
+
closeLabel: t("close"),
|
|
8169
|
+
title,
|
|
8170
|
+
description,
|
|
8171
|
+
className: RemoveConfirmModal_module_default.dialog ?? "",
|
|
8172
|
+
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8173
|
+
variant: "outline",
|
|
8174
|
+
disabled: removing,
|
|
8175
|
+
onClick: onClose,
|
|
8176
|
+
children: t("cancel")
|
|
8177
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8178
|
+
variant: "outline",
|
|
8179
|
+
className: RemoveConfirmModal_module_default.dangerButton,
|
|
8180
|
+
disabled: removing || running,
|
|
8181
|
+
onClick: onConfirm,
|
|
8182
|
+
children: confirmLabel
|
|
8183
|
+
})] }),
|
|
8184
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8185
|
+
className: RemoveConfirmModal_module_default.body,
|
|
8186
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8187
|
+
className: RemoveConfirmModal_module_default.targetCard,
|
|
8188
|
+
children: [!isOrphan && branch !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8189
|
+
className: RemoveConfirmModal_module_default.branchRow,
|
|
8190
|
+
children: [
|
|
8191
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8192
|
+
className: RemoveConfirmModal_module_default.branchIcon,
|
|
8193
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, { size: 14 })
|
|
8194
|
+
}),
|
|
8195
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8196
|
+
className: RemoveConfirmModal_module_default.branchName,
|
|
8197
|
+
title: branch,
|
|
8198
|
+
children: branch
|
|
8199
|
+
}),
|
|
8200
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
8201
|
+
tone: "neutral",
|
|
8202
|
+
children: t("worktreeRemove.branchKeptBadge")
|
|
8203
|
+
})
|
|
8204
|
+
]
|
|
8205
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8206
|
+
className: RemoveConfirmModal_module_default.targetPath,
|
|
8207
|
+
title: path,
|
|
8208
|
+
children: path
|
|
8209
|
+
})]
|
|
8210
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8211
|
+
className: RemoveConfirmModal_module_default.facts,
|
|
8212
|
+
children: [
|
|
8213
|
+
!isOrphan && running && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8214
|
+
className: RemoveConfirmModal_module_default.warnBanner,
|
|
8215
|
+
role: "alert",
|
|
8216
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8217
|
+
className: RemoveConfirmModal_module_default.dotWarn,
|
|
8218
|
+
"aria-hidden": "true"
|
|
8219
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("manager.running") })]
|
|
8220
|
+
}),
|
|
8221
|
+
!isOrphan && inspect === void 0 && inspectError === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8222
|
+
className: RemoveConfirmModal_module_default.status,
|
|
8223
|
+
role: "status",
|
|
8224
|
+
children: t("worktreeRemove.inspecting")
|
|
8225
|
+
}),
|
|
8226
|
+
!isOrphan && inspect !== void 0 && inspect !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [inspect.dirty > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8227
|
+
className: RemoveConfirmModal_module_default.warnBanner,
|
|
8228
|
+
role: "alert",
|
|
8229
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8230
|
+
className: RemoveConfirmModal_module_default.dotWarn,
|
|
8231
|
+
"aria-hidden": "true"
|
|
8232
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(inspect.dirty === 1 ? "worktreeRemove.dirty.one" : "worktreeRemove.dirty.other", { n: inspect.dirty }) })]
|
|
8233
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8234
|
+
className: RemoveConfirmModal_module_default.factRow,
|
|
8235
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8236
|
+
className: RemoveConfirmModal_module_default.dotSafe,
|
|
8237
|
+
"aria-hidden": "true"
|
|
8238
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("worktreeRemove.clean") })]
|
|
8239
|
+
}), inspect.ahead !== void 0 && inspect.ahead > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8240
|
+
className: RemoveConfirmModal_module_default.factRow,
|
|
8241
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8242
|
+
className: RemoveConfirmModal_module_default.dotNeutral,
|
|
8243
|
+
"aria-hidden": "true"
|
|
8244
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("worktreeRemove.ahead", { n: inspect.ahead }) })]
|
|
8245
|
+
})] }),
|
|
8246
|
+
!isOrphan && inspectError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8247
|
+
className: RemoveConfirmModal_module_default.error,
|
|
8248
|
+
role: "alert",
|
|
8249
|
+
children: inspectError
|
|
8250
|
+
}),
|
|
8251
|
+
archiveCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8252
|
+
className: RemoveConfirmModal_module_default.factRow,
|
|
8253
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8254
|
+
className: RemoveConfirmModal_module_default.dotNeutral,
|
|
8255
|
+
"aria-hidden": "true"
|
|
8256
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(archiveCount === 1 ? "worktreeRemove.sessions.one" : "worktreeRemove.sessions.other", { n: archiveCount }) })]
|
|
8257
|
+
}),
|
|
8258
|
+
removeError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8259
|
+
className: RemoveConfirmModal_module_default.error,
|
|
8260
|
+
role: "alert",
|
|
8261
|
+
children: removeError
|
|
8262
|
+
})
|
|
8263
|
+
]
|
|
8264
|
+
})]
|
|
8265
|
+
})
|
|
8266
|
+
});
|
|
8267
|
+
}
|
|
8268
|
+
//#endregion
|
|
6943
8269
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/WorktreeManagerModal.module.css?inline
|
|
6944
8270
|
var WorktreeManagerModal_module_default = {
|
|
6945
8271
|
"dialog": "dialog_854325390",
|
|
@@ -6967,15 +8293,12 @@ window.__ModuleLoader__.load((() => {
|
|
|
6967
8293
|
"rowHead": "rowHead_854325390",
|
|
6968
8294
|
"rowBranch": "rowBranch_854325390",
|
|
6969
8295
|
"rowDirty": "rowDirty_854325390",
|
|
8296
|
+
"rowDirtyDot": "rowDirtyDot_854325390",
|
|
6970
8297
|
"rowActivity": "rowActivity_854325390",
|
|
6971
8298
|
"rowPath": "rowPath_854325390",
|
|
6972
8299
|
"rowActions": "rowActions_854325390",
|
|
6973
8300
|
"rowAction": "rowAction_854325390",
|
|
6974
|
-
"remove": "remove_854325390"
|
|
6975
|
-
"removeConfirm": "removeConfirm_854325390",
|
|
6976
|
-
"removeFacts": "removeFacts_854325390",
|
|
6977
|
-
"removeFact": "removeFact_854325390",
|
|
6978
|
-
"removeFactWarn": "removeFactWarn_854325390"
|
|
8301
|
+
"remove": "remove_854325390"
|
|
6979
8302
|
};
|
|
6980
8303
|
//#endregion
|
|
6981
8304
|
//#region src/client/WorktreeManagerModal.tsx
|
|
@@ -7290,10 +8613,17 @@ window.__ModuleLoader__.load((() => {
|
|
|
7290
8613
|
tone: "neutral",
|
|
7291
8614
|
children: t("manager.modeSession")
|
|
7292
8615
|
}),
|
|
7293
|
-
|
|
8616
|
+
running && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
8617
|
+
tone: "info",
|
|
8618
|
+
children: t("manager.runningBadge")
|
|
8619
|
+
}),
|
|
8620
|
+
!unknown && dirty > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7294
8621
|
className: WorktreeManagerModal_module_default.rowDirty,
|
|
7295
8622
|
role: "status",
|
|
7296
|
-
children:
|
|
8623
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8624
|
+
className: WorktreeManagerModal_module_default.rowDirtyDot,
|
|
8625
|
+
"aria-hidden": "true"
|
|
8626
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t(dirty === 1 ? "manager.dirty.one" : "manager.dirty.other", { n: dirty }) })]
|
|
7297
8627
|
}),
|
|
7298
8628
|
!unknown && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7299
8629
|
className: WorktreeManagerModal_module_default.rowActivity,
|
|
@@ -7368,69 +8698,21 @@ window.__ModuleLoader__.load((() => {
|
|
|
7368
8698
|
]
|
|
7369
8699
|
})
|
|
7370
8700
|
]
|
|
7371
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.
|
|
8701
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RemoveConfirmModal, {
|
|
7372
8702
|
open: removeTarget !== null,
|
|
8703
|
+
kind: removeTarget?.kind === "orphan" ? "orphan" : "git",
|
|
8704
|
+
path: removeTarget?.path ?? "",
|
|
8705
|
+
branch: removeTarget?.kind === "git" ? removeTarget.branch : null,
|
|
8706
|
+
inspect: removeTarget?.kind === "git" ? inspects[removeTarget.path] : void 0,
|
|
8707
|
+
archiveCount: removeTarget === null ? 0 : face.describeWorktreeOwnership !== void 0 ? face.describeWorktreeOwnership(removeTarget.path).archiveIds.length : (() => {
|
|
8708
|
+
const workspace = workspaceAt(removeTarget.path);
|
|
8709
|
+
return workspace === void 0 ? 0 : archiveIdsFor(face, workspace.sessionIds).length;
|
|
8710
|
+
})(),
|
|
8711
|
+
removing,
|
|
8712
|
+
removeError,
|
|
8713
|
+
onConfirm: confirmRemove,
|
|
7373
8714
|
onClose: closeRemove,
|
|
7374
|
-
|
|
7375
|
-
title: removeTarget?.kind === "orphan" ? t("worktreePurge.title") : t("worktreeRemove.title"),
|
|
7376
|
-
...removeTarget === null ? {} : { description: t(removeTarget.kind === "orphan" ? "worktreePurge.desc" : "worktreeRemove.desc", { path: removeTarget.path }) },
|
|
7377
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7378
|
-
variant: "outline",
|
|
7379
|
-
disabled: removing,
|
|
7380
|
-
onClick: closeRemove,
|
|
7381
|
-
children: t("cancel")
|
|
7382
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
7383
|
-
variant: "outline",
|
|
7384
|
-
className: WorktreeManagerModal_module_default.removeConfirm,
|
|
7385
|
-
disabled: removing,
|
|
7386
|
-
onClick: confirmRemove,
|
|
7387
|
-
children: removeTarget?.kind === "orphan" ? t("manager.purgeMenu") : t("worktreeRemove.menu")
|
|
7388
|
-
})] }),
|
|
7389
|
-
children: [
|
|
7390
|
-
removeTarget?.kind === "git" && removeTarget.branch !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7391
|
-
className: WorktreeManagerModal_module_default.removeFact,
|
|
7392
|
-
children: t("worktreeRemove.descBranch", { branch: removeTarget.branch })
|
|
7393
|
-
}),
|
|
7394
|
-
removeTarget?.kind === "git" && inspects[removeTarget.path] === void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7395
|
-
className: WorktreeManagerModal_module_default.status,
|
|
7396
|
-
role: "status",
|
|
7397
|
-
children: t("worktreeRemove.inspecting")
|
|
7398
|
-
}),
|
|
7399
|
-
removeTarget?.kind === "git" && inspects[removeTarget.path] !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7400
|
-
className: WorktreeManagerModal_module_default.removeFacts,
|
|
7401
|
-
children: [
|
|
7402
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7403
|
-
className: (inspects[removeTarget.path]?.dirty ?? 0) > 0 ? `${WorktreeManagerModal_module_default.removeFact} ${WorktreeManagerModal_module_default.removeFactWarn}` : WorktreeManagerModal_module_default.removeFact,
|
|
7404
|
-
children: (inspects[removeTarget.path]?.dirty ?? 0) > 0 ? t((inspects[removeTarget.path]?.dirty ?? 0) === 1 ? "worktreeRemove.dirty.one" : "worktreeRemove.dirty.other", { n: inspects[removeTarget.path]?.dirty ?? 0 }) : t("worktreeRemove.clean")
|
|
7405
|
-
}),
|
|
7406
|
-
removeTarget !== null && inspects[removeTarget.path]?.ahead !== void 0 && (inspects[removeTarget.path]?.ahead ?? 0) > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7407
|
-
className: WorktreeManagerModal_module_default.removeFact,
|
|
7408
|
-
children: t("worktreeRemove.ahead", { n: inspects[removeTarget.path]?.ahead ?? 0 })
|
|
7409
|
-
}),
|
|
7410
|
-
removeTarget !== null && (() => {
|
|
7411
|
-
const ids = face.describeWorktreeOwnership !== void 0 ? face.describeWorktreeOwnership(removeTarget.path).archiveIds : (() => {
|
|
7412
|
-
const workspace = workspaceAt(removeTarget.path);
|
|
7413
|
-
return workspace === void 0 ? [] : archiveIdsFor(face, workspace.sessionIds);
|
|
7414
|
-
})();
|
|
7415
|
-
if (ids.length === 0) return null;
|
|
7416
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7417
|
-
className: WorktreeManagerModal_module_default.removeFact,
|
|
7418
|
-
children: t(ids.length === 1 ? "worktreeRemove.sessions.one" : "worktreeRemove.sessions.other", { n: ids.length })
|
|
7419
|
-
});
|
|
7420
|
-
})()
|
|
7421
|
-
]
|
|
7422
|
-
}),
|
|
7423
|
-
removing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7424
|
-
className: WorktreeManagerModal_module_default.status,
|
|
7425
|
-
role: "status",
|
|
7426
|
-
children: removeTarget?.kind === "orphan" ? t("worktreePurge.busy") : t("worktreeRemove.busy")
|
|
7427
|
-
}),
|
|
7428
|
-
removeError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
7429
|
-
className: WorktreeManagerModal_module_default.error,
|
|
7430
|
-
role: "alert",
|
|
7431
|
-
children: removeError
|
|
7432
|
-
})
|
|
7433
|
-
]
|
|
8715
|
+
t
|
|
7434
8716
|
})] });
|
|
7435
8717
|
}
|
|
7436
8718
|
//#endregion
|
|
@@ -7439,6 +8721,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
7439
8721
|
"summary": "summary_1463286416",
|
|
7440
8722
|
"page": "page_1463286416",
|
|
7441
8723
|
"note": "note_1463286416",
|
|
8724
|
+
"sectionTitle": "sectionTitle_1463286416",
|
|
7442
8725
|
"field": "field_1463286416",
|
|
7443
8726
|
"fieldLabel": "fieldLabel_1463286416",
|
|
7444
8727
|
"rootRow": "rootRow_1463286416",
|
|
@@ -7465,6 +8748,10 @@ window.__ModuleLoader__.load((() => {
|
|
|
7465
8748
|
"historyRun": "historyRun_1463286416",
|
|
7466
8749
|
"historyTime": "historyTime_1463286416",
|
|
7467
8750
|
"historyLine": "historyLine_1463286416",
|
|
8751
|
+
"historyChips": "historyChips_1463286416",
|
|
8752
|
+
"historyChip": "historyChip_1463286416",
|
|
8753
|
+
"historySkipped": "historySkipped_1463286416",
|
|
8754
|
+
"historyFailed": "historyFailed_1463286416",
|
|
7468
8755
|
"historyMore": "historyMore_1463286416"
|
|
7469
8756
|
};
|
|
7470
8757
|
//#endregion
|
|
@@ -7539,6 +8826,10 @@ window.__ModuleLoader__.load((() => {
|
|
|
7539
8826
|
role: "status",
|
|
7540
8827
|
children: t("cardReadOnly")
|
|
7541
8828
|
}) : null,
|
|
8829
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8830
|
+
className: GitWorktreeCard_module_default.sectionTitle,
|
|
8831
|
+
children: t("cardSectionEntry")
|
|
8832
|
+
}),
|
|
7542
8833
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7543
8834
|
className: GitWorktreeCard_module_default.field,
|
|
7544
8835
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -7546,19 +8837,26 @@ window.__ModuleLoader__.load((() => {
|
|
|
7546
8837
|
children: t("cardRootDirLabel")
|
|
7547
8838
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
7548
8839
|
className: GitWorktreeCard_module_default.rootRow,
|
|
7549
|
-
children: [
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7553
|
-
|
|
7554
|
-
|
|
7555
|
-
|
|
7556
|
-
|
|
8840
|
+
children: [
|
|
8841
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
8842
|
+
className: GitWorktreeCard_module_default.rootValue,
|
|
8843
|
+
title: legacyRootText,
|
|
8844
|
+
children: legacyRootText
|
|
8845
|
+
}),
|
|
8846
|
+
state.overridden && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
8847
|
+
tone: "info",
|
|
8848
|
+
children: t("cardOverridden").replace(/^[((]|[))]$/g, "")
|
|
8849
|
+
}),
|
|
8850
|
+
storage !== null && !storage.legacyRootExists && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
8851
|
+
tone: "neutral",
|
|
8852
|
+
children: t("cardLegacyUnused")
|
|
8853
|
+
})
|
|
8854
|
+
]
|
|
7557
8855
|
})]
|
|
7558
8856
|
}),
|
|
7559
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
8857
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
7560
8858
|
className: GitWorktreeCard_module_default.hint,
|
|
7561
|
-
children:
|
|
8859
|
+
children: t("cardRootDirHint")
|
|
7562
8860
|
}),
|
|
7563
8861
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7564
8862
|
className: `${GitWorktreeCard_module_default.field} ${GitWorktreeCard_module_default.toggleRow}`,
|
|
@@ -7696,6 +8994,10 @@ window.__ModuleLoader__.load((() => {
|
|
|
7696
8994
|
children: t("cardManageWorktrees")
|
|
7697
8995
|
})]
|
|
7698
8996
|
}),
|
|
8997
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8998
|
+
className: GitWorktreeCard_module_default.sectionTitle,
|
|
8999
|
+
children: t("cardSectionAutomation")
|
|
9000
|
+
}),
|
|
7699
9001
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
7700
9002
|
className: `${GitWorktreeCard_module_default.field} ${GitWorktreeCard_module_default.toggleRow}`,
|
|
7701
9003
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
@@ -7833,19 +9135,22 @@ window.__ModuleLoader__.load((() => {
|
|
|
7833
9135
|
className: GitWorktreeCard_module_default.historyTime,
|
|
7834
9136
|
children: timeLabel(run.at, historyNow, t)
|
|
7835
9137
|
}),
|
|
7836
|
-
run.removed.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
7837
|
-
className: GitWorktreeCard_module_default.
|
|
7838
|
-
children: [t("cardPruneHistoryRun", { n: run.removed.length }), run.removed.map((item) =>
|
|
9138
|
+
run.removed.length > 0 ? /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9139
|
+
className: GitWorktreeCard_module_default.historyChips,
|
|
9140
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("cardPruneHistoryRun", { n: run.removed.length }) }), run.removed.map((item, idx) => /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9141
|
+
className: GitWorktreeCard_module_default.historyChip,
|
|
9142
|
+
children: labelOfRemoved(item)
|
|
9143
|
+
}, `${labelOfRemoved(item)}:${idx}`))]
|
|
7839
9144
|
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7840
9145
|
className: GitWorktreeCard_module_default.historyLine,
|
|
7841
9146
|
children: t("cardPruneHistoryNone")
|
|
7842
9147
|
}),
|
|
7843
9148
|
run.skippedDirty.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7844
|
-
className: GitWorktreeCard_module_default.historyLine
|
|
9149
|
+
className: `${GitWorktreeCard_module_default.historyLine} ${GitWorktreeCard_module_default.historySkipped}`,
|
|
7845
9150
|
children: t("cardPruneHistorySkipped", { n: run.skippedDirty.length })
|
|
7846
9151
|
}),
|
|
7847
9152
|
run.failed.length > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
7848
|
-
className: GitWorktreeCard_module_default.historyLine
|
|
9153
|
+
className: `${GitWorktreeCard_module_default.historyLine} ${GitWorktreeCard_module_default.historyFailed}`,
|
|
7849
9154
|
children: t("cardPruneHistoryFailed", { n: run.failed.length })
|
|
7850
9155
|
})
|
|
7851
9156
|
]
|
|
@@ -7998,7 +9303,9 @@ window.__ModuleLoader__.load((() => {
|
|
|
7998
9303
|
function SidebarWorktreeHover({ sessionId, gitCache, resolveSessionPath, sessionsObservable, shouldDecorateSession, t }) {
|
|
7999
9304
|
const facts = useLinkedWorktreeFacts(sessionId, gitCache, resolveSessionPath, sessionsObservable, shouldDecorateSession);
|
|
8000
9305
|
if (facts === null) return null;
|
|
8001
|
-
const
|
|
9306
|
+
const baseLabel = facts.baseBranch !== void 0 && facts.baseBranch !== "" && facts.baseBranch !== facts.branch ? facts.baseBranch : void 0;
|
|
9307
|
+
const isPrLabel = baseLabel !== void 0 && /^(?:PR #\d+|MR !\d+)/.test(baseLabel);
|
|
9308
|
+
const note = baseLabel === void 0 ? t("sidebar.worktreeHoverLabel") : isPrLabel ? t("sidebar.worktreeHoverPr", { label: baseLabel }) : t("sidebar.worktreeHoverFrom", { base: baseLabel });
|
|
8002
9309
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8003
9310
|
className: SidebarWorktreeBadge_module_default.hoverItem,
|
|
8004
9311
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -8028,13 +9335,13 @@ window.__ModuleLoader__.load((() => {
|
|
|
8028
9335
|
"cutoutRow": "cutoutRow_1401658256",
|
|
8029
9336
|
"branchIcon": "branchIcon_1401658256",
|
|
8030
9337
|
"branchName": "branchName_1401658256",
|
|
9338
|
+
"targetCard": "targetCard_1401658256",
|
|
9339
|
+
"targetLabel": "targetLabel_1401658256",
|
|
9340
|
+
"targetBranch": "targetBranch_1401658256",
|
|
9341
|
+
"hint": "hint_1401658256",
|
|
8031
9342
|
"status": "status_1401658256",
|
|
8032
9343
|
"empty": "empty_1401658256",
|
|
8033
|
-
"error": "error_1401658256"
|
|
8034
|
-
"removeFacts": "removeFacts_1401658256",
|
|
8035
|
-
"removeFact": "removeFact_1401658256",
|
|
8036
|
-
"removeFactWarn": "removeFactWarn_1401658256",
|
|
8037
|
-
"removeConfirm": "removeConfirm_1401658256"
|
|
9344
|
+
"error": "error_1401658256"
|
|
8038
9345
|
};
|
|
8039
9346
|
//#endregion
|
|
8040
9347
|
//#region src/client/WorktreeActionHost.tsx
|
|
@@ -8093,69 +9400,20 @@ window.__ModuleLoader__.load((() => {
|
|
|
8093
9400
|
setRemoveError(reason instanceof Error ? reason.message : String(reason));
|
|
8094
9401
|
});
|
|
8095
9402
|
};
|
|
8096
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
9403
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(RemoveConfirmModal, {
|
|
8097
9404
|
open: true,
|
|
9405
|
+
kind: "git",
|
|
9406
|
+
path,
|
|
9407
|
+
branch,
|
|
9408
|
+
running: facts.running,
|
|
9409
|
+
inspect: inspectError === null ? inspect ?? void 0 : null,
|
|
9410
|
+
inspectError,
|
|
9411
|
+
archiveCount: facts.archiveCount,
|
|
9412
|
+
removing,
|
|
9413
|
+
removeError,
|
|
9414
|
+
onConfirm: handleConfirm,
|
|
8098
9415
|
onClose: handleClose,
|
|
8099
|
-
|
|
8100
|
-
title: t("worktreeRemove.title"),
|
|
8101
|
-
description: t("worktreeRemove.desc", { path }),
|
|
8102
|
-
footer: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8103
|
-
variant: "outline",
|
|
8104
|
-
disabled: removing,
|
|
8105
|
-
onClick: handleClose,
|
|
8106
|
-
children: t("cancel")
|
|
8107
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
8108
|
-
variant: "outline",
|
|
8109
|
-
className: WorktreeActionHost_module_default.removeConfirm,
|
|
8110
|
-
disabled: removing || facts.running,
|
|
8111
|
-
onClick: handleConfirm,
|
|
8112
|
-
children: t("worktreeRemove.menu")
|
|
8113
|
-
})] }),
|
|
8114
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8115
|
-
className: WorktreeActionHost_module_default.removeFacts,
|
|
8116
|
-
children: [
|
|
8117
|
-
branch !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8118
|
-
className: WorktreeActionHost_module_default.removeFact,
|
|
8119
|
-
children: t("worktreeRemove.descBranch", { branch })
|
|
8120
|
-
}),
|
|
8121
|
-
facts.running && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8122
|
-
className: `${WorktreeActionHost_module_default.removeFact} ${WorktreeActionHost_module_default.removeFactWarn}`,
|
|
8123
|
-
role: "alert",
|
|
8124
|
-
children: t("manager.running")
|
|
8125
|
-
}),
|
|
8126
|
-
inspect === null && inspectError === null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8127
|
-
className: WorktreeActionHost_module_default.status,
|
|
8128
|
-
role: "status",
|
|
8129
|
-
children: t("worktreeRemove.inspecting")
|
|
8130
|
-
}),
|
|
8131
|
-
inspect !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8132
|
-
className: inspect.dirty > 0 ? `${WorktreeActionHost_module_default.removeFact} ${WorktreeActionHost_module_default.removeFactWarn}` : WorktreeActionHost_module_default.removeFact,
|
|
8133
|
-
children: inspect.dirty > 0 ? t(inspect.dirty === 1 ? "worktreeRemove.dirty.one" : "worktreeRemove.dirty.other", { n: inspect.dirty }) : t("worktreeRemove.clean")
|
|
8134
|
-
}), inspect.ahead !== void 0 && inspect.ahead > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8135
|
-
className: WorktreeActionHost_module_default.removeFact,
|
|
8136
|
-
children: t("worktreeRemove.ahead", { n: inspect.ahead })
|
|
8137
|
-
})] }),
|
|
8138
|
-
inspectError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8139
|
-
className: WorktreeActionHost_module_default.error,
|
|
8140
|
-
role: "alert",
|
|
8141
|
-
children: inspectError
|
|
8142
|
-
}),
|
|
8143
|
-
facts.archiveCount > 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8144
|
-
className: WorktreeActionHost_module_default.removeFact,
|
|
8145
|
-
children: t(facts.archiveCount === 1 ? "worktreeRemove.sessions.one" : "worktreeRemove.sessions.other", { n: facts.archiveCount })
|
|
8146
|
-
}),
|
|
8147
|
-
removing && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8148
|
-
className: WorktreeActionHost_module_default.status,
|
|
8149
|
-
role: "status",
|
|
8150
|
-
children: t("worktreeRemove.busy")
|
|
8151
|
-
}),
|
|
8152
|
-
removeError !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8153
|
-
className: WorktreeActionHost_module_default.error,
|
|
8154
|
-
role: "alert",
|
|
8155
|
-
children: removeError
|
|
8156
|
-
})
|
|
8157
|
-
]
|
|
8158
|
-
})
|
|
9416
|
+
t
|
|
8159
9417
|
});
|
|
8160
9418
|
}
|
|
8161
9419
|
/**
|
|
@@ -8475,6 +9733,21 @@ window.__ModuleLoader__.load((() => {
|
|
|
8475
9733
|
children: /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
8476
9734
|
className: WorktreeActionHost_module_default.body,
|
|
8477
9735
|
children: [
|
|
9736
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
9737
|
+
className: WorktreeActionHost_module_default.targetCard,
|
|
9738
|
+
children: [
|
|
9739
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular, { size: 14 }),
|
|
9740
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9741
|
+
className: WorktreeActionHost_module_default.targetLabel,
|
|
9742
|
+
children: t("createModal.baseBranchLabel")
|
|
9743
|
+
}),
|
|
9744
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
9745
|
+
className: WorktreeActionHost_module_default.targetBranch,
|
|
9746
|
+
title: cutoutBase,
|
|
9747
|
+
children: cutoutBase
|
|
9748
|
+
})
|
|
9749
|
+
]
|
|
9750
|
+
}),
|
|
8478
9751
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("input", {
|
|
8479
9752
|
ref: cutoutInputRef,
|
|
8480
9753
|
type: "text",
|
|
@@ -8494,6 +9767,10 @@ window.__ModuleLoader__.load((() => {
|
|
|
8494
9767
|
}
|
|
8495
9768
|
}
|
|
8496
9769
|
}),
|
|
9770
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("p", {
|
|
9771
|
+
className: WorktreeActionHost_module_default.hint,
|
|
9772
|
+
children: t("createModal.cutoutHint")
|
|
9773
|
+
}),
|
|
8497
9774
|
cutoutDraftHint !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
8498
9775
|
className: WorktreeActionHost_module_default.error,
|
|
8499
9776
|
role: "status",
|
|
@@ -8509,7 +9786,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
8509
9786
|
})] });
|
|
8510
9787
|
}
|
|
8511
9788
|
/** Root overlay component listening to the global worktree action bus. */
|
|
8512
|
-
function WorktreeActionHost({ manager, adoptWorktree, isSwitchSessionDirectory, armDeferredWorktree, describeWorktreeRemoval, removeWorktree, pruneWorktrees, onWorktreeCreated, onWorktreeRemoved, t }) {
|
|
9789
|
+
function WorktreeActionHost({ manager, adoptWorktree, isSwitchSessionDirectory, armDeferredWorktree, currentSessionPath, hasStandaloneWorkspace, trackCurrentSessionPr, forgeTrackAvailable, describeWorktreeRemoval, removeWorktree, pruneWorktrees, onWorktreeCreated, onWorktreeRemoved, t }) {
|
|
8513
9790
|
const action = (0, react.useSyncExternalStore)(subscribeWorktreeAction, getWorktreeAction, getWorktreeAction);
|
|
8514
9791
|
if (action === null) return null;
|
|
8515
9792
|
if (action.kind === "manage") return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(WorktreeManagerModal, {
|
|
@@ -8528,6 +9805,27 @@ window.__ModuleLoader__.load((() => {
|
|
|
8528
9805
|
onClose: closeWorktreeAction,
|
|
8529
9806
|
t
|
|
8530
9807
|
});
|
|
9808
|
+
if (action.kind === "checkout-pr") {
|
|
9809
|
+
const canTrack = typeof forgeTrackAvailable === "function" ? forgeTrackAvailable() : forgeTrackAvailable === true;
|
|
9810
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CheckoutPrModal, {
|
|
9811
|
+
repoPath: action.repoPath,
|
|
9812
|
+
repoName: action.repoName,
|
|
9813
|
+
...action.initialInput === void 0 ? {} : { initialInput: action.initialInput },
|
|
9814
|
+
...action.reuseBlankSessionId === void 0 ? {} : { reuseBlankSessionId: action.reuseBlankSessionId },
|
|
9815
|
+
...action.initialIfExists === void 0 ? {} : { initialIfExists: action.initialIfExists },
|
|
9816
|
+
forgeTrackAvailable: canTrack,
|
|
9817
|
+
adoptWorktree,
|
|
9818
|
+
isSwitchSessionDirectory,
|
|
9819
|
+
armDeferredWorktree,
|
|
9820
|
+
currentSessionPath,
|
|
9821
|
+
hasStandaloneWorkspace,
|
|
9822
|
+
trackCurrentSessionPr,
|
|
9823
|
+
pruneWorktrees,
|
|
9824
|
+
onCreated: onWorktreeCreated,
|
|
9825
|
+
onClose: closeWorktreeAction,
|
|
9826
|
+
t
|
|
9827
|
+
}, `${action.repoPath}:${action.initialInput ?? ""}`);
|
|
9828
|
+
}
|
|
8531
9829
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(CreateWorktreeModal, {
|
|
8532
9830
|
repoPath: action.repoPath,
|
|
8533
9831
|
repoName: action.repoName,
|
|
@@ -8717,6 +10015,8 @@ window.__ModuleLoader__.load((() => {
|
|
|
8717
10015
|
cardPruneHistoryFailed: "{n} failed",
|
|
8718
10016
|
cardPruneHistoryMore: "Show all {n}",
|
|
8719
10017
|
cardPruneHistoryLess: "Show less",
|
|
10018
|
+
cardSectionEntry: "Workspace & entry",
|
|
10019
|
+
cardSectionAutomation: "Sync & automation",
|
|
8720
10020
|
"manager.title": "Manage worktrees",
|
|
8721
10021
|
"manager.loading": "Scanning worktrees…",
|
|
8722
10022
|
"manager.loadFailed": "Scan failed: {message}",
|
|
@@ -8734,6 +10034,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
8734
10034
|
"manager.dirty.one": "{n} uncommitted file",
|
|
8735
10035
|
"manager.dirty.other": "{n} uncommitted files",
|
|
8736
10036
|
"manager.running": "A session is running here; removal is unavailable",
|
|
10037
|
+
"manager.runningBadge": "Active session",
|
|
8737
10038
|
"manager.purgeMenu": "Delete folder",
|
|
8738
10039
|
"manager.purgeAria": "Delete the leftover folder “{path}”",
|
|
8739
10040
|
"worktreePurge.title": "Delete leftover folder",
|
|
@@ -8750,15 +10051,96 @@ window.__ModuleLoader__.load((() => {
|
|
|
8750
10051
|
"manager.scopeBack": "Only {repo}",
|
|
8751
10052
|
"manager.emptyScoped": "No worktrees found for {repo}.",
|
|
8752
10053
|
"contextMenu.newWorktree": "New worktree from branch…",
|
|
10054
|
+
"contextMenu.checkoutPr": "Checkout PR / MR…",
|
|
8753
10055
|
"contextMenu.manageWorktrees": "Manage worktrees…",
|
|
8754
10056
|
"contextMenu.removeWorktree": "Remove this worktree…",
|
|
8755
10057
|
"contextMenu.removeDone": "Worktree removed",
|
|
10058
|
+
menuCheckoutPr: "Checkout PR / MR",
|
|
10059
|
+
"prModal.title": "Checkout PR / MR to worktree · {repo}",
|
|
10060
|
+
"prModal.subtitle": "Fetches into an isolated worktree without touching the main checkout or uncommitted changes.",
|
|
10061
|
+
"prModal.loading": "Loading repository remotes…",
|
|
10062
|
+
"prModal.loadingRemote": "Loading PR/MR list for {remote}…",
|
|
10063
|
+
"prModal.loadFailed": "Could not load PR/MR context: {message}",
|
|
10064
|
+
"prModal.inputPlaceholder": "Enter PR/MR number (e.g. 42), paste URL, or filter list…",
|
|
10065
|
+
"prModal.remoteLabel": "Remote",
|
|
10066
|
+
"prModal.providerLabel": "Host type",
|
|
10067
|
+
"prModal.providerGithub": "GitHub PR",
|
|
10068
|
+
"prModal.providerGitlab": "GitLab MR",
|
|
10069
|
+
"prModal.forgeUnauth": "Code host sign-in needed for the PR list — you can still checkout by number or URL",
|
|
10070
|
+
"prModal.forgeListUnsupported": "Current DSH Forge version does not support PR lists yet — you can still checkout by number or URL",
|
|
10071
|
+
"prModal.forgeUnavailable": "Code host PR list is currently unavailable — you can still checkout by number or URL",
|
|
10072
|
+
"prModal.forgeUnavailableWithReason": "Code host PR list unavailable ({message}) — you can still checkout by number or URL",
|
|
10073
|
+
"prModal.filterAll": "All ({n})",
|
|
10074
|
+
"prModal.filterReviewRequested": "Review requested ({n})",
|
|
10075
|
+
"prModal.filterAuthored": "Created by me ({n})",
|
|
10076
|
+
"prModal.filterInvolved": "Involved ({n})",
|
|
10077
|
+
"prModal.refreshCandidates": "Refresh",
|
|
10078
|
+
"prModal.emptyRepoCandidates": "No open PRs or MRs involving you in this repository. Enter a number or paste a URL above to checkout.",
|
|
10079
|
+
"prModal.noCandidates": "No matching PRs or MRs in this filter. You can still enter a number or URL above.",
|
|
10080
|
+
"prModal.tagDraft": "Draft",
|
|
10081
|
+
"prModal.tagMerged": "Merged",
|
|
10082
|
+
"prModal.tagClosed": "Closed",
|
|
10083
|
+
"prModal.tagWorktree": "Worktree exists",
|
|
10084
|
+
"prModal.ciSuccess": "Checks passed",
|
|
10085
|
+
"prModal.ciPending": "Checks running",
|
|
10086
|
+
"prModal.ciFailure": "Checks failed",
|
|
10087
|
+
"prModal.resolving": "Checking remote PR/MR…",
|
|
10088
|
+
"prModal.previewHeading": "Isolated worktree preview",
|
|
10089
|
+
"prModal.previewRef": "Fetch ref: {ref}",
|
|
10090
|
+
"prModal.previewBranch": "Local branch: {branch}",
|
|
10091
|
+
"prModal.previewPath": "Worktree folder: {path}",
|
|
10092
|
+
"prModal.labelRef": "Fetch ref",
|
|
10093
|
+
"prModal.labelBranch": "Local branch",
|
|
10094
|
+
"prModal.labelPath": "Worktree folder",
|
|
10095
|
+
"prModal.labelExistingPath": "Existing folder",
|
|
10096
|
+
"prModal.existingHeading": "Existing worktree found for {branch}",
|
|
10097
|
+
"prModal.existingReuse": "Open existing worktree (no Git writes)",
|
|
10098
|
+
"prModal.existingUpdate": "Fetch latest commits and sync (clean worktree; auto-syncs remote force-push)",
|
|
10099
|
+
"prModal.divergedTitle": "Local commits found on {branch}",
|
|
10100
|
+
"prModal.divergedDesc": "The remote PR/MR diverged from your local commits. Open as-is to keep them, or reset to the latest PR/MR commit (discards local-only commits on this branch).",
|
|
10101
|
+
"prModal.divergedKeep": "Keep local & open",
|
|
10102
|
+
"prModal.divergedReset": "Reset to latest PR/MR",
|
|
10103
|
+
"prModal.occupiedByMain": "Branch {branch} is currently checked out in the main repository. Switch the main checkout to another branch first.",
|
|
10104
|
+
"prModal.autoTrack": "Bind this PR/MR to the session’s change request panel",
|
|
10105
|
+
"prModal.submitCreate": "Checkout to worktree",
|
|
10106
|
+
"prModal.submitOpen": "Open worktree",
|
|
10107
|
+
"prModal.submitUpdate": "Update & open worktree",
|
|
10108
|
+
"prModal.stageFetch": "Fetching PR/MR ref…",
|
|
10109
|
+
"prModal.stageWorktree": "Creating isolated worktree…",
|
|
10110
|
+
"prModal.stageCopy": "Copying configuration files…",
|
|
10111
|
+
"prModal.busy": "Checking out…",
|
|
10112
|
+
"prModal.busyOpen": "Opening…",
|
|
10113
|
+
"prModal.busyUpdate": "Updating…",
|
|
10114
|
+
"prModal.updatedToast": "Updated {branch} to the latest PR/MR commit",
|
|
10115
|
+
"prModal.forceUpdatedToast": "Remote PR/MR was force-pushed; synced {branch} to the latest commit",
|
|
10116
|
+
"prModal.resetToast": "Reset {branch} to the latest PR/MR commit",
|
|
10117
|
+
"prModal.upToDateToast": "{branch} is already up to date",
|
|
10118
|
+
"prModal.preservedLocalBranchToast": "Existing local branch {branch} had local commits and was kept intact",
|
|
10119
|
+
"prModal.forkPushNote": "Checked-out PR worktrees are intended for local review and testing; pushing depends on remote permissions.",
|
|
10120
|
+
"prModal.noRemotes": "This repository has no configured Git remotes.",
|
|
10121
|
+
"prModal.errNoRemotes": "This repository has no configured Git remotes.",
|
|
10122
|
+
"prModal.errEmptyInput": "Enter a PR/MR number or URL.",
|
|
10123
|
+
"prModal.errInvalidInput": "Enter a valid PR/MR number (e.g. 42) or a GitHub/GitLab PR/MR URL.",
|
|
10124
|
+
"prModal.errUnsupportedProvider": "Unsupported code host \"{provider}\". Only GitHub and GitLab are supported.",
|
|
10125
|
+
"prModal.errUrlRepoMismatch": "This URL points to {owner}/{repo} ({host}), which does not match any remote in this repository.",
|
|
10126
|
+
"prModal.errRemoteNotFound": "Remote \"{remote}\" was not found in this repository.",
|
|
10127
|
+
"prModal.errProviderUndetected": "Could not detect whether remote \"{remote}\" hosts GitHub PRs or GitLab MRs. Select a host type or paste the full URL.",
|
|
10128
|
+
"prModal.errWorktreeDirty": "The PR worktree has uncommitted changes. Commit or stash them before updating.",
|
|
10129
|
+
"prModal.errPrRefNotFound": "Could not find {ref} on remote \"{remote}\". Check the PR/MR number, remote, and host type.",
|
|
10130
|
+
"prModal.errPrAuthFailed": "Authentication failed when fetching from remote \"{remote}\". Check your Git credentials or SSH key.",
|
|
10131
|
+
"prModal.errPrTimeout": "Timed out connecting to remote \"{remote}\". Check your network or proxy and try again.",
|
|
10132
|
+
"prModal.errPrNetworkFailed": "Could not reach remote \"{remote}\". Check your network connection and remote URL.",
|
|
10133
|
+
"forgeSlot.checkoutTooltip": "Checkout PR/MR to isolated worktree",
|
|
10134
|
+
"forgeSlot.checkoutLabel": "Checkout to worktree",
|
|
10135
|
+
"forgeSlot.syncTooltip": "Sync this PR/MR worktree to latest",
|
|
10136
|
+
"forgeSlot.syncLabel": "Sync PR/MR worktree",
|
|
8756
10137
|
"sidebar.worktreeBadge": "Git worktree · {repo}",
|
|
8757
10138
|
"sidebar.worktreeBadgeWithBranch": "Git worktree · {repo} ({branch})",
|
|
8758
10139
|
"sidebar.worktreeHover": "Worktree · {repo}",
|
|
8759
10140
|
"sidebar.worktreeHoverWithBranch": "Worktree · {repo} / {branch}",
|
|
8760
10141
|
"sidebar.worktreeHoverLabel": "Worktree",
|
|
8761
10142
|
"sidebar.worktreeHoverFrom": "Worktree · from {base}",
|
|
10143
|
+
"sidebar.worktreeHoverPr": "Worktree · {label}",
|
|
8762
10144
|
"createModal.title": "New worktree · {repo}",
|
|
8763
10145
|
"createModal.loading": "Loading branches…",
|
|
8764
10146
|
"createModal.loadFailed": "Could not load branches: {message}",
|
|
@@ -8769,10 +10151,13 @@ window.__ModuleLoader__.load((() => {
|
|
|
8769
10151
|
"createModal.tagWorktree": "worktree",
|
|
8770
10152
|
"createModal.tagRemote": "remote",
|
|
8771
10153
|
"createModal.creating": "Creating worktree…",
|
|
10154
|
+
"createModal.baseBranchLabel": "Base branch",
|
|
10155
|
+
"createModal.cutoutHint": "Leave the name blank to generate a random branch name automatically.",
|
|
8772
10156
|
"deferred.armedTitle": "Will create a worktree when you send the first message",
|
|
8773
10157
|
"deferred.armedRandom": "Random branch from {base}",
|
|
8774
10158
|
"deferred.armedCutout": "New branch {name} from {base}",
|
|
8775
10159
|
"deferred.armedBranch": "Branch {branch}",
|
|
10160
|
+
"deferred.armedPr": "PR / MR · {branch}",
|
|
8776
10161
|
"deferred.armedCancel": "Cancel",
|
|
8777
10162
|
"deferred.runningTitle": "Creating worktree",
|
|
8778
10163
|
"deferred.failedTitle": "Failed to create worktree",
|
|
@@ -8799,7 +10184,8 @@ window.__ModuleLoader__.load((() => {
|
|
|
8799
10184
|
pruneFailed: "{n} worktree(s) could not be auto-removed",
|
|
8800
10185
|
"worktreeRemove.menu": "Remove worktree",
|
|
8801
10186
|
"worktreeRemove.title": "Remove worktree",
|
|
8802
|
-
"worktreeRemove.desc": "
|
|
10187
|
+
"worktreeRemove.desc": "Removes this worktree from git and deletes its directory on disk.",
|
|
10188
|
+
"worktreeRemove.branchKeptBadge": "Branch kept",
|
|
8803
10189
|
"worktreeRemove.descBranch": "The branch {branch} is kept.",
|
|
8804
10190
|
"worktreeRemove.inspecting": "Inspecting worktree…",
|
|
8805
10191
|
"worktreeRemove.dirty.one": "{n} uncommitted file will be deleted with the folder.",
|
|
@@ -8995,6 +10381,8 @@ window.__ModuleLoader__.load((() => {
|
|
|
8995
10381
|
cardPruneHistoryFailed: "{n} 个失败",
|
|
8996
10382
|
cardPruneHistoryMore: "展开全部 {n} 条",
|
|
8997
10383
|
cardPruneHistoryLess: "收起",
|
|
10384
|
+
cardSectionEntry: "工作区与入口",
|
|
10385
|
+
cardSectionAutomation: "同步与自动维护",
|
|
8998
10386
|
"manager.title": "管理工作树",
|
|
8999
10387
|
"manager.loading": "正在扫描工作树…",
|
|
9000
10388
|
"manager.loadFailed": "扫描失败:{message}",
|
|
@@ -9012,6 +10400,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9012
10400
|
"manager.dirty.one": "{n} 个未提交文件",
|
|
9013
10401
|
"manager.dirty.other": "{n} 个未提交文件",
|
|
9014
10402
|
"manager.running": "有进行中的会话,暂不能删除",
|
|
10403
|
+
"manager.runningBadge": "会话运行中",
|
|
9015
10404
|
"manager.purgeMenu": "删除文件夹",
|
|
9016
10405
|
"manager.purgeAria": "删除残留文件夹“{path}”",
|
|
9017
10406
|
"worktreePurge.title": "删除残留文件夹",
|
|
@@ -9028,15 +10417,96 @@ window.__ModuleLoader__.load((() => {
|
|
|
9028
10417
|
"manager.scopeBack": "仅看 {repo}",
|
|
9029
10418
|
"manager.emptyScoped": "当前仓库 {repo} 暂无工作树。",
|
|
9030
10419
|
"contextMenu.newWorktree": "从分支新建工作树…",
|
|
10420
|
+
"contextMenu.checkoutPr": "检出 PR / MR…",
|
|
9031
10421
|
"contextMenu.manageWorktrees": "管理工作树…",
|
|
9032
10422
|
"contextMenu.removeWorktree": "删除此工作树…",
|
|
9033
10423
|
"contextMenu.removeDone": "已删除工作树",
|
|
10424
|
+
menuCheckoutPr: "检出 PR / MR",
|
|
10425
|
+
"prModal.title": "检出 PR / MR 到隔离工作树 · {repo}",
|
|
10426
|
+
"prModal.subtitle": "拉取到独立工作树分支,不改动主仓库当前分支与未提交修改。",
|
|
10427
|
+
"prModal.loading": "正在读取仓库远程信息…",
|
|
10428
|
+
"prModal.loadingRemote": "正在加载 {remote} 的候选列表…",
|
|
10429
|
+
"prModal.loadFailed": "加载 PR / MR 上下文失败:{message}",
|
|
10430
|
+
"prModal.inputPlaceholder": "输入 PR / MR 编号(如 42)、粘贴链接或筛选列表…",
|
|
10431
|
+
"prModal.remoteLabel": "Remote",
|
|
10432
|
+
"prModal.providerLabel": "平台类型",
|
|
10433
|
+
"prModal.providerGithub": "GitHub PR",
|
|
10434
|
+
"prModal.providerGitlab": "GitLab MR",
|
|
10435
|
+
"prModal.forgeUnauth": "代码托管平台未登录(暂不展示候选列表)— 仍可直接输入编号或链接检出",
|
|
10436
|
+
"prModal.forgeListUnsupported": "当前 DSH 版本的官方 Forge 暂不支持拉取 PR 列表 — 仍可直接输入编号或链接检出",
|
|
10437
|
+
"prModal.forgeUnavailable": "代码托管平台暂不可用(无法加载候选列表)— 仍可直接输入编号或链接检出",
|
|
10438
|
+
"prModal.forgeUnavailableWithReason": "无法加载候选列表({message})— 仍可直接输入编号或链接检出",
|
|
10439
|
+
"prModal.filterAll": "全部 ({n})",
|
|
10440
|
+
"prModal.filterReviewRequested": "待我评审 ({n})",
|
|
10441
|
+
"prModal.filterAuthored": "我创建的 ({n})",
|
|
10442
|
+
"prModal.filterInvolved": "与我有关 ({n})",
|
|
10443
|
+
"prModal.refreshCandidates": "刷新",
|
|
10444
|
+
"prModal.emptyRepoCandidates": "当前仓库暂无与你相关的开放 PR / MR,可直接输入编号或粘贴链接检出。",
|
|
10445
|
+
"prModal.noCandidates": "当前筛选下没有匹配的 PR / MR,仍可直接在上方输入编号或链接检出。",
|
|
10446
|
+
"prModal.tagDraft": "草稿",
|
|
10447
|
+
"prModal.tagMerged": "已合并",
|
|
10448
|
+
"prModal.tagClosed": "已关闭",
|
|
10449
|
+
"prModal.tagWorktree": "已有工作树",
|
|
10450
|
+
"prModal.ciSuccess": "检查通过",
|
|
10451
|
+
"prModal.ciPending": "检查进行中",
|
|
10452
|
+
"prModal.ciFailure": "检查失败",
|
|
10453
|
+
"prModal.resolving": "正在校验远端 PR / MR…",
|
|
10454
|
+
"prModal.previewHeading": "隔离工作树落盘预览",
|
|
10455
|
+
"prModal.previewRef": "拉取引用:{ref}",
|
|
10456
|
+
"prModal.previewBranch": "本地分支:{branch}",
|
|
10457
|
+
"prModal.previewPath": "工作树目录:{path}",
|
|
10458
|
+
"prModal.labelRef": "拉取引用",
|
|
10459
|
+
"prModal.labelBranch": "本地分支",
|
|
10460
|
+
"prModal.labelPath": "工作树目录",
|
|
10461
|
+
"prModal.labelExistingPath": "工作树目录",
|
|
10462
|
+
"prModal.existingHeading": "检测到 {branch} 已有本地工作树",
|
|
10463
|
+
"prModal.existingReuse": "直接打开已有工作树(零 Git 写入)",
|
|
10464
|
+
"prModal.existingUpdate": "拉取最新提交并同步更新(仅干净工作树;远端强制推送时自动同步)",
|
|
10465
|
+
"prModal.divergedTitle": "分支 {branch} 包含未合并的本地提交",
|
|
10466
|
+
"prModal.divergedDesc": "远端 PR / MR 与你的本地提交已分叉。可直接打开以保留本地提交,或重置到 PR / MR 最新提交(将丢弃该分支上的本地提交)。",
|
|
10467
|
+
"prModal.divergedKeep": "保留本地直接打开",
|
|
10468
|
+
"prModal.divergedReset": "重置到 PR / MR 最新",
|
|
10469
|
+
"prModal.occupiedByMain": "主仓库当前正检出分支 {branch},请先在主仓库切换其他分支后再检出此 PR / MR。",
|
|
10470
|
+
"prModal.autoTrack": "检出后自动关联到会话的变更请求面板",
|
|
10471
|
+
"prModal.submitCreate": "检出并进入工作树",
|
|
10472
|
+
"prModal.submitOpen": "打开已有工作树",
|
|
10473
|
+
"prModal.submitUpdate": "更新并打开工作树",
|
|
10474
|
+
"prModal.stageFetch": "正在拉取 PR / MR 引用…",
|
|
10475
|
+
"prModal.stageWorktree": "正在创建隔离工作树…",
|
|
10476
|
+
"prModal.stageCopy": "正在复制配置文件…",
|
|
10477
|
+
"prModal.busy": "正在检出…",
|
|
10478
|
+
"prModal.busyOpen": "正在打开…",
|
|
10479
|
+
"prModal.busyUpdate": "正在更新…",
|
|
10480
|
+
"prModal.updatedToast": "已将 {branch} 更新到最新提交",
|
|
10481
|
+
"prModal.forceUpdatedToast": "远端 PR / MR 已强制更新,已将 {branch} 同步到最新提交",
|
|
10482
|
+
"prModal.resetToast": "已将 {branch} 重置到 PR / MR 最新提交",
|
|
10483
|
+
"prModal.upToDateToast": "{branch} 已是最新提交",
|
|
10484
|
+
"prModal.preservedLocalBranchToast": "本地分支 {branch} 包含未合并的本地提交,已原样保留",
|
|
10485
|
+
"prModal.forkPushNote": "检出的 PR 工作树主要用于本地审阅与测试;直接推送受远端权限限制。",
|
|
10486
|
+
"prModal.noRemotes": "当前仓库尚未配置任何 Git Remote。",
|
|
10487
|
+
"prModal.errNoRemotes": "当前仓库尚未配置任何 Git Remote。",
|
|
10488
|
+
"prModal.errEmptyInput": "请输入 PR / MR 编号或完整链接。",
|
|
10489
|
+
"prModal.errInvalidInput": "请输入有效的 PR / MR 编号(如 42)或 GitHub / GitLab PR / MR 链接。",
|
|
10490
|
+
"prModal.errUnsupportedProvider": "暂不支持代码托管平台“{provider}”,目前仅支持 GitHub 与 GitLab。",
|
|
10491
|
+
"prModal.errUrlRepoMismatch": "该链接指向 {owner}/{repo}({host}),与当前仓库配置的任何 Remote 均不匹配。",
|
|
10492
|
+
"prModal.errRemoteNotFound": "当前仓库未找到名为“{remote}”的 Remote。",
|
|
10493
|
+
"prModal.errProviderUndetected": "无法自动判断 Remote“{remote}”属于 GitHub 还是 GitLab,请手动选择平台类型或粘贴完整链接。",
|
|
10494
|
+
"prModal.errWorktreeDirty": "该 PR 工作树存在未提交改动,请先提交或暂存后再更新。",
|
|
10495
|
+
"prModal.errPrRefNotFound": "在 Remote“{remote}”上未找到引用 {ref},请确认 PR / MR 编号、Remote 和平台类型是否正确。",
|
|
10496
|
+
"prModal.errPrAuthFailed": "从 Remote“{remote}”拉取失败:认证未通过。请检查 Git 凭据或 SSH 密钥配置。",
|
|
10497
|
+
"prModal.errPrTimeout": "连接 Remote“{remote}”超时,请检查网络或代理后重试。",
|
|
10498
|
+
"prModal.errPrNetworkFailed": "无法连接到 Remote“{remote}”,请检查网络连接与远端地址。",
|
|
10499
|
+
"forgeSlot.checkoutTooltip": "检出 PR / MR 到隔离工作树",
|
|
10500
|
+
"forgeSlot.checkoutLabel": "检出到工作树",
|
|
10501
|
+
"forgeSlot.syncTooltip": "同步此 PR / MR 工作树到最新",
|
|
10502
|
+
"forgeSlot.syncLabel": "同步 PR / MR 工作树",
|
|
9034
10503
|
"sidebar.worktreeBadge": "Git 工作树 · {repo}",
|
|
9035
10504
|
"sidebar.worktreeBadgeWithBranch": "Git 工作树 · {repo}({branch})",
|
|
9036
10505
|
"sidebar.worktreeHover": "工作树 · {repo}",
|
|
9037
10506
|
"sidebar.worktreeHoverWithBranch": "工作树 · {repo} / {branch}",
|
|
9038
10507
|
"sidebar.worktreeHoverLabel": "工作树",
|
|
9039
10508
|
"sidebar.worktreeHoverFrom": "工作树 · 基于 {base}",
|
|
10509
|
+
"sidebar.worktreeHoverPr": "工作树 · {label}",
|
|
9040
10510
|
"createModal.title": "新建工作树 · {repo}",
|
|
9041
10511
|
"createModal.loading": "正在加载分支…",
|
|
9042
10512
|
"createModal.loadFailed": "分支加载失败:{message}",
|
|
@@ -9047,10 +10517,13 @@ window.__ModuleLoader__.load((() => {
|
|
|
9047
10517
|
"createModal.tagWorktree": "已有工作树",
|
|
9048
10518
|
"createModal.tagRemote": "远程",
|
|
9049
10519
|
"createModal.creating": "正在创建工作树…",
|
|
10520
|
+
"createModal.baseBranchLabel": "基准分支",
|
|
10521
|
+
"createModal.cutoutHint": "留空将自动随机生成一个新分支名。",
|
|
9050
10522
|
"deferred.armedTitle": "将在发送首条消息时创建工作树",
|
|
9051
10523
|
"deferred.armedRandom": "基于 {base} 随机生成分支",
|
|
9052
10524
|
"deferred.armedCutout": "基于 {base} 新建分支 {name}",
|
|
9053
10525
|
"deferred.armedBranch": "分支 {branch}",
|
|
10526
|
+
"deferred.armedPr": "PR / MR · {branch}",
|
|
9054
10527
|
"deferred.armedCancel": "取消",
|
|
9055
10528
|
"deferred.runningTitle": "正在创建工作树",
|
|
9056
10529
|
"deferred.failedTitle": "创建工作树失败",
|
|
@@ -9077,7 +10550,8 @@ window.__ModuleLoader__.load((() => {
|
|
|
9077
10550
|
pruneFailed: "{n} 个工作树自动清理失败",
|
|
9078
10551
|
"worktreeRemove.menu": "删除工作树",
|
|
9079
10552
|
"worktreeRemove.title": "删除工作树",
|
|
9080
|
-
"worktreeRemove.desc": "将从
|
|
10553
|
+
"worktreeRemove.desc": "将从 Git 移除该工作树登记并删除其本地目录。",
|
|
10554
|
+
"worktreeRemove.branchKeptBadge": "分支将保留",
|
|
9081
10555
|
"worktreeRemove.descBranch": "分支 {branch} 将保留。",
|
|
9082
10556
|
"worktreeRemove.inspecting": "正在检查工作树…",
|
|
9083
10557
|
"worktreeRemove.dirty.one": "{n} 个未提交文件将随目录一并删除。",
|
|
@@ -9180,6 +10654,13 @@ window.__ModuleLoader__.load((() => {
|
|
|
9180
10654
|
const hasSyncedRef = (ref) => ref !== void 0 && typeof ref.get === "function" && typeof ref.subscribe === "function";
|
|
9181
10655
|
const isObservable = (value) => typeof value === "object" && value !== null && typeof value.getSnapshot === "function" && typeof value.subscribe === "function";
|
|
9182
10656
|
const hasContextMenus = (value) => typeof value === "object" && value !== null && typeof value.contextMenus?.register === "function";
|
|
10657
|
+
const resolveForgePanelTrack = (remote) => {
|
|
10658
|
+
if (typeof remote !== "object" || remote === null) return void 0;
|
|
10659
|
+
const forgePanel = remote.forgePanel;
|
|
10660
|
+
if (typeof forgePanel !== "object" || forgePanel === null) return void 0;
|
|
10661
|
+
const track = forgePanel.track;
|
|
10662
|
+
return typeof track === "function" ? track.bind(forgePanel) : void 0;
|
|
10663
|
+
};
|
|
9183
10664
|
/** Required services: the slot ledger, session/workspace runtimes, the
|
|
9184
10665
|
* workspace navigation/directory face, copy, and the config forms backing
|
|
9185
10666
|
* the plugin configuration card. */
|
|
@@ -9217,13 +10698,17 @@ window.__ModuleLoader__.load((() => {
|
|
|
9217
10698
|
const gitCache = createWorkspaceGitCache();
|
|
9218
10699
|
const armedDeferredSessions = /* @__PURE__ */ new Set();
|
|
9219
10700
|
let forgePanelCancelWorktree;
|
|
10701
|
+
let forgePanelTrack;
|
|
9220
10702
|
if (typeof ctx.inject === "function") ctx.inject.bind(ctx)(["remote.forgePanel"], (forgeCtx) => {
|
|
9221
10703
|
const cancel = resolveForgePanelCancelWorktree(forgeCtx.remote);
|
|
9222
|
-
|
|
9223
|
-
|
|
10704
|
+
const track = resolveForgePanelTrack(forgeCtx.remote);
|
|
10705
|
+
if (cancel === void 0 && track === void 0) return;
|
|
10706
|
+
if (cancel !== void 0) forgePanelCancelWorktree = cancel;
|
|
10707
|
+
if (track !== void 0) forgePanelTrack = track;
|
|
9224
10708
|
forgeCtx.effect(() => () => {
|
|
9225
|
-
if (forgePanelCancelWorktree === cancel) forgePanelCancelWorktree = void 0;
|
|
9226
|
-
|
|
10709
|
+
if (cancel !== void 0 && forgePanelCancelWorktree === cancel) forgePanelCancelWorktree = void 0;
|
|
10710
|
+
if (track !== void 0 && forgePanelTrack === track) forgePanelTrack = void 0;
|
|
10711
|
+
}, "git-worktree: optional forgePanel bridge");
|
|
9227
10712
|
});
|
|
9228
10713
|
const cancelOfficialWorktree = (sessionId) => {
|
|
9229
10714
|
const cancel = forgePanelCancelWorktree;
|
|
@@ -9259,20 +10744,33 @@ window.__ModuleLoader__.load((() => {
|
|
|
9259
10744
|
const adoptWorktree = async (path, options) => {
|
|
9260
10745
|
const workspacesSnapshot = ctx.workspaces.list.getSnapshot();
|
|
9261
10746
|
const targetKey = pathKey(path);
|
|
10747
|
+
const trackUrl = options?.trackPrUrl ?? null;
|
|
10748
|
+
const forgeTrack = forgePanelTrack;
|
|
10749
|
+
const uiWs = ctx.uiWorkspace;
|
|
10750
|
+
const bindPrIfRequested = (sessionId) => {
|
|
10751
|
+
if (trackUrl !== null && forgeTrack !== void 0) forgeTrack(sessionId, trackUrl).catch(() => {});
|
|
10752
|
+
};
|
|
10753
|
+
const openWorkspace = async (workspaceId) => {
|
|
10754
|
+
if (trackUrl !== null && forgeTrack !== void 0 && typeof uiWs.connectWorkspace === "function" && typeof uiWs.openSession === "function") {
|
|
10755
|
+
const sessionId = await uiWs.connectWorkspace(workspaceId);
|
|
10756
|
+
uiWs.openSession(sessionId);
|
|
10757
|
+
bindPrIfRequested(sessionId);
|
|
10758
|
+
return;
|
|
10759
|
+
}
|
|
10760
|
+
ctx.uiWorkspace.startSession(workspaceId);
|
|
10761
|
+
};
|
|
9262
10762
|
const existingWorkspace = workspacesSnapshot.items.find((item) => pathKey(item.path) === targetKey);
|
|
9263
10763
|
if (existingWorkspace !== void 0) {
|
|
9264
|
-
|
|
10764
|
+
await openWorkspace(existingWorkspace.workspaceId);
|
|
9265
10765
|
return;
|
|
9266
10766
|
}
|
|
9267
10767
|
if (readSwitchSessionDirectory()) {
|
|
9268
10768
|
const repoRoot = await resolveRepoRootForWorktree(path, options?.repoRoot);
|
|
9269
10769
|
if (repoRoot !== void 0 && pathKey(repoRoot) === targetKey) {
|
|
9270
|
-
|
|
9271
|
-
ctx.uiWorkspace.startSession(workspace.workspaceId);
|
|
10770
|
+
await openWorkspace((await ctx.workspaces.create({ path })).workspaceId);
|
|
9272
10771
|
return;
|
|
9273
10772
|
}
|
|
9274
10773
|
const sessionsApi = ctx.sessions;
|
|
9275
|
-
const uiWs = ctx.uiWorkspace;
|
|
9276
10774
|
if (options?.reuseBlankSessionId !== void 0 && options.reuseBlankSessionId.length > 0) {
|
|
9277
10775
|
const blankId = options.reuseBlankSessionId;
|
|
9278
10776
|
cancelOfficialWorktree(blankId);
|
|
@@ -9281,6 +10779,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9281
10779
|
notifyDeferredWorktreeState(options.reuseBlankSessionId, null);
|
|
9282
10780
|
const moved = await requestSetSessionDirectory(options.reuseBlankSessionId, path);
|
|
9283
10781
|
if (!moved.ok) throw new Error(moved.error);
|
|
10782
|
+
bindPrIfRequested(blankId);
|
|
9284
10783
|
sessionsApi.refreshProjections?.(blankId).catch(() => {});
|
|
9285
10784
|
gitCache.refresh([path]);
|
|
9286
10785
|
return;
|
|
@@ -9298,6 +10797,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9298
10797
|
const reusableId = reusableBlank;
|
|
9299
10798
|
cancelOfficialWorktree(reusableId);
|
|
9300
10799
|
uiWs.openSession(reusableId);
|
|
10800
|
+
bindPrIfRequested(reusableId);
|
|
9301
10801
|
gitCache.refresh([path]);
|
|
9302
10802
|
return;
|
|
9303
10803
|
}
|
|
@@ -9308,32 +10808,35 @@ window.__ModuleLoader__.load((() => {
|
|
|
9308
10808
|
const moved = await requestSetSessionDirectory(newSessionId, path);
|
|
9309
10809
|
if (!moved.ok) throw new Error(moved.error);
|
|
9310
10810
|
uiWs.openSession(newSessionId);
|
|
10811
|
+
bindPrIfRequested(newSessionId);
|
|
9311
10812
|
sessionsApi.refreshProjections?.(newSessionId).catch(() => {});
|
|
9312
10813
|
gitCache.refresh([path]);
|
|
9313
10814
|
return;
|
|
9314
10815
|
}
|
|
9315
10816
|
}
|
|
9316
10817
|
}
|
|
9317
|
-
|
|
9318
|
-
ctx.uiWorkspace.startSession(workspace.workspaceId);
|
|
10818
|
+
await openWorkspace((await ctx.workspaces.create({ path })).workspaceId);
|
|
9319
10819
|
};
|
|
9320
10820
|
const armDeferredWorktree = async (spec, options) => {
|
|
9321
10821
|
const sessionsApi = ctx.sessions;
|
|
9322
10822
|
const uiWs = ctx.uiWorkspace;
|
|
9323
|
-
|
|
9324
|
-
|
|
9325
|
-
cancelOfficialWorktree(blankId);
|
|
10823
|
+
const armSlot = async (targetSessionId) => {
|
|
10824
|
+
cancelOfficialWorktree(targetSessionId);
|
|
9326
10825
|
const armed = await requestArmDeferredWorktree({
|
|
9327
|
-
sessionId:
|
|
10826
|
+
sessionId: targetSessionId,
|
|
9328
10827
|
repoPath: spec.repoPath,
|
|
9329
10828
|
branch: spec.branch,
|
|
9330
10829
|
cutout: spec.cutout,
|
|
9331
10830
|
...spec.name === void 0 ? {} : { name: spec.name },
|
|
9332
|
-
...spec.random === void 0 ? {} : { random: spec.random }
|
|
10831
|
+
...spec.random === void 0 ? {} : { random: spec.random },
|
|
10832
|
+
...spec.pr === void 0 ? {} : { pr: spec.pr }
|
|
9333
10833
|
});
|
|
9334
10834
|
if (!armed.ok) throw new Error(armed.error);
|
|
9335
|
-
armedDeferredSessions.add(
|
|
9336
|
-
notifyDeferredWorktreeState(
|
|
10835
|
+
armedDeferredSessions.add(targetSessionId);
|
|
10836
|
+
notifyDeferredWorktreeState(targetSessionId, armed.state);
|
|
10837
|
+
};
|
|
10838
|
+
if (options?.reuseBlankSessionId !== void 0 && options.reuseBlankSessionId.length > 0) {
|
|
10839
|
+
await armSlot(options.reuseBlankSessionId);
|
|
9337
10840
|
return;
|
|
9338
10841
|
}
|
|
9339
10842
|
if (typeof sessionsApi.create !== "function" || typeof uiWs.openSession !== "function") throw new Error("Host does not support deferred session worktree creation");
|
|
@@ -9351,18 +10854,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9351
10854
|
if (activeSummary?.blank === true && activeSummary.origin !== "subagent" && activeDir !== void 0 && pathKey(activeDir) === pathKey(repoRoot)) {
|
|
9352
10855
|
const currentDeferred = await fetchDeferredWorktree(activeMainId);
|
|
9353
10856
|
if (currentDeferred.ok && currentDeferred.state === null) {
|
|
9354
|
-
|
|
9355
|
-
const armed = await requestArmDeferredWorktree({
|
|
9356
|
-
sessionId: activeMainId,
|
|
9357
|
-
repoPath: spec.repoPath,
|
|
9358
|
-
branch: spec.branch,
|
|
9359
|
-
cutout: spec.cutout,
|
|
9360
|
-
...spec.name === void 0 ? {} : { name: spec.name },
|
|
9361
|
-
...spec.random === void 0 ? {} : { random: spec.random }
|
|
9362
|
-
});
|
|
9363
|
-
if (!armed.ok) throw new Error(armed.error);
|
|
9364
|
-
armedDeferredSessions.add(activeMainId);
|
|
9365
|
-
notifyDeferredWorktreeState(activeMainId, armed.state);
|
|
10857
|
+
await armSlot(activeMainId);
|
|
9366
10858
|
return;
|
|
9367
10859
|
}
|
|
9368
10860
|
}
|
|
@@ -9370,18 +10862,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9370
10862
|
}
|
|
9371
10863
|
const parentWorkspace = existingParent ?? await ctx.workspaces.create({ path: repoRoot });
|
|
9372
10864
|
const newSessionId = await sessionsApi.create({ workspaceId: parentWorkspace.workspaceId });
|
|
9373
|
-
|
|
9374
|
-
const armed = await requestArmDeferredWorktree({
|
|
9375
|
-
sessionId: newSessionId,
|
|
9376
|
-
repoPath: spec.repoPath,
|
|
9377
|
-
branch: spec.branch,
|
|
9378
|
-
cutout: spec.cutout,
|
|
9379
|
-
...spec.name === void 0 ? {} : { name: spec.name },
|
|
9380
|
-
...spec.random === void 0 ? {} : { random: spec.random }
|
|
9381
|
-
});
|
|
9382
|
-
if (!armed.ok) throw new Error(armed.error);
|
|
9383
|
-
armedDeferredSessions.add(newSessionId);
|
|
9384
|
-
notifyDeferredWorktreeState(newSessionId, armed.state);
|
|
10865
|
+
await armSlot(newSessionId);
|
|
9385
10866
|
uiWs.openSession(newSessionId);
|
|
9386
10867
|
};
|
|
9387
10868
|
const chipInjected = () => ({
|
|
@@ -9515,6 +10996,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9515
10996
|
handledCompletions.add(key);
|
|
9516
10997
|
ctx.sessions.refreshProjections?.(sessionId).catch(() => {});
|
|
9517
10998
|
gitCache.refresh([completed.path]);
|
|
10999
|
+
if (completed.trackPrUrl !== void 0 && forgePanelTrack !== void 0) forgePanelTrack(sessionId, completed.trackPrUrl).catch(() => {});
|
|
9518
11000
|
const t = ctx.locale.bind(NS);
|
|
9519
11001
|
if (completed.fetchWarning !== void 0) emitToast(t("fetchWarning", { message: completed.fetchWarning }));
|
|
9520
11002
|
if (completed.excludeWarning !== void 0) emitToast(t("excludeWarning", { message: completed.excludeWarning }));
|
|
@@ -9674,6 +11156,18 @@ window.__ModuleLoader__.load((() => {
|
|
|
9674
11156
|
adoptWorktree: chip.adoptWorktree,
|
|
9675
11157
|
isSwitchSessionDirectory: chip.isSwitchSessionDirectory,
|
|
9676
11158
|
armDeferredWorktree: chip.armDeferredWorktree,
|
|
11159
|
+
currentSessionPath: () => {
|
|
11160
|
+
const sessionsSnap = ctx.sessions.list.getSnapshot();
|
|
11161
|
+
const mainId = Object.entries(sessionsSnap.byId).find(([, summary]) => (summary?.retainedBy?.mainView ?? 0) > 0)?.[0];
|
|
11162
|
+
return mainId === void 0 ? void 0 : resolveSessionPathFromCtx(mainId);
|
|
11163
|
+
},
|
|
11164
|
+
hasStandaloneWorkspace: (path) => ctx.workspaces.list.getSnapshot().items.some((item) => pathKey(item.path) === pathKey(path)),
|
|
11165
|
+
trackCurrentSessionPr: (url) => {
|
|
11166
|
+
const sessionsSnap = ctx.sessions.list.getSnapshot();
|
|
11167
|
+
const mainId = Object.entries(sessionsSnap.byId).find(([, summary]) => (summary?.retainedBy?.mainView ?? 0) > 0)?.[0];
|
|
11168
|
+
if (mainId !== void 0 && forgePanelTrack !== void 0) forgePanelTrack(mainId, url).catch(() => {});
|
|
11169
|
+
},
|
|
11170
|
+
forgeTrackAvailable: () => forgePanelTrack !== void 0,
|
|
9677
11171
|
describeWorktreeRemoval: chip.describeWorktreeRemoval,
|
|
9678
11172
|
removeWorktree: chip.removeWorktree,
|
|
9679
11173
|
pruneWorktrees: chip.pruneWorktrees,
|
|
@@ -9734,6 +11228,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9734
11228
|
unmountLegacySessionMenu();
|
|
9735
11229
|
const icons = [
|
|
9736
11230
|
[CONTEXT_MENU_ICON_KEYS.create, _deepseek_ai_dsh_client_ui_primitives.IconBranchOutlineRegular],
|
|
11231
|
+
[CONTEXT_MENU_ICON_KEYS.checkoutPr, PrCheckoutGlyph],
|
|
9737
11232
|
[CONTEXT_MENU_ICON_KEYS.manage, _deepseek_ai_dsh_client_ui_primitives.IconFolderCloseRegular],
|
|
9738
11233
|
[CONTEXT_MENU_ICON_KEYS.remove, _deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular]
|
|
9739
11234
|
];
|
|
@@ -9760,6 +11255,24 @@ window.__ModuleLoader__.load((() => {
|
|
|
9760
11255
|
mountLegacySessionMenu();
|
|
9761
11256
|
}, "git-worktree: native context menus");
|
|
9762
11257
|
});
|
|
11258
|
+
const forgeSlotDeps = () => ({
|
|
11259
|
+
gitCache,
|
|
11260
|
+
resolveSessionPath: resolveSessionPathFromCtx
|
|
11261
|
+
});
|
|
11262
|
+
ctx.slots.inject("forge.change-request.card.actions", () => ctx.slots.register({
|
|
11263
|
+
name: "forge.change-request.card.actions",
|
|
11264
|
+
id: "git-worktree-checkout-pr",
|
|
11265
|
+
order: 20,
|
|
11266
|
+
locale: NS,
|
|
11267
|
+
inject: forgeSlotDeps
|
|
11268
|
+
}, ForgeCardCheckoutButton));
|
|
11269
|
+
ctx.slots.inject("forge.changes.toolbar", () => ctx.slots.register({
|
|
11270
|
+
name: "forge.changes.toolbar",
|
|
11271
|
+
id: "git-worktree-checkout-pr",
|
|
11272
|
+
order: 20,
|
|
11273
|
+
locale: NS,
|
|
11274
|
+
inject: forgeSlotDeps
|
|
11275
|
+
}, ForgeDiffToolbarCheckoutButton));
|
|
9763
11276
|
const form = new CardForm(groupingForm);
|
|
9764
11277
|
const store = form.bind();
|
|
9765
11278
|
const describeFace = ctx.configForms.describe();
|
|
@@ -9817,7 +11330,12 @@ window.__ModuleLoader__.load((() => {
|
|
|
9817
11330
|
[
|
|
9818
11331
|
"src/client/BranchChip.module.css",
|
|
9819
11332
|
"@laoyuehanni/dsh-git-worktree/BranchChip.module.css",
|
|
9820
|
-
"/* Branch chip row inside the composer tool row (conversation.input_1594205807.left_1594205807,\n * right of the mode chips). A single chip button: the branch picker (the\n * worktree toggle that used to share this dock is gone — worktree actions\n * live in the branch menu's right-click).\n *\n * Geometry mirrors the composer trigger chips in the DSH base (see\n * PermissionSelect / ModelSelect): 28px height, 13/20 medium-secondary\n * label, transparent fill, no outline — the dock stays at the same\n * visual weight as the surrounding chips. */\n\n.dock_1594205807 {\n display: inline-flex;\n align-items: stretch;\n height: 28px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n min-height: 28px;\n overflow: hidden;\n}\n\n.chip_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .chip_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.branch_1594205807 {\n max-width: 16em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Confirm flyout: the second-level panel opening right of the branch\n * card (the base Menu's submenu posture: r20, elevation-prominent\n * hairline, --dsw-specific-menu with --dsw-menu-backdrop-filter). */\n.popCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n width: max-content;\n min-width: 248px;\n max-width: min(300px, 80vw);\n padding: 10px 12px 8px;\n border: 0;\n border-radius: var(--dsw-radius-lg, 14px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 8px;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.popAsk_1594205807 {\n margin: 0;\n padding: 0 2px;\n font-size: 13px;\n line-height: 19px;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popSubject_1594205807 {\n margin: 0;\n padding: 0 2px;\n font-size: 13px;\n line-height: 19px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popDetails_1594205807 {\n padding: 0 2px;\n}\n\n.popDetail_1594205807 {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.popDetailWarn_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.popActions_1594205807 {\n display: flex;\n gap: 6px;\n padding: 2px 0 0;\n}\n\n.popActions_1594205807 button {\n flex: 1 1 0;\n height: 30px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .popActions_1594205807 button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.popActions_1594205807 button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.popActions_1594205807 button:last-child {\n color: var(--dsw-alias-link);\n font-weight: 500;\n}\n\n.popActions_1594205807 button.popConfirmDanger_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n font-weight: 500;\n}\n\n@media (hover: hover) {\n .popActions_1594205807 button.popConfirmDanger_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover));\n }\n}\n\n/* ── Branch picker popup (BranchMenu) ──────────────────────────────\n * Upward-opening card pinned above the chip, in the Menu's card chrome\n * (r20, elevation-prominent hairline, --dsw-specific-menu with\n * --dsw-menu-backdrop-filter). */\n.menuCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n display: flex;\n flex-direction: row;\n width: min(360px, calc(100vw - 24px));\n max-height: min(420px, 60vh);\n overflow: hidden;\n padding: 4px;\n border: 0;\n border-radius: var(--dsw-radius-xl, 20px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n/* Left tool strip (IDEA branch-panel posture at popup scale). */\n.menuToolbar_1594205807 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 2px;\n flex-shrink: 0;\n width: 32px;\n padding: 0 2px;\n margin-right: 4px;\n border-right: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.menuToolButton_1594205807 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: 0 auto;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuToolButton_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuToolButton_1594205807:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.menuToolButtonRunning_1594205807 svg {\n animation: menuToolPulse 700ms ease-in-out infinite alternate;\n}\n\n.menuToolButtonRunning_1594205807:disabled {\n opacity: 1;\n cursor: progress;\n}\n\n@keyframes menuToolPulse {\n from { opacity: 1; }\n to { opacity: 0.25; }\n}\n\n/* The main column: heading + scrollable rows + pinned search. */\n.menuMain_1594205807 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.menuMainHidden_1594205807 {\n display: none;\n}\n\n.menuHeading_1594205807 {\n padding: 6px 8px 4px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n.menuRows_1594205807 {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n.menuRow_1594205807 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuRow_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuRowSelected_1594205807 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n@media (hover: hover) {\n .menuRowSelected_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active);\n }\n}\n\n.menuRowPicked_1594205807 {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 16%, transparent);\n}\n\n@media (hover: hover) {\n .menuRowPicked_1594205807:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 20%, transparent);\n }\n}\n\n.menuRowLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuRowArrow_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n flex-shrink: 0;\n font-size: 11px;\n line-height: 20px;\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n}\n\n.menuRowAhead_1594205807 { color: var(--dsw-alias-state-success-primary); }\n.menuRowBehind_1594205807 { color: var(--dsw-alias-link); }\n.menuRowGone_1594205807 { color: var(--dsw-alias-state-warn-primary); }\n.menuRowOutgoing_1594205807 { display: inline-flex; transform: rotate(180deg); }\n\n.menuSearchMark_1594205807 {\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 32%, transparent);\n border-radius: var(--dsw-radius-xs, 4px);\n}\n\n.menuGroup_1594205807 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuGroup_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuGroupTop_1594205807 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.menuGroupLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuGroupChevron_1594205807 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n transition: transform 120ms ease;\n}\n\n.menuGroupChevronOpen_1594205807 {\n transform: rotate(90deg);\n}\n\n.menuGroupCount_1594205807 {\n flex-shrink: 0;\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.menuEmpty_1594205807 {\n padding: 10px 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n text-align: center;\n}\n\n.menuSearchWrap_1594205807 {\n flex-shrink: 0;\n margin-top: 2px;\n padding-top: 4px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.menuSearch_1594205807 {\n box-sizing: border-box;\n width: 100%;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuSearch_1594205807::placeholder {\n color: var(--dsw-alias-label-secondary);\n}\n\n.menuSearch_1594205807:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.menuCreate_1594205807 {\n box-sizing: border-box;\n width: 100%;\n min-width: 220px;\n height: 32px;\n padding: 0 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.1));\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.04));\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 400;\n line-height: 20px;\n transition: border-color 120ms ease, background-color 120ms ease;\n}\n\n.menuCreate_1594205807::placeholder {\n color: var(--dsw-alias-label-tertiary, var(--dsw-alias-label-secondary));\n}\n\n.menuCreate_1594205807:focus {\n outline: none;\n border-color: var(--dsw-alias-link);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.menuCreate_1594205807:disabled {\n opacity: 0.5;\n}\n\n.menuCreateHintBad_1594205807 {\n margin: 0;\n padding: 0 2px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-state-error-primary);\n}\n\n/* ── Row context menu (BranchMenu right-click) ───────────────────── */\n.ctxCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1001;\n width: max-content;\n max-width: 280px;\n padding: 4px;\n border: 0;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.ctxHeader_1594205807 {\n padding: 4px 8px 2px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.ctxItem_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n white-space: nowrap;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .ctxItem_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.ctxItem_1594205807:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n outline: none;\n}\n\n.ctxItem_1594205807:disabled {\n cursor: default;\n opacity: 0.45;\n}\n\n.ctxItem_1594205807 svg {\n flex-shrink: 0;\n opacity: 0.75;\n}\n\n.ctxItemDanger_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n@media (hover: hover) {\n .ctxItemDanger_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover));\n }\n}\n\n.ctxItemLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.menuCard_1594205807.menuCardGraph_1594205807 {\n width: min(1060px, calc(100vw - 24px));\n height: 700px;\n}\n\n.menuCardGraph_1594205807 .menuMain_1594205807 {\n flex: 0 0 236px;\n}\n\n.menuToolActive_1594205807 {\n color: var(--dsw-alias-state-business-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);\n}\n\n@media (max-width: 800px) {\n .menuCardGraph_1594205807 .menuMain_1594205807 {\n flex-basis: 180px;\n }\n}\n\n@media (max-width: 640px) {\n .menuCardGraph_1594205807 .menuMain_1594205807 {\n flex-basis: 176px;\n }\n}\n"
|
|
11333
|
+
"/* Branch chip row inside the composer tool row (conversation.input_1594205807.left_1594205807,\n * right of the mode chips). A single chip button: the branch picker (the\n * worktree toggle that used to share this dock is gone — worktree actions\n * live in the branch menu's right-click).\n *\n * Geometry mirrors the composer trigger chips in the DSH base (see\n * PermissionSelect / ModelSelect): 28px height, 13/20 medium-secondary\n * label, transparent fill, no outline — the dock stays at the same\n * visual weight as the surrounding chips. */\n\n.dock_1594205807 {\n display: inline-flex;\n align-items: stretch;\n height: 28px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n min-height: 28px;\n overflow: hidden;\n}\n\n.chip_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 100%;\n padding: 0 8px;\n border: none;\n border-radius: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .chip_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.branch_1594205807 {\n max-width: 16em;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Confirm flyout: the second-level panel opening right of the branch\n * card (the base Menu's submenu posture: r20, elevation-prominent\n * hairline, --dsw-specific-menu with --dsw-menu-backdrop-filter). */\n.popCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n width: max-content;\n min-width: 256px;\n max-width: min(340px, 84vw);\n padding: 12px 12px 10px;\n border: 0;\n border-radius: var(--dsw-radius-lg, 14px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 9px;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.popAsk_1594205807 {\n margin: 0;\n padding: 0 2px;\n font-size: 13px;\n line-height: 19px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.popSubject_1594205807 {\n margin: 0;\n padding: 0 2px;\n font-size: 13px;\n line-height: 19px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popTargetCard_1594205807 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n}\n\n.popSubjectRow_1594205807 {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n color: var(--dsw-alias-label-primary);\n}\n\n.popSubjectRow_1594205807 > svg {\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.popSubjectName_1594205807 {\n flex: 1;\n min-width: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12px;\n font-weight: 500;\n line-height: 17px;\n overflow-wrap: anywhere;\n}\n\n.popTargetPath_1594205807 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.popDetails_1594205807 {\n display: flex;\n flex-direction: column;\n gap: 5px;\n padding: 0;\n}\n\n.popDetail_1594205807 {\n display: flex;\n align-items: center;\n gap: 7px;\n margin: 0;\n padding: 0 2px;\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.popDotSafe_1594205807,\n.popDotNeutral_1594205807,\n.popDotWarn_1594205807 {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.popDotSafe_1594205807 {\n background: var(--dsw-alias-state-success-primary, #30a46c);\n}\n\n.popDotNeutral_1594205807 {\n background: var(--dsw-alias-label-dimmed);\n}\n\n.popDotWarn_1594205807 {\n margin-top: 5px;\n background: var(--dsw-alias-state-error-primary);\n}\n\n.popDetailBanner_1594205807 {\n display: flex;\n align-items: flex-start;\n gap: 7px;\n margin: 0;\n padding: 7px 9px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-error-primary);\n overflow-wrap: anywhere;\n}\n\n.popDetailWarn_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.popActions_1594205807 {\n display: flex;\n gap: 6px;\n padding: 2px 0 0;\n}\n\n.popActions_1594205807 button {\n flex: 1 1 0;\n height: 30px;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 12.5px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .popActions_1594205807 button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.popActions_1594205807 button:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.popActions_1594205807 button:last-child {\n border-color: color-mix(in srgb, var(--dsw-alias-state-business-primary) 42%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 10%, transparent);\n color: var(--dsw-alias-link);\n font-weight: 500;\n}\n\n@media (hover: hover) {\n .popActions_1594205807 button:last-child:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-business-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 16%, transparent);\n }\n}\n\n.popActions_1594205807 button.popConfirmDanger_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 42%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-weight: 500;\n}\n\n@media (hover: hover) {\n .popActions_1594205807 button.popConfirmDanger_1594205807:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-error-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent);\n }\n}\n\n/* ── Branch picker popup (BranchMenu) ──────────────────────────────\n * Upward-opening card pinned above the chip, in the Menu's card chrome\n * (r20, elevation-prominent hairline, --dsw-specific-menu with\n * --dsw-menu-backdrop-filter). */\n.menuCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n display: flex;\n flex-direction: row;\n width: min(360px, calc(100vw - 24px));\n max-height: min(420px, 60vh);\n overflow: hidden;\n padding: 4px;\n border: 0;\n border-radius: var(--dsw-radius-xl, 20px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n/* Left tool strip (IDEA branch-panel posture at popup scale). */\n.menuToolbar_1594205807 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n justify-content: flex-end;\n gap: 2px;\n flex-shrink: 0;\n width: 32px;\n padding: 0 2px;\n margin-right: 4px;\n border-right: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.menuToolButton_1594205807 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n margin: 0 auto;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuToolButton_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuToolButton_1594205807:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.menuToolButtonRunning_1594205807 svg {\n animation: menuToolPulse 700ms ease-in-out infinite alternate;\n}\n\n.menuToolButtonRunning_1594205807:disabled {\n opacity: 1;\n cursor: progress;\n}\n\n@keyframes menuToolPulse {\n from { opacity: 1; }\n to { opacity: 0.25; }\n}\n\n/* The main column: heading + scrollable rows + pinned search. */\n.menuMain_1594205807 {\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n}\n\n.menuMainHidden_1594205807 {\n display: none;\n}\n\n.menuHeading_1594205807 {\n padding: 6px 8px 4px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n.menuRows_1594205807 {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n.menuRow_1594205807 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuRow_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuRowSelected_1594205807 {\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n@media (hover: hover) {\n .menuRowSelected_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active);\n }\n}\n\n.menuRowPicked_1594205807 {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 16%, transparent);\n}\n\n@media (hover: hover) {\n .menuRowPicked_1594205807:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 20%, transparent);\n }\n}\n\n.menuRowLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuRowArrow_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n flex-shrink: 0;\n font-size: 11px;\n line-height: 20px;\n font-weight: 400;\n font-variant-numeric: tabular-nums;\n}\n\n.menuRowAhead_1594205807 { color: var(--dsw-alias-state-success-primary); }\n.menuRowBehind_1594205807 { color: var(--dsw-alias-link); }\n.menuRowGone_1594205807 { color: var(--dsw-alias-state-warn-primary); }\n.menuRowOutgoing_1594205807 { display: inline-flex; transform: rotate(180deg); }\n\n.menuSearchMark_1594205807 {\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 32%, transparent);\n border-radius: var(--dsw-radius-xs, 4px);\n}\n\n.menuGroup_1594205807 {\n box-sizing: border-box;\n display: flex;\n align-items: center;\n gap: 6px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .menuGroup_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.menuGroupTop_1594205807 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.menuGroupLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.menuGroupChevron_1594205807 {\n flex-shrink: 0;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 12px;\n height: 12px;\n transition: transform 120ms ease;\n}\n\n.menuGroupChevronOpen_1594205807 {\n transform: rotate(90deg);\n}\n\n.menuGroupCount_1594205807 {\n flex-shrink: 0;\n font-size: 12px;\n line-height: 20px;\n font-weight: 400;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.menuEmpty_1594205807 {\n padding: 10px 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary);\n text-align: center;\n}\n\n.menuSearchWrap_1594205807 {\n flex-shrink: 0;\n margin-top: 2px;\n padding-top: 4px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.menuSearch_1594205807 {\n box-sizing: border-box;\n width: 100%;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuSearch_1594205807::placeholder {\n color: var(--dsw-alias-label-secondary);\n}\n\n.menuSearch_1594205807:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.menuCreate_1594205807 {\n box-sizing: border-box;\n width: 100%;\n min-width: 220px;\n height: 32px;\n padding: 0 10px;\n border: 1px solid var(--dsw-alias-border-l2, rgba(255, 255, 255, 0.1));\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.04));\n color: inherit;\n font: inherit;\n font-size: 13px;\n font-weight: 400;\n line-height: 20px;\n transition: border-color 120ms ease, background-color 120ms ease;\n}\n\n.menuCreate_1594205807::placeholder {\n color: var(--dsw-alias-label-tertiary, var(--dsw-alias-label-secondary));\n}\n\n.menuCreate_1594205807:focus {\n outline: none;\n border-color: var(--dsw-alias-link);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.menuCreate_1594205807:disabled {\n opacity: 0.5;\n}\n\n.menuCreateHintBad_1594205807 {\n margin: 0;\n padding: 6px 8px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 42%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-state-error-primary);\n}\n\n/* ── Row context menu (BranchMenu right-click) ───────────────────── */\n.ctxCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1001;\n width: max-content;\n max-width: 280px;\n padding: 4px;\n border: 0;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.ctxHeader_1594205807 {\n padding: 4px 8px 2px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.ctxItem_1594205807 {\n display: inline-flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n min-height: 28px;\n padding: 4px 8px;\n border: none;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n line-height: 20px;\n text-align: left;\n white-space: nowrap;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .ctxItem_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.ctxItem_1594205807:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover);\n outline: none;\n}\n\n.ctxItem_1594205807:disabled {\n cursor: default;\n opacity: 0.45;\n}\n\n.ctxItem_1594205807 svg {\n flex-shrink: 0;\n opacity: 0.75;\n}\n\n.ctxItemDanger_1594205807 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n@media (hover: hover) {\n .ctxItemDanger_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover));\n }\n}\n\n.ctxItemLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.menuCard_1594205807.menuCardGraph_1594205807 {\n width: min(1060px, calc(100vw - 24px));\n height: 700px;\n}\n\n.menuCardGraph_1594205807 .menuMain_1594205807 {\n flex: 0 0 236px;\n}\n\n.menuToolActive_1594205807 {\n color: var(--dsw-alias-state-business-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);\n}\n\n@media (max-width: 800px) {\n .menuCardGraph_1594205807 .menuMain_1594205807 {\n flex-basis: 180px;\n }\n}\n\n@media (max-width: 640px) {\n .menuCardGraph_1594205807 .menuMain_1594205807 {\n flex-basis: 176px;\n }\n}\n"
|
|
11334
|
+
],
|
|
11335
|
+
[
|
|
11336
|
+
"src/client/CheckoutPrModal.module.css",
|
|
11337
|
+
"@laoyuehanni/dsh-git-worktree/CheckoutPrModal.module.css",
|
|
11338
|
+
"/* Checkout PR/MR modal styles, aligned with DSH design tokens and WorktreeActionHost. */\n\n.dialog_174350820.dialog_174350820 {\n width: min(580px, 100%);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.body_174350820 {\n display: flex;\n flex-direction: column;\n gap: 12px;\n}\n\n.subtitle_174350820 {\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.banner_174350820 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-2);\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.controlsRow_174350820 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.input_174350820 {\n flex: 1 1 240px;\n height: 34px;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n outline: none;\n box-sizing: border-box;\n}\n\n.input_174350820:focus {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.input_174350820::placeholder {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.select_174350820 {\n height: 34px;\n max-width: 220px;\n padding: 0 8px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 12px;\n outline: none;\n}\n\n.select_174350820:focus {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.filterRow_174350820 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.filterTabs_174350820 {\n display: flex;\n flex-wrap: wrap;\n gap: 6px;\n}\n\n.refreshTab_174350820 {\n flex-shrink: 0;\n padding: 4px 8px;\n border: 0.5px solid transparent;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .refreshTab_174350820:hover:not(:disabled) {\n border-color: var(--dsw-alias-border-l4);\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.refreshTab_174350820:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.filterTab_174350820 {\n padding: 4px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n.filterTabActive_174350820 {\n border-color: var(--dsw-alias-state-business-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.candidateList_174350820 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n max-height: min(240px, 34vh);\n overflow-y: auto;\n padding: 2px 0;\n}\n\n.emptyList_174350820 {\n padding: 12px;\n border: 0.5px dashed var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n text-align: center;\n}\n\n.candidateRow_174350820 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n width: 100%;\n padding: 8px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .candidateRow_174350820:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.candidateRowSelected_174350820 {\n border-color: var(--dsw-alias-state-business-primary);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.candidateTop_174350820 {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.candidateNum_174350820 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 12px;\n font-weight: 600;\n color: var(--dsw-alias-link);\n flex-shrink: 0;\n}\n\n.candidateTitle_174350820 {\n flex: 1;\n min-width: 0;\n font-size: 13px;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.candidateMeta_174350820 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.previewCard_174350820 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid var(--dsw-alias-border-l4);\n background: var(--dsw-alias-bg-layer-2);\n font-size: 12px;\n}\n\n.previewHeader_174350820 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n min-width: 0;\n}\n\n.previewTitle_174350820 {\n font-weight: 600;\n color: var(--dsw-alias-label-primary);\n overflow-wrap: anywhere;\n}\n\n.previewLine_174350820 {\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.previewDl_174350820 {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n column-gap: 12px;\n row-gap: 5px;\n margin: 0;\n padding: 6px 0 2px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.previewDl_174350820 dt {\n margin: 0;\n color: var(--dsw-alias-label-secondary);\n white-space: nowrap;\n}\n\n.previewDl_174350820 dd {\n margin: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11.5px;\n line-height: 17px;\n color: var(--dsw-alias-label-primary);\n overflow-wrap: anywhere;\n}\n\n.ciBadge_174350820 {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n}\n\n.dotSafe_174350820,\n.dotPending_174350820,\n.dotWarn_174350820,\n.dotNeutral_174350820 {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.dotSafe_174350820 {\n background: var(--dsw-alias-state-success-primary, #30a46c);\n}\n\n.dotPending_174350820 {\n background: var(--dsw-alias-state-warn-primary, #e5993e);\n}\n\n.dotWarn_174350820 {\n background: var(--dsw-alias-state-error-primary);\n}\n\n.dotNeutral_174350820 {\n background: var(--dsw-alias-label-dimmed);\n}\n\n.existingOptions_174350820 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n margin-top: 2px;\n}\n\n.radioLabel_174350820 {\n display: flex;\n align-items: center;\n gap: 6px;\n font-size: 12px;\n color: var(--dsw-alias-label-primary);\n cursor: pointer;\n}\n\n.radioCard_174350820 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 7px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.02));\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .radioCard_174350820:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.radioCardSelected_174350820 {\n border-color: color-mix(in srgb, var(--dsw-alias-state-business-primary) 55%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 8%, transparent);\n color: var(--dsw-alias-label-primary);\n}\n\n.radioCard_174350820 input[type='radio'] {\n margin: 2px 0 0;\n flex-shrink: 0;\n}\n\n.infoNote_174350820 {\n display: flex;\n align-items: center;\n gap: 7px;\n padding: 6px 8px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.03));\n font-size: 11.5px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.progressCard_174350820 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid var(--dsw-alias-state-business-primary);\n background: var(--dsw-alias-bg-layer-2);\n font-size: 12px;\n}\n\n.progressTrack_174350820 {\n width: 100%;\n height: 6px;\n border-radius: 999px;\n background: var(--dsw-alias-border-l4);\n overflow: hidden;\n}\n\n.progressFill_174350820 {\n height: 100%;\n background: var(--dsw-alias-state-business-primary);\n transition: width 150ms ease-out;\n}\n\n.progressLog_174350820 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.footerWrap_174350820 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n width: 100%;\n flex-wrap: wrap;\n}\n\n.footerButtons_174350820 {\n display: flex;\n align-items: center;\n gap: 8px;\n margin-left: auto;\n}\n\n.status_174350820 {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.error_174350820 {\n padding: 8px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-error-primary);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.divergedCard_174350820 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n padding: 10px 12px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n}\n\n.divergedHead_174350820 {\n display: flex;\n align-items: center;\n gap: 7px;\n}\n\n.divergedTitle_174350820 {\n font-weight: 600;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.divergedDesc_174350820 {\n color: var(--dsw-alias-label-secondary);\n line-height: 17px;\n}\n\n.divergedActions_174350820 {\n display: flex;\n flex-wrap: wrap;\n gap: 8px;\n}\n\n.dangerButton_174350820 {\n color: var(--dsw-alias-state-error-primary);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 42%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n}\n\n@media (hover: hover) {\n .dangerButton_174350820:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-error-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent);\n }\n}\n"
|
|
9821
11339
|
],
|
|
9822
11340
|
[
|
|
9823
11341
|
"src/client/CommitGraph.module.css",
|
|
@@ -9832,7 +11350,7 @@ window.__ModuleLoader__.load((() => {
|
|
|
9832
11350
|
[
|
|
9833
11351
|
"src/client/GitWorktreeCard.module.css",
|
|
9834
11352
|
"@laoyuehanni/dsh-git-worktree/GitWorktreeCard.module.css",
|
|
9835
|
-
"/* git-worktree bundle configuration on the Plugins page.\n * Visual language mirrors DSH settings cards: semantic alias tokens only,\n * native Switch/Tag/Button primitives, font-weight <= 500. */\n\n.summary_1463286416 {\n margin: 0;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.page_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.note_1463286416 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-
|
|
11353
|
+
"/* git-worktree bundle configuration on the Plugins page.\n * Visual language mirrors DSH settings cards: semantic alias tokens only,\n * native Switch/Tag/Button primitives, font-weight <= 500. */\n\n.summary_1463286416 {\n margin: 0;\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.page_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.note_1463286416 {\n margin: 0;\n padding: 8px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n\n.sectionTitle_1463286416 {\n margin-top: 6px;\n padding-bottom: 4px;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n font-size: 11px;\n font-weight: 500;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.field_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.fieldLabel_1463286416 {\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-secondary);\n}\n\n.rootRow_1463286416 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n min-width: 0;\n}\n\n.rootValue_1463286416 {\n padding: 5px 8px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n overflow-wrap: anywhere;\n}\n\n.hint_1463286416 {\n margin: 0;\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.footer_1463286416 {\n display: flex;\n align-items: center;\n justify-content: flex-end;\n gap: 8px;\n padding: 8px 0 4px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.failed_1463286416 {\n flex: 1;\n min-width: 0;\n margin: 0;\n padding: 6px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.toggleRow_1463286416 {\n margin-top: 8px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n gap: 12px;\n}\n\n.toggleText_1463286416 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggleLabel_1463286416 {\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.toggleHint_1463286416 {\n color: var(--dsw-alias-label-tertiary);\n font-size: 12px;\n line-height: 18px;\n}\n\n.toggleControl_1463286416 {\n display: flex;\n align-items: center;\n flex: none;\n margin-top: 2px;\n}\n\n.manageRow_1463286416 {\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n gap: 12px;\n}\n\n.keepRow_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.keepControl_1463286416 {\n display: flex;\n justify-content: flex-start;\n}\n\n.keepInput_1463286416 {\n width: 96px;\n appearance: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n font: inherit;\n font-size: 13px;\n color: var(--dsw-alias-label-primary);\n padding: 6px 10px;\n}\n\n.keepInput_1463286416:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.keepInput_1463286416:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.keepBad_1463286416,\n.copyFilesBad_1463286416,\n.switchBad_1463286416 {\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.copyFilesRow_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.copyFilesInput_1463286416 {\n width: 100%;\n box-sizing: border-box;\n appearance: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n font: inherit;\n font-family: var(--ds-font-family-code, monospace);\n font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n padding: 6px 10px;\n resize: vertical;\n min-height: 64px;\n}\n\n.copyFilesInput_1463286416[aria-invalid='true'] {\n border-color: var(--dsw-alias-state-error-primary);\n}\n\n.copyFilesInput_1463286416:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.copyFilesInput_1463286416:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.historyRow_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.history_1463286416 {\n margin: 0;\n padding: 0;\n list-style: none;\n display: flex;\n flex-direction: column;\n gap: 4px;\n}\n\n.historyRun_1463286416 {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 8px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n}\n\n.historyTime_1463286416 {\n font-size: 12px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.historyLine_1463286416 {\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.historyChips_1463286416 {\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n gap: 5px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.historyChip_1463286416 {\n display: inline-block;\n padding: 1px 6px;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-bg-layer-1, rgba(255, 255, 255, 0.03));\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11px;\n color: var(--dsw-alias-label-primary);\n}\n\n.historySkipped_1463286416 {\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.historyFailed_1463286416 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n.historyMore_1463286416 {\n align-self: flex-start;\n padding: 0;\n border: none;\n background: none;\n font: inherit;\n font-size: 12px;\n line-height: 16px;\n font-weight: 500;\n color: var(--dsw-alias-link);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .historyMore_1463286416:hover {\n text-decoration: underline;\n }\n}\n"
|
|
9836
11354
|
],
|
|
9837
11355
|
[
|
|
9838
11356
|
"src/client/LegacySessionMenuItem.module.css",
|
|
@@ -9842,7 +11360,12 @@ window.__ModuleLoader__.load((() => {
|
|
|
9842
11360
|
[
|
|
9843
11361
|
"src/client/PushDialog.module.css",
|
|
9844
11362
|
"@laoyuehanni/dsh-git-worktree/PushDialog.module.css",
|
|
9845
|
-
".dialog_517543419 {\n width: min(420px, 100%);\n max-height: 100%;\n gap: 0;\n padding: 0;\n overflow: visible;\n border-radius: var(--dsw-radius-xl, 20px);\n font-size: 13px;\n line-height: 20px;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.header_517543419 {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 14px 12px 10px 16px;\n}\n\n.header_517543419 h2 {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 15px;\n line-height: 24px;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.header_517543419 h2 span {\n color: var(--dsw-alias-label-secondary);\n font-weight: 400;\n}\n\n.close_517543419,\n.refresh_517543419 {\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .close_517543419:hover:not(:disabled),\n .refresh_517543419:hover:not(:disabled),\n .textButton_517543419:hover:not(:disabled),\n .scope_517543419:hover:not(:disabled),\n .editorClose_517543419:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.body_517543419 {\n padding: 0 12px;\n min-height: 0;\n}\n\n.mapping_517543419 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n min-height:
|
|
11363
|
+
".dialog_517543419 {\n width: min(420px, 100%);\n max-height: 100%;\n gap: 0;\n padding: 0;\n overflow: visible;\n border-radius: var(--dsw-radius-xl, 20px);\n font-size: 13px;\n line-height: 20px;\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.header_517543419 {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 14px 12px 10px 16px;\n}\n\n.header_517543419 h2 {\n flex: 1;\n min-width: 0;\n margin: 0;\n font-size: 15px;\n line-height: 24px;\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.header_517543419 h2 span {\n color: var(--dsw-alias-label-secondary);\n font-weight: 400;\n}\n\n.close_517543419,\n.refresh_517543419 {\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .close_517543419:hover:not(:disabled),\n .refresh_517543419:hover:not(:disabled),\n .textButton_517543419:hover:not(:disabled),\n .scope_517543419:hover:not(:disabled),\n .editorClose_517543419:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.body_517543419 {\n padding: 0 12px;\n min-height: 0;\n}\n\n.mapping_517543419 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 6px;\n min-height: 36px;\n padding: 4px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-bg-layer-2);\n}\n\n.mapping_517543419 > svg {\n flex: none;\n color: var(--dsw-alias-label-secondary);\n}\n\n.source_517543419 {\n min-width: 0;\n max-width: min(200px, 50%);\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n\n.arrow_517543419 {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.destination_517543419 {\n display: inline-flex;\n align-items: center;\n gap: 3px;\n min-width: 0;\n max-width: 100%;\n}\n\n.remote_517543419 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.textButton_517543419,\n.scope_517543419 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n gap: 3px;\n border: 0;\n border-radius: var(--dsw-radius-xs, 4px);\n padding: 2px 4px;\n background: transparent;\n color: var(--dsw-alias-link);\n font: inherit;\n cursor: pointer;\n max-width: 100%;\n}\n\n.chevron_517543419 {\n flex: none;\n}\n\n.targetWrap_517543419 {\n position: relative;\n min-width: 0;\n max-width: 180px;\n}\n\n.targetName_517543419 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* Floating target editor: elevation shadow carries the hairline stroke (border: 0). */\n.editor_517543419 {\n position: absolute;\n z-index: 5;\n top: calc(100% + 5px);\n left: 0;\n width: 200px;\n max-width: calc(100vw - 64px);\n padding: 10px;\n border: 0;\n border-radius: var(--dsw-radius-lg, 16px);\n background: var(--dsw-specific-menu, var(--dsw-alias-bg-layer-2));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l3);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n}\n\n.editorEnd_517543419 {\n left: auto;\n right: 0;\n}\n\n.editorHead_517543419 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 6px;\n margin-bottom: 5px;\n}\n\n.editor_517543419 label {\n display: block;\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.editorClose_517543419 {\n display: grid;\n place-items: center;\n width: 20px;\n height: 20px;\n flex: none;\n margin: -3px -4px 0 0;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-xs, 4px);\n background: transparent;\n color: var(--dsw-alias-label-tertiary);\n cursor: pointer;\n}\n\n.editor_517543419 input {\n box-sizing: border-box;\n width: 100%;\n padding: 5px 7px;\n font: inherit;\n border: 0.5px solid var(--dsw-alias-border-l3);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n}\n\n.editor_517543419 input[aria-invalid='true'] {\n border-color: var(--dsw-alias-state-error-primary);\n}\n\n.commits_517543419 {\n padding: 8px 10px 12px;\n min-height: 96px;\n}\n\n.count_517543419 {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary);\n margin-bottom: 6px;\n}\n\n.previewStatus_517543419 {\n margin-left: 8px;\n}\n\n.list_517543419 {\n list-style: none;\n margin: 0;\n padding: 0 5px 0 0;\n max-height: min(168px, 28vh);\n overflow-y: auto;\n overscroll-behavior: contain;\n}\n\n.list_517543419 li {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 28px;\n}\n\n.list_517543419 svg {\n width: 14px;\n height: 14px;\n flex: none;\n fill: none;\n stroke: var(--dsw-alias-label-tertiary);\n stroke-width: 1.5;\n}\n\n.list_517543419 li span {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.empty_517543419 {\n display: grid;\n place-items: center;\n min-height: 60px;\n margin: 0;\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.hint_517543419 {\n margin: 6px 0 0;\n font-size: 11px;\n line-height: 17px;\n color: var(--dsw-alias-label-tertiary);\n}\n\n.error_517543419 {\n max-height: 128px;\n margin-bottom: 8px;\n padding: 8px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n overflow: auto;\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-error-primary);\n overflow-wrap: anywhere;\n}\n\n.errorSummary_517543419 {\n margin: 0 0 4px;\n font-weight: 500;\n}\n\n.errorSummary_517543419:last-child {\n margin-bottom: 0;\n}\n\n.errorDetail_517543419 {\n max-height: 64px;\n overflow: auto;\n font-size: 11px;\n line-height: 16px;\n white-space: pre-wrap;\n color: var(--dsw-alias-label-secondary);\n}\n\n.footer_517543419 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n flex-wrap: wrap;\n gap: 8px;\n margin: 0 16px;\n padding: 12px 0 14px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.tagOptions_517543419 {\n display: flex;\n align-items: center;\n gap: 4px;\n min-width: 0;\n}\n\n.checkbox_517543419 {\n font-size: 12px;\n white-space: nowrap;\n color: var(--dsw-alias-label-secondary);\n}\n\n.scope_517543419 {\n color: var(--dsw-alias-label-secondary);\n font-size: 12px;\n}\n\n.actions_517543419 {\n display: flex;\n align-items: center;\n gap: 4px;\n margin-left: auto;\n}\n\n.split_517543419 {\n display: flex;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-button-primary-fill);\n color: var(--dsw-alias-label-primary-foreground);\n}\n\n.push_517543419,\n.splitArrow_517543419 {\n height: 28px;\n padding: 0 10px;\n border: 0;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 12px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.push_517543419 {\n min-width: 56px;\n border-radius: var(--dsw-radius-sm, 8px) 0 0 var(--dsw-radius-sm, 8px);\n}\n\n.splitArrow_517543419 {\n position: relative;\n display: grid;\n place-items: center;\n width: 27px;\n padding: 0;\n border-radius: 0 var(--dsw-radius-sm, 8px) var(--dsw-radius-sm, 8px) 0;\n}\n\n.splitArrow_517543419::before {\n content: '';\n position: absolute;\n left: 0;\n top: 7px;\n bottom: 7px;\n border-left: 1px solid currentColor;\n opacity: 0.18;\n}\n\n@media (hover: hover) {\n .push_517543419:hover:not(:disabled),\n .splitArrow_517543419:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-active);\n }\n}\n\n.dialog_517543419 button:disabled,\n.dialog_517543419 input:disabled {\n opacity: 0.4;\n cursor: not-allowed;\n}\n\n.close_517543419:focus-visible,\n.refresh_517543419:focus-visible,\n.textButton_517543419:focus-visible,\n.scope_517543419:focus-visible,\n.editorClose_517543419:focus-visible,\n.push_517543419:focus-visible,\n.splitArrow_517543419:focus-visible,\n.list_517543419:focus-visible,\n.editor_517543419 input:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n@media (max-height: 450px) {\n .list_517543419 { max-height: 70px; }\n .header_517543419 { padding-top: 8px; padding-bottom: 6px; }\n .commits_517543419 { min-height: 65px; }\n .footer_517543419 { padding-block: 8px; }\n}\n"
|
|
11364
|
+
],
|
|
11365
|
+
[
|
|
11366
|
+
"src/client/RemoveConfirmModal.module.css",
|
|
11367
|
+
"@laoyuehanni/dsh-git-worktree/RemoveConfirmModal.module.css",
|
|
11368
|
+
"/* Shared visual layout and danger tokens for RemoveConfirmModal. */\n\n.dialog_316074196.dialog_316074196 {\n width: min(440px, 100%);\n}\n\n.body_316074196 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.targetCard_316074196 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n padding: 10px 12px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n}\n\n.branchRow_316074196 {\n display: flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.branchIcon_316074196 {\n display: inline-flex;\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.branchName_316074196 {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary);\n}\n\n.targetPath_316074196 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 11.5px;\n line-height: 1.45;\n color: var(--dsw-alias-label-secondary);\n word-break: break-all;\n}\n\n.facts_316074196 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.factRow_316074196 {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 12.5px;\n line-height: 1.45;\n color: var(--dsw-alias-label-secondary);\n}\n\n.dotNeutral_316074196,\n.dotSafe_316074196 {\n width: 6px;\n height: 6px;\n border-radius: 50%;\n flex-shrink: 0;\n}\n\n.dotNeutral_316074196 {\n background: var(--dsw-alias-label-dimmed);\n}\n\n.dotSafe_316074196 {\n background: var(--dsw-alias-state-success-primary, #30a46c);\n}\n\n.warnBanner_316074196 {\n display: flex;\n align-items: flex-start;\n gap: 8px;\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n color: var(--dsw-alias-state-error-primary);\n font-size: 12.5px;\n line-height: 1.45;\n}\n\n.dotWarn_316074196 {\n width: 6px;\n height: 6px;\n margin-top: 6px;\n border-radius: 50%;\n flex-shrink: 0;\n background: var(--dsw-alias-state-error-primary);\n}\n\n.status_316074196 {\n font-size: 12.5px;\n color: var(--dsw-alias-label-dimmed);\n}\n\n.error_316074196 {\n padding: 8px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 1.45;\n color: var(--dsw-alias-state-error-primary);\n white-space: pre-wrap;\n word-break: break-word;\n}\n\n.dangerButton_316074196 {\n color: var(--dsw-alias-state-error-primary);\n border-color: color-mix(in srgb, var(--dsw-alias-state-error-primary) 42%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n}\n\n@media (hover: hover) {\n .dangerButton_316074196:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-error-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent);\n }\n}\n"
|
|
9846
11369
|
],
|
|
9847
11370
|
[
|
|
9848
11371
|
"src/client/SidebarWorktreeBadge.module.css",
|
|
@@ -9857,12 +11380,12 @@ window.__ModuleLoader__.load((() => {
|
|
|
9857
11380
|
[
|
|
9858
11381
|
"src/client/WorktreeActionHost.module.css",
|
|
9859
11382
|
"@laoyuehanni/dsh-git-worktree/WorktreeActionHost.module.css",
|
|
9860
|
-
"/* Root overlay dialogs triggered from sidebar/header context menus. */\n\n.createDialog_1401658256.createDialog_1401658256 {\n width: min(460px, 100%);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.body_1401658256 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.searchInput_1401658256 {\n width: 100%;\n height: 34px;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n outline: none;\n box-sizing: border-box;\n}\n\n.searchInput_1401658256:focus {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.searchInput_1401658256::placeholder {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.list_1401658256 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: min(320px, 45vh);\n overflow-y: auto;\n padding: 2px 0;\n}\n\n.branchRow_1401658256 {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .branchRow_1401658256:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.branchRow_1401658256:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.branchRow_1401658256:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.cutoutRow_1401658256 {\n color: var(--dsw-alias-link);\n}\n\n.branchIcon_1401658256 {\n display: inline-flex;\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.cutoutRow_1401658256 .branchIcon_1401658256 {\n color: var(--dsw-alias-link);\n}\n\n.branchName_1401658256 {\n flex: 1;\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.
|
|
11383
|
+
"/* Root overlay dialogs triggered from sidebar/header context menus. */\n\n.createDialog_1401658256.createDialog_1401658256 {\n width: min(460px, 100%);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.body_1401658256 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n}\n\n.searchInput_1401658256 {\n width: 100%;\n height: 34px;\n padding: 0 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n outline: none;\n box-sizing: border-box;\n}\n\n.searchInput_1401658256:focus {\n border-color: var(--dsw-alias-state-business-primary);\n}\n\n.searchInput_1401658256::placeholder {\n color: var(--dsw-alias-label-dimmed);\n}\n\n.list_1401658256 {\n display: flex;\n flex-direction: column;\n gap: 2px;\n max-height: min(320px, 45vh);\n overflow-y: auto;\n padding: 2px 0;\n}\n\n.branchRow_1401658256 {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n padding: 7px 10px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-primary);\n font: inherit;\n font-size: 13px;\n text-align: left;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .branchRow_1401658256:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.branchRow_1401658256:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.branchRow_1401658256:disabled {\n opacity: 0.5;\n cursor: default;\n}\n\n.cutoutRow_1401658256 {\n margin-bottom: 4px;\n padding: 9px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-business-primary) 34%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 7%, transparent);\n color: var(--dsw-alias-link);\n}\n\n@media (hover: hover) {\n .cutoutRow_1401658256:hover:not(:disabled) {\n border-color: color-mix(in srgb, var(--dsw-alias-state-business-primary) 55%, transparent);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 12%, transparent);\n }\n}\n\n.branchIcon_1401658256 {\n display: inline-flex;\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.cutoutRow_1401658256 .branchIcon_1401658256 {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n width: 22px;\n height: 22px;\n border-radius: var(--dsw-radius-xs, 6px);\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, transparent);\n color: var(--dsw-alias-link);\n}\n\n.branchName_1401658256 {\n flex: 1;\n min-width: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.cutoutRow_1401658256 .branchName_1401658256 {\n font-family: inherit;\n font-size: 13px;\n font-weight: 500;\n}\n\n.targetCard_1401658256 {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-layer-2);\n}\n\n.targetCard_1401658256 > svg {\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.targetLabel_1401658256 {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n flex-shrink: 0;\n}\n\n.targetBranch_1401658256 {\n flex: 1;\n min-width: 0;\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.hint_1401658256 {\n margin: 0;\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.status_1401658256 {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n padding: 6px 0;\n}\n\n.empty_1401658256 {\n font-size: 13px;\n color: var(--dsw-alias-label-dimmed);\n padding: 12px 4px;\n text-align: center;\n}\n\n.error_1401658256 {\n padding: 8px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-error-primary);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n"
|
|
9861
11384
|
],
|
|
9862
11385
|
[
|
|
9863
11386
|
"src/client/WorktreeManagerModal.module.css",
|
|
9864
11387
|
"@laoyuehanni/dsh-git-worktree/WorktreeManagerModal.module.css",
|
|
9865
|
-
"/* The worktree manager dialog opened from the git-worktree settings card.\n * Semantic alias tokens only, mirroring DSH dialog chrome and typography. */\n\n.dialog_854325390.dialog_854325390 {\n width: min(680px, 100%);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.body_854325390 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.toolbar_854325390 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.scopeBar_854325390 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-module-platform, var(--dsw-alias-bg-layer-2));\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.scopeInfo_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.scopeName_854325390 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.scopeToggle_854325390 {\n flex-shrink: 0;\n border: 0;\n padding: 2px 6px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: transparent;\n color: var(--dsw-alias-link);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .scopeToggle_854325390:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.scopeToggle_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.emptyAction_854325390 {\n margin-left: 8px;\n}\n\n.count_854325390 {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.refresh_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 24px;\n padding: 0 8px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .refresh_854325390:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.refresh_854325390:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n.refresh_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.status_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n padding: 8px 0;\n}\n\n.error_854325390 {\n font-size:
|
|
11388
|
+
"/* The worktree manager dialog opened from the git-worktree settings card.\n * Semantic alias tokens only, mirroring DSH dialog chrome and typography. */\n\n.dialog_854325390.dialog_854325390 {\n width: min(680px, 100%);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.body_854325390 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.toolbar_854325390 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n}\n\n.scopeBar_854325390 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 6px 10px;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-bg-module-platform, var(--dsw-alias-bg-layer-2));\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.scopeInfo_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n min-width: 0;\n}\n\n.scopeName_854325390 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.scopeToggle_854325390 {\n flex-shrink: 0;\n border: 0;\n padding: 2px 6px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: transparent;\n color: var(--dsw-alias-link);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .scopeToggle_854325390:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.scopeToggle_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.emptyAction_854325390 {\n margin-left: 8px;\n}\n\n.count_854325390 {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.refresh_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n height: 24px;\n padding: 0 8px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n font: inherit;\n font-size: 12px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .refresh_854325390:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.refresh_854325390:disabled {\n opacity: 0.45;\n cursor: default;\n}\n\n.refresh_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.status_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n padding: 8px 0;\n}\n\n.error_854325390 {\n padding: 8px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-error-primary);\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n}\n\n.empty_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-dimmed);\n padding: 12px 0;\n}\n\n.warn_854325390 {\n padding: 8px 10px;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-warn-primary) 45%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-warn-primary) 10%, transparent);\n font-size: 12px;\n line-height: 17px;\n color: var(--dsw-alias-state-warn-primary);\n}\n\n.list_854325390 {\n display: flex;\n flex-direction: column;\n gap: 10px;\n max-height: min(420px, 50vh);\n overflow-y: auto;\n padding: 1px;\n}\n\n.group_854325390 {\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-md, 12px);\n overflow: hidden;\n}\n\n.groupHead_854325390 {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 7px 10px;\n background: var(--dsw-alias-bg-module-platform, var(--dsw-alias-bg-layer-2));\n font-size: 12px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary);\n}\n\n.groupIcon_854325390 {\n display: inline-flex;\n flex-shrink: 0;\n color: var(--dsw-alias-label-secondary);\n}\n\n.groupName_854325390 {\n min-width: 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.groupCount_854325390 {\n margin-left: auto;\n flex-shrink: 0;\n font-size: 11px;\n font-weight: 400;\n color: var(--dsw-alias-label-secondary);\n}\n\n.row_854325390 {\n display: flex;\n align-items: center;\n gap: 10px;\n padding: 8px 10px 8px 29px;\n border-bottom: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.row_854325390:last-child {\n border-bottom: 0;\n}\n\n.rowMain_854325390 {\n flex: 1;\n min-width: 0;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.rowHead_854325390 {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.rowBranch_854325390 {\n font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;\n font-size: 12.5px;\n font-weight: 500;\n color: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rowDirty_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 5px;\n padding: 1px 6px;\n border-radius: 999px;\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 12%, transparent);\n font-size: 11px;\n line-height: 16px;\n color: var(--dsw-alias-state-error-primary);\n flex-shrink: 0;\n}\n\n.rowDirtyDot_854325390 {\n width: 5px;\n height: 5px;\n border-radius: 50%;\n background: var(--dsw-alias-state-error-primary);\n flex-shrink: 0;\n}\n\n.rowActivity_854325390 {\n margin-left: auto;\n flex-shrink: 0;\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.rowPath_854325390 {\n font-size: 11px;\n line-height: 16px;\n color: var(--dsw-alias-label-secondary);\n max-width: 100%;\n}\n\n.rowActions_854325390 {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n flex-shrink: 0;\n}\n\n.rowAction_854325390 {\n display: grid;\n place-items: center;\n width: 28px;\n height: 28px;\n padding: 0;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .rowAction_854325390:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.rowAction_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.rowAction_854325390:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.remove_854325390 {\n appearance: none;\n flex-shrink: 0;\n border: 0.5px solid color-mix(in srgb, var(--dsw-alias-state-error-primary) 42%, transparent);\n border-radius: var(--dsw-radius-sm, 8px);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 10%, transparent);\n font: inherit;\n font-size: 12px;\n color: var(--dsw-alias-state-error-primary);\n padding: 4px 10px;\n height: 28px;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .remove_854325390:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-error-primary);\n background: color-mix(in srgb, var(--dsw-alias-state-error-primary) 18%, transparent);\n }\n}\n\n.remove_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.remove_854325390:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n"
|
|
9866
11389
|
]
|
|
9867
11390
|
];
|
|
9868
11391
|
const __dsh_remove_fallback = () => {
|