@laoyuehanni/dsh-git-worktree 0.4.13 → 0.4.14
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 +123 -49
- package/README.zh.md +123 -49
- package/docs/DETAIL.md +16 -0
- package/docs/DETAIL.zh.md +16 -0
- package/icon.svg +22 -0
- package/lib/client.js +548 -269
- package/locale/en.json +5 -1
- package/locale/zh.json +2 -1
- package/package.json +8 -3
package/lib/client.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
window.__ModuleLoader__.load({
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
window.__ModuleLoader__.load((() => {
|
|
2
|
+
const __dsh_id = "@laoyuehanni/dsh-git-worktree";
|
|
3
|
+
let __dsh_meta_used = false;
|
|
4
|
+
const __dsh_factory = (require) => {
|
|
4
5
|
var module = { exports: {} };
|
|
5
6
|
var exports = module.exports;
|
|
6
7
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
@@ -636,15 +637,6 @@ window.__ModuleLoader__.load({
|
|
|
636
637
|
}
|
|
637
638
|
//#endregion
|
|
638
639
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/PushDialog.module.css?inline
|
|
639
|
-
const css$5 = ".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}\n.header_517543419 { display: flex; align-items: center; gap: 8px; padding: 14px 12px 10px 16px; }\n.header_517543419 h2 { flex: 1; min-width: 0; margin: 0; font-size: 15px; line-height: 24px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.header_517543419 h2 span { color: var(--dsw-alias-label-secondary); font-weight: 400; }\n.close_517543419, .refresh_517543419 { display: grid; place-items: center; width: 28px; height: 28px; padding: 0; border: 0; border-radius: var(--dsw-radius-sm); background: transparent; color: var(--dsw-alias-label-tertiary); cursor: pointer; }\n.close_517543419:hover:not(:disabled), .refresh_517543419:hover:not(:disabled), .textButton_517543419:hover:not(:disabled), .scope_517543419:hover:not(:disabled), .editorClose_517543419:hover { background: var(--dsw-alias-interactive-bg-hover); }\n.body_517543419 { padding: 0 12px; min-height: 0; }\n.mapping_517543419 { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; min-height: 34px; padding: 3px 10px; border-radius: var(--dsw-radius-md); background: var(--dsw-alias-interactive-bg-hover); }\n.mapping_517543419 > svg { flex: none; color: var(--dsw-alias-label-secondary); }\n/* The branch being pushed may be long; give it up to half the row (the target keeps its own cap). */\n.source_517543419 { min-width: 0; max-width: min(200px, 50%); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }\n.arrow_517543419 { color: var(--dsw-alias-label-tertiary); }\n.destination_517543419 { display: inline-flex; align-items: center; gap: 3px; min-width: 0; max-width: 100%; }\n.remote_517543419 { color: var(--dsw-alias-label-secondary); overflow-wrap: anywhere; }\n.textButton_517543419, .scope_517543419 { display: inline-flex; align-items: center; justify-content: center; gap: 3px; border: 0; border-radius: var(--dsw-radius-xs); padding: 2px 4px; background: transparent; color: var(--dsw-alias-link); font: inherit; cursor: pointer; max-width: 100%; }\n.chevron_517543419 { width: 12px; height: 12px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }\n.targetWrap_517543419 { position: relative; min-width: 0; max-width: 180px; }\n.targetName_517543419 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.badge_517543419 { font-size: 11px; line-height: 18px; padding: 0 5px; border-radius: var(--dsw-radius-xs); background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-secondary); }\n.editor_517543419 { position: absolute; z-index: 5; top: calc(100% + 5px); left: 0; width: 200px; max-width: calc(100vw - 64px); padding: 10px; border: .5px solid var(--dsw-alias-border-l3); border-radius: var(--dsw-radius-lg); background: var(--dsw-alias-bg-layer-2); box-shadow: var(--dsw-elevation-prominent); }\n/* Near the dialog's right edge the editor lines up with the name's right edge instead. */\n.editorEnd_517543419 { left: auto; right: 0; }\n.editorHead_517543419 { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-bottom: 5px; }\n.editor_517543419 label { display: block; font-size: 11px; color: var(--dsw-alias-label-tertiary); }\n.editorClose_517543419 { display: grid; place-items: center; width: 20px; height: 20px; flex: none; margin: -3px -4px 0 0; padding: 0; border: 0; border-radius: var(--dsw-radius-xs); background: transparent; color: var(--dsw-alias-label-tertiary); cursor: pointer; }\n.editor_517543419 input { box-sizing: border-box; width: 100%; padding: 5px 7px; font: inherit; border: .5px solid var(--dsw-alias-border-l3); border-radius: var(--dsw-radius-sm); background: var(--dsw-alias-interactive-bg-hover); color: var(--dsw-alias-label-primary); }\n.editor_517543419 input[aria-invalid='true'] { border-color: var(--dsw-alias-state-error-primary); }\n.commits_517543419 { padding: 8px 10px 12px; min-height: 96px; }\n.count_517543419 { font-size: 11px; color: var(--dsw-alias-label-tertiary); margin-bottom: 6px; }\n.previewStatus_517543419 { margin-left: 8px; }\n.list_517543419 { list-style: none; margin: 0; padding: 0 5px 0 0; max-height: min(168px, 28vh); overflow-y: auto; overscroll-behavior: contain; }\n.list_517543419 li { display: flex; align-items: center; gap: 8px; min-height: 28px; }\n.list_517543419 svg { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--dsw-alias-label-tertiary); stroke-width: 1.5; }\n.list_517543419 li span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.empty_517543419 { display: grid; place-items: center; min-height: 60px; margin: 0; font-size: 12px; color: var(--dsw-alias-label-tertiary); }\n.hint_517543419 { margin: 6px 0 0; font-size: 11px; line-height: 17px; color: var(--dsw-alias-label-tertiary); }\n.error_517543419 { max-height: 120px; margin-bottom: 8px; overflow: auto; font-size: 12px; color: var(--dsw-alias-state-error-primary); overflow-wrap: anywhere; }\n/* A recognised cause leads in plain words; git's own text stays below it, quieter. */\n.errorSummary_517543419 { margin: 0 0 4px; font-weight: 500; }\n.errorSummary_517543419:last-child { margin-bottom: 0; }\n.errorDetail_517543419 { max-height: 64px; overflow: auto; font-size: 11px; line-height: 16px; white-space: pre-wrap; color: var(--dsw-alias-label-secondary); }\n.footer_517543419 { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin: 0 16px; padding: 12px 0 14px; border-top: .5px solid var(--dsw-alias-border-l2); }\n.tagOptions_517543419 { display: flex; align-items: center; gap: 4px; min-width: 0; }\n.checkbox_517543419 { display: flex; align-items: center; gap: 7px; font-size: 12px; white-space: nowrap; color: var(--dsw-alias-label-secondary); cursor: pointer; }\n.checkbox_517543419 input { appearance: none; margin: 0; width: 14px; height: 14px; border: 1px solid var(--dsw-alias-label-tertiary); border-radius: var(--dsw-radius-xs); display: grid; place-content: center; cursor: pointer; }\n.checkbox_517543419 input:checked { background: var(--dsw-alias-button-primary-fill); border-color: var(--dsw-alias-button-primary-fill); }\n.checkbox_517543419 input:checked::after { content: ''; width: 6px; height: 3px; border: solid var(--dsw-alias-label-primary-foreground); border-width: 0 0 1.5px 1.5px; transform: rotate(-45deg) translateY(-1px); }\n.scope_517543419 { color: var(--dsw-alias-label-secondary); font-size: 12px; }\n.actions_517543419 { display: flex; align-items: center; gap: 4px; margin-left: auto; }\n.split_517543419 { display: flex; border-radius: var(--dsw-radius-sm); background: var(--dsw-alias-button-primary-fill); color: var(--dsw-alias-label-primary-foreground); }\n.push_517543419, .splitArrow_517543419 { height: 28px; padding: 0 10px; border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; white-space: nowrap; cursor: pointer; }\n.push_517543419 { min-width: 56px; border-radius: var(--dsw-radius-sm) 0 0 var(--dsw-radius-sm); }\n.splitArrow_517543419 { position: relative; display: grid; place-items: center; width: 27px; padding: 0; border-radius: 0 var(--dsw-radius-sm) var(--dsw-radius-sm) 0; }\n.splitArrow_517543419::before { content: ''; position: absolute; left: 0; top: 7px; bottom: 7px; border-left: 1px solid currentColor; opacity: .18; }\n.push_517543419:hover:not(:disabled), .splitArrow_517543419:hover:not(:disabled) { background: var(--dsw-alias-interactive-bg-active); }\n.dialog_517543419 button:disabled, .dialog_517543419 input:disabled { opacity: .4; cursor: not-allowed; }\n/* Keyboard focus ring, spelled out like the plugin's other dialogs rather\n * than left to the host's global reset. */\n.close_517543419:focus-visible, .refresh_517543419:focus-visible, .textButton_517543419:focus-visible, .scope_517543419:focus-visible, .editorClose_517543419:focus-visible,\n.push_517543419:focus-visible, .splitArrow_517543419:focus-visible, .checkbox_517543419 input:focus-visible, .list_517543419:focus-visible, .editor_517543419 input:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n@media (max-height: 450px) { .list_517543419 { max-height: 70px; } .header_517543419 { padding-top: 8px; padding-bottom: 6px; } .commits_517543419 { min-height: 65px; } .footer_517543419 { padding-block: 8px; } }\n";
|
|
640
|
-
const tagId$5 = "@laoyuehanni/dsh-git-worktree/PushDialog.module.css";
|
|
641
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$5 + "\"]") === null) {
|
|
642
|
-
const tag = document.createElement("style");
|
|
643
|
-
tag.dataset.plugin = "@laoyuehanni/dsh-git-worktree";
|
|
644
|
-
tag.dataset.pluginCss = tagId$5;
|
|
645
|
-
tag.textContent = css$5;
|
|
646
|
-
document.head.appendChild(tag);
|
|
647
|
-
}
|
|
648
640
|
var PushDialog_module_default = {
|
|
649
641
|
"dialog": "dialog_517543419",
|
|
650
642
|
"header": "header_517543419",
|
|
@@ -693,11 +685,9 @@ window.__ModuleLoader__.load({
|
|
|
693
685
|
auth: "pushFailAuth"
|
|
694
686
|
};
|
|
695
687
|
function Chevron() {
|
|
696
|
-
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
className: PushDialog_module_default.chevron,
|
|
700
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)("path", { d: "m4 6 4 4 4-4" })
|
|
688
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconChevronDownOutlineRegular, {
|
|
689
|
+
size: 12,
|
|
690
|
+
className: PushDialog_module_default.chevron ?? ""
|
|
701
691
|
});
|
|
702
692
|
}
|
|
703
693
|
/**
|
|
@@ -1150,16 +1140,12 @@ window.__ModuleLoader__.load({
|
|
|
1150
1140
|
className: PushDialog_module_default.footer,
|
|
1151
1141
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1152
1142
|
className: PushDialog_module_default.tagOptions,
|
|
1153
|
-
children: [/* @__PURE__ */ (0, react_jsx_runtime.
|
|
1143
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Checkbox, {
|
|
1154
1144
|
className: PushDialog_module_default.checkbox,
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
onChange: (event) => {
|
|
1160
|
-
setTags(event.target.checked);
|
|
1161
|
-
}
|
|
1162
|
-
}), t("pushTags")]
|
|
1145
|
+
checked: tags,
|
|
1146
|
+
disabled,
|
|
1147
|
+
label: t("pushTags"),
|
|
1148
|
+
onChange: setTags
|
|
1163
1149
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Menu, {
|
|
1164
1150
|
open: menu === "tags",
|
|
1165
1151
|
dense: true,
|
|
@@ -1210,7 +1196,7 @@ window.__ModuleLoader__.load({
|
|
|
1210
1196
|
title: t("pushRefresh"),
|
|
1211
1197
|
"aria-label": t("pushRefresh"),
|
|
1212
1198
|
onClick: refresh,
|
|
1213
|
-
children:
|
|
1199
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 14 })
|
|
1214
1200
|
}),
|
|
1215
1201
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
1216
1202
|
size: "sm",
|
|
@@ -1636,21 +1622,14 @@ window.__ModuleLoader__.load({
|
|
|
1636
1622
|
}
|
|
1637
1623
|
//#endregion
|
|
1638
1624
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/CommitGraph.module.css?inline
|
|
1639
|
-
const css$4 = ".panel_486748374 {\n display: flex; flex-direction: column; flex: 1 1 auto; min-width: 0; min-height: 0;\n border-left: .5px solid color-mix(in srgb, currentColor 12%, transparent);\n font-size: 12px; color: var(--dsw-alias-label-primary, #303238);\n}\n.heading_486748374 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 8px 10px 8px 12px; flex-shrink: 0; }\n.branch_486748374 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 600; min-width: 0; flex: 0 1 auto; }\n.loaded_486748374 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--dsw-alias-label-tertiary, #929499); font-size: 11px; }\n.heading_486748374 > .iconButton_486748374:first-of-type { margin-left: auto; }\n.iconButton_486748374 { display: grid; place-items: center; border: 0; background: transparent; color: inherit; width: 22px; height: 22px; padding: 0; border-radius: 6px; cursor: pointer; font-size: 14px; flex-shrink: 0; }\n.closeIcon_486748374 { stroke-width: 1.8px; stroke-linecap: round; }\n.iconButton_486748374:hover, .textButton_486748374:hover { background: color-mix(in srgb, currentColor 7%, transparent); }\n.iconButton_486748374:disabled, .textButton_486748374:disabled { opacity: .4; cursor: default; }\n.search_486748374, .authorFilter_486748374 { box-sizing: border-box; min-width: 0; height: 30px; border: 0; border-radius: 7px; background: color-mix(in srgb, currentColor 5%, transparent); color: inherit; padding: 5px 8px; font: inherit; }\n.search_486748374 { width: 150px; flex: 0 1 150px; }\n.authorFilter_486748374 { width: 108px; flex: 0 1 108px; cursor: pointer; }\n.authorFilter_486748374 option { background: var(--dsw-alias-surface-raised, #303238); color: var(--dsw-alias-label-primary, #ededee); }\n.search_486748374:focus-visible, .authorFilter_486748374:focus-visible { outline: 1px solid var(--dsw-alias-label-primary-bluish, #4186f0); }\n.search_486748374::placeholder { color: var(--dsw-alias-label-tertiary, #929499); }\n.columns_486748374 { display: flex; align-items: center; gap: 8px; height: 25px; padding: 0 14px 0 8px; color: var(--dsw-alias-label-tertiary, #929499); font-size: 11px; flex-shrink: 0; }\n.columns_486748374 > span:first-child { flex: 0 0 auto; }\n.columns_486748374 > span:nth-child(2) { flex: 1; }\n.columns_486748374 > span:nth-child(3) { width: 70px; }\n.columns_486748374 > span:last-child { width: 99px; }\n.list_486748374 { flex: 1 1 0%; min-height: 58px; overflow: auto; padding: 0 6px; scrollbar-width: thin; }\n.row_486748374 { display: flex; align-items: center; gap: 8px; width: 100%; height: 36px; padding: 0 7px 0 2px; border: 0; border-radius: 7px; background: transparent; color: inherit; text-align: left; font: inherit; cursor: pointer; }\n.row_486748374:hover { background: color-mix(in srgb, currentColor 5%, transparent); }\n.selected_486748374, .selected_486748374:hover { background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 14%, transparent); }\n.row_486748374:focus-visible { outline: 1px solid var(--dsw-alias-label-primary-bluish, #4186f0); outline-offset: -1px; }\n.graph_486748374 { flex-shrink: 0; overflow: visible; }\n.graph_486748374 path { fill: none; stroke-width: 1.5px; }\n.subject_486748374 { flex: 1 1 auto; min-width: 40px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.author_486748374 { flex: 0 0 70px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-secondary, #75787e); font-size: 11px; }\n.date_486748374 { flex: 0 0 44px; color: var(--dsw-alias-label-secondary, #75787e); font-size: 11px; }\n.hash_486748374 { flex: 0 0 47px; font-size: 10px; color: var(--dsw-alias-label-tertiary, #929499); }\n.state_486748374 { padding: 16px; color: var(--dsw-alias-label-secondary, #75787e); overflow-wrap: anywhere; }\n.footer_486748374 { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 13px; min-height: 27px; color: var(--dsw-alias-label-tertiary, #929499); font-size: 11px; flex-shrink: 0; }\n.error_486748374 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--dsw-alias-label-error, #c86464); }\n.textButton_486748374 { border: 0; background: transparent; padding: 4px 5px; border-radius: 5px; color: var(--dsw-alias-label-primary-bluish, #4186f0); font: inherit; font-size: 11px; cursor: pointer; align-self: flex-start; flex-shrink: 0; }\n.detailHost_486748374 { display: flex; flex: 0 0 auto; min-height: 0; max-height: min(316px, 44%); }\n.detail_486748374 { box-sizing: border-box; display: flex; flex: 1; flex-direction: column; min-width: 0; min-height: 0; padding: 12px 16px 10px; border-top: .5px solid color-mix(in srgb, currentColor 12%, transparent); }\n.detailTitle_486748374 { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex-shrink: 0; }\n.meta_486748374 { display: flex; flex-wrap: wrap; gap: 5px 12px; color: var(--dsw-alias-label-tertiary, #929499); font-size: 10px; padding: 6px 0; flex-shrink: 0; }\n.messageScroll_486748374 { min-height: 0; overflow: hidden; }\n.message_486748374 { margin: 2px 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 12px; line-height: 18px; color: var(--dsw-alias-label-secondary, #75787e); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }\n.expanded_486748374 .messageScroll_486748374 { overflow: auto; scrollbar-width: thin; }\n.expanded_486748374 .message_486748374 { display: block; -webkit-line-clamp: unset; }\n.files_486748374 { display: flex; align-items: center; gap: 9px; color: var(--dsw-alias-label-tertiary, #929499); font-size: 10px; padding-top: 7px; flex-shrink: 0; white-space: nowrap; }\n.fileName_486748374 { overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }\n.added_486748374 { color: #529a77; }\n.removed_486748374 { color: #c66c72; }\n@media (max-width: 900px) {\n .author_486748374, .hash_486748374, .columns_486748374 > span:nth-child(3) { display: none; }\n .columns_486748374 > span:last-child { width: 44px; }\n}\n@media (max-height: 600px) {\n .detail_486748374 { padding: 7px 12px; }\n .meta_486748374 { padding: 3px 0; }\n}\n";
|
|
1640
|
-
const tagId$4 = "@laoyuehanni/dsh-git-worktree/CommitGraph.module.css";
|
|
1641
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$4 + "\"]") === null) {
|
|
1642
|
-
const tag = document.createElement("style");
|
|
1643
|
-
tag.dataset.plugin = "@laoyuehanni/dsh-git-worktree";
|
|
1644
|
-
tag.dataset.pluginCss = tagId$4;
|
|
1645
|
-
tag.textContent = css$4;
|
|
1646
|
-
document.head.appendChild(tag);
|
|
1647
|
-
}
|
|
1648
1625
|
var CommitGraph_module_default = {
|
|
1649
1626
|
"panel": "panel_486748374",
|
|
1650
1627
|
"heading": "heading_486748374",
|
|
1651
1628
|
"branch": "branch_486748374",
|
|
1652
1629
|
"loaded": "loaded_486748374",
|
|
1630
|
+
"headingActions": "headingActions_486748374",
|
|
1653
1631
|
"iconButton": "iconButton_486748374",
|
|
1632
|
+
"iconButtonActive": "iconButtonActive_486748374",
|
|
1654
1633
|
"closeIcon": "closeIcon_486748374",
|
|
1655
1634
|
"textButton": "textButton_486748374",
|
|
1656
1635
|
"search": "search_486748374",
|
|
@@ -1789,7 +1768,7 @@ window.__ModuleLoader__.load({
|
|
|
1789
1768
|
}
|
|
1790
1769
|
/** One branch browser. The owner keys by repository + ref: old async responses
|
|
1791
1770
|
* can never replace a different branch's history or selected commit. */
|
|
1792
|
-
function CommitGraph({ repoPath, branchRef, branch, branchEpoch = 0, onClose, escapeRef, t }) {
|
|
1771
|
+
function CommitGraph({ repoPath, branchRef, branch, branchEpoch = 0, branchesHidden = false, onToggleBranches, onClose, escapeRef, t }) {
|
|
1793
1772
|
const [history, setHistory] = (0, react.useState)(null);
|
|
1794
1773
|
const [error, setError] = (0, react.useState)("");
|
|
1795
1774
|
const [loading, setLoading] = (0, react.useState)(true);
|
|
@@ -1985,6 +1964,15 @@ window.__ModuleLoader__.load({
|
|
|
1985
1964
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
1986
1965
|
className: CommitGraph_module_default.heading,
|
|
1987
1966
|
children: [
|
|
1967
|
+
onToggleBranches !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
1968
|
+
type: "button",
|
|
1969
|
+
className: `${CommitGraph_module_default.iconButton} ${!branchesHidden ? CommitGraph_module_default.iconButtonActive : ""}`,
|
|
1970
|
+
title: t(branchesHidden ? "graphShowBranches" : "graphHideBranches"),
|
|
1971
|
+
"aria-label": t(branchesHidden ? "graphShowBranches" : "graphHideBranches"),
|
|
1972
|
+
"aria-pressed": !branchesHidden,
|
|
1973
|
+
onClick: onToggleBranches,
|
|
1974
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconPanelLeftOutlineRegular, { size: 14 })
|
|
1975
|
+
}),
|
|
1988
1976
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
1989
1977
|
className: CommitGraph_module_default.branch,
|
|
1990
1978
|
title: branch,
|
|
@@ -2016,25 +2004,27 @@ window.__ModuleLoader__.load({
|
|
|
2016
2004
|
title: t("graphLoaded", { count: commits.length }),
|
|
2017
2005
|
children: t("graphLoaded", { count: commits.length })
|
|
2018
2006
|
}),
|
|
2019
|
-
/* @__PURE__ */ (0, react_jsx_runtime.
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2007
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
2008
|
+
className: CommitGraph_module_default.headingActions,
|
|
2009
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2010
|
+
type: "button",
|
|
2011
|
+
className: CommitGraph_module_default.iconButton,
|
|
2012
|
+
title: t("graphRefresh"),
|
|
2013
|
+
"aria-label": t("graphRefresh"),
|
|
2014
|
+
disabled: loading,
|
|
2015
|
+
onClick: reloadHistory,
|
|
2016
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 14 })
|
|
2017
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
2018
|
+
type: "button",
|
|
2019
|
+
className: CommitGraph_module_default.iconButton,
|
|
2020
|
+
title: t("graphCloseWindow"),
|
|
2021
|
+
"aria-label": t("graphCloseWindow"),
|
|
2022
|
+
onClick: onClose,
|
|
2023
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCloseOutlineRegular, {
|
|
2024
|
+
className: CommitGraph_module_default.closeIcon,
|
|
2025
|
+
size: 12
|
|
2026
|
+
})
|
|
2027
|
+
})]
|
|
2038
2028
|
})
|
|
2039
2029
|
]
|
|
2040
2030
|
}),
|
|
@@ -2211,20 +2201,65 @@ window.__ModuleLoader__.load({
|
|
|
2211
2201
|
return graphOpen;
|
|
2212
2202
|
}
|
|
2213
2203
|
//#endregion
|
|
2214
|
-
//#region
|
|
2215
|
-
const css$3 = "/* 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 (dsh-worktree select, standard\n * mode select, Workspace Write, MiniMax-M3 High). The corners stop short\n * of the base's full pill (24px) so the silhouette stays a chip rather\n * than a capsule, per the design brief. */\n\n/* Shared trigger geometry — copied 1:1 from the base composer triggers\n * (PermissionSelect .trigger_1594205807 / ModelSelect .trigger_1594205807). */\n.dock_1594205807 {\n display: inline-flex;\n align-items: stretch;\n height: 28px;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\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 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.chip_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\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 — host 0.1.2 Menu card;\n * hosts without the token fall back to the old r12-era shadow-lv3). Width is content-driven — it follows\n * the longest line (for remote picks that is the subject line's branch\n * name) — floored at 168px (the Cancel/Confirm pair plus padding: short\n * branch names must not squeeze the buttons into wrapping \"切换中…\"\n * mid-word) and capped at 400px; BranchMenu also clamps it inline to the\n * room right of the card. Beyond the cap the lines wrap. border-box so\n * every width arm includes the card chrome. */\n.popCard_1594205807 {\n box-sizing: border-box;\n position: fixed;\n z-index: 1000;\n width: max-content;\n min-width: 168px;\n max-width: min(400px, 80vw);\n padding: 4px;\n border: 0;\n border-radius: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n /* Elevation-prominent carries the hairline stroke; the lv3 fallback\n * keeps a shadow where the token does not exist. */\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.popAsk_1594205807 {\n margin: 0;\n padding: 6px 8px;\n font-size: 13px;\n line-height: 20px;\n color: inherit;\n /* Branch names are long unbroken tokens — plain wrapping would let them\n * overflow the capped card instead of breaking. */\n overflow-wrap: anywhere;\n}\n\n/* Remote confirm's name line: the branch itself, weight 500 like the leaf\n * rows — the subject the ask line refers to (\"该远程分支\"). A dedicated\n * line keeps the long unbroken token away from the sentence, so wraps\n * happen inside the name instead of shredding the Chinese around it. */\n.popSubject_1594205807 {\n margin: 0;\n padding: 0 8px 2px;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n/* The removal confirm's consequence lines (dirty/ahead/archived sessions):\n * subdued one-row facts under the ask, the dirty count alone in the warning\n * tone — mirroring the manager dialog's fact block. */\n.popDetails_1594205807 {\n padding: 0 8px 2px;\n}\n\n.popDetail_1594205807 {\n margin: 0;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary, rgba(128, 128, 128, 0.9));\n overflow-wrap: anywhere;\n}\n\n.popDetailWarn_1594205807 {\n color: var(--dsw-alias-status-danger, #d5304f);\n}\n\n.popActions_1594205807 {\n display: flex;\n gap: 2px;\n padding: 2px;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * nowrap keeps labels like 切换中… from splitting mid-word when the flyout\n * is pinned to its minimum width by a short branch name. */\n.popActions_1594205807 button {\n flex: 1 1 0;\n height: 28px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n white-space: nowrap;\n cursor: pointer;\n}\n\n.popActions_1594205807 button:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\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-label-primary-bluish, #4186f0);\n font-weight: 500;\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 — host Menu/PermissionSelect card;\n * hosts without the token fall back to shadow-lv3). Three owner requirements shape the geometry:\n *\n * 1. height cap: min(420px, 60vh) on the card, only the rows area\n * scrolls (.menuRows_1594205807) — heading and search stay pinned;\n * 2. the search field sits pinned at the card's bottom edge, directly\n * above the chip, with the scrolling rows above it;\n * 3. the card is CSS-`bottom`-pinned ~6px above the chip's top and so\n * grows entirely upward, leaving the chip and bottom controls visible;\n * the text area above those controls may sit behind the popup.\n *\n * The inline `left`/`bottom` come from BranchMenu's placement pass; the\n * width is fixed here (design 360px — 320 tree + 40 tool strip — and\n * viewport-capped) so horizontal clamping stays deterministic without\n * measuring the card. */\n\n/* The portal lands directly under document.body_1594205807, outside the shell's\n * box-sizing reset — content-box default would add padding/border on top\n * of the declared width (360 became 370, and the width:100% children\n * padded 16px past the card's right clip, shearing off their rounded\n * corners). Every width-declared box in this popup opts back into\n * border-box: the card, the toolbar, the rows, and the search input. */\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: 20px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\n backdrop-filter: var(--dsw-menu-backdrop-filter);\n --dsw-elevation-stroke-color: var(--dsw-alias-border-l1);\n /* Same elevation card as .popCard_1594205807 (host 0.1.2 Menu); lv3 fallback\n * for hosts without the token. */\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): a narrow\n * column of icon-only buttons for actions that do not belong in the tree\n * — locate the checked-out branch, expand/collapse the whole tree.\n * Buttons stack from the BOTTOM up: the card's height shrinks when the\n * repo has few branches, so a top-anchored strip would drift around and\n * the buttons would sit far from the search bar; anchoring to the bottom\n * pins them at a stable spot (beside the search row) whatever the height. */\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 color-mix(in srgb, currentColor 12%, transparent);\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: 8px;\n background: transparent;\n color: inherit;\n cursor: pointer;\n}\n\n.menuToolButton_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuToolButton_1594205807:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n/* The sync tools while their action runs: a soft opacity pulse. The glyph\n * is a directional arrow, so the circular-refresh spin read as garbled\n * rotation — pulsing keeps the arrow legible while clearly \"live\", and the\n * button keeps full opacity (the usual disabled dim would read as broken\n * for an in-flight network operation). */\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/* Non-interactive group heading — the Menu label row's posture. */\n.menuHeading_1594205807 {\n padding: 6px 8px 4px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n/* The only scrollable region: shrinks within the capped card so the\n * heading above and the search below stay visible while rows scroll. */\n.menuRows_1594205807 {\n flex: 1 1 auto;\n min-height: 0;\n overflow-y: auto;\n}\n\n/* Menu-row-like buttons: transparent fill, hover tint, same 13px type.\n * Weight 500 mirrors the chip's branch label (the portal escapes the\n * composer's font context, so the match must be explicit — the inherited\n * body weight is 400 and reads visibly lighter than the chip beside it). */\n.menuRow_1594205807 {\n box-sizing: border-box; /* width:100% + padding must stay inside .menuRows_1594205807 */\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: 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.menuRow_1594205807:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The checked-out branch: a persistent tint a step above the resting rows\n * so it reads as \"you are here\" the moment the list scrolls it into view\n * (BranchMenu centers it on open) — the trailing check alone is easy to\n * miss from a distance. */\n.menuRowSelected_1594205807,\n.menuRowSelected_1594205807:hover:not(:disabled) {\n background: color-mix(in srgb, currentColor 10%, transparent);\n}\n\n/* IDEA-style selection: the clicked row gets a bluish fill, layering over\n * the HEAD tint when the same row is both — selection communicates intent,\n * the HEAD tint communicates position, and they coexist (IDEA 4.4). */\n.menuRowPicked_1594205807,\n.menuRowPicked_1594205807:hover:not(:disabled) {\n background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 18%, transparent);\n}\n\n.menuRowLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n/* IDEA-style outgoing green / incoming blue marks, including unpublished refs. */\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/* Host state tokens first (they follow the active theme and keep text\n * contrast); IDEA's own hues remain the fallback where a token is absent. */\n.menuRowAhead_1594205807 { color: var(--dsw-alias-state-success-primary, #57965c); }\n.menuRowBehind_1594205807 { color: var(--dsw-alias-link, #589df6); }\n.menuRowGone_1594205807 { color: var(--dsw-alias-state-warn-primary, #b58900); }\n.menuRowOutgoing_1594205807 { display: inline-flex; transform: rotate(180deg); }\n\n/* Search hit highlight (IDEA): the matched substring gets a warm tint\n * behind it — theme-agnostic, legible in both light and dark cards. */\n.menuSearchMark_1594205807 {\n background: color-mix(in srgb, #b58900 38%, transparent);\n border-radius: 2px;\n}\n\n/* Tree group rows (folder headers) — BranchMenu's '/' prefix tree: the\n * same row geometry as .menuRow_1594205807, but labeled in the secondary tone so the\n * leaf rows pop, with a count badge and a chevron that turns on expand. */\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: 8px;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #81858c);\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.menuGroup_1594205807:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The two top-level section headers (local/remote branches) step ABOVE the\n * folder headers they contain: primary label tone like the leaf rows plus\n * a heavier weight, so the nav hierarchy reads group > row > folder — the\n * folder headers keep the secondary tone that alone would leave the\n * sections as the faintest (and most important) rows on the list. */\n.menuGroupTop_1594205807 {\n color: inherit;\n font-weight: 600;\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: color-mix(in srgb, currentColor 55%, transparent);\n}\n\n/* Zero-search-hit state: centered secondary line inside the rows area. */\n.menuEmpty_1594205807 {\n padding: 10px 8px;\n font-size: 13px;\n line-height: 20px;\n color: var(--dsw-alias-label-secondary, #81858c);\n text-align: center;\n}\n\n/* Bottom-pinned search field, separated from the rows by a hairline.\n * Borderless so it reads as part of the card, focus shown as the\n * standard hover tint rather than an outline. */\n.menuSearchWrap_1594205807 {\n flex-shrink: 0;\n margin-top: 2px;\n padding-top: 4px;\n border-top: 0.5px solid color-mix(in srgb, currentColor 12%, transparent);\n}\n\n.menuSearch_1594205807 {\n box-sizing: border-box; /* width:100% + padding must stay inside the wrap */\n width: 100%;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuRow_1594205807) — the portal\n * escapes the composer's font context and would inherit body's 400. */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuSearch_1594205807::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuSearch_1594205807:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* ── Create/rename flyouts (BranchMenu row context menu) ────────────\n * Open IN PLACE of the row menu (at its point, clamped) and hold the whole\n * flow in one panel: ask line, input, live hint, and the Cancel/confirm\n * pair — typing the name and pressing the button fires in one stroke, no\n * second confirm step. */\n\n/* The naming input inside the flyout: borderless, part of the card, focus\n * shown as the standard hover tint. Fixed width — the popCard is\n * max-content, so a percentage width would chase the input's own default\n * size instead of the design width. */\n.menuCreate_1594205807 {\n box-sizing: border-box;\n width: 248px;\n height: 30px;\n padding: 0 8px;\n border: none;\n border-radius: 8px;\n background: transparent;\n color: inherit;\n font: inherit;\n font-size: 13px;\n /* Weight 500 mirrors the chip's branch label (see .menuSearch_1594205807). */\n font-weight: 500;\n line-height: 20px;\n}\n\n.menuCreate_1594205807::placeholder {\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n.menuCreate_1594205807:focus {\n outline: none;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n.menuCreate_1594205807:disabled {\n opacity: 0.5;\n}\n\n/* The error line under the input — only rendered while the draft is\n * unacceptable with a non-empty reason; the input itself stays neutral,\n * the line carries the state. */\n.menuCreateHintBad_1594205807 {\n margin: 0;\n padding: 0 8px;\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-error);\n}\n\n/* ── Row context menu (BranchMenu right-click) ─────────────────────\n * Cursor-anchored transient over the branch card: translucent menu chrome\n * (--dsw-specific-menu with --dsw-menu-backdrop-filter, elevation-prominent hairline,\n * lv3 fallback) at a smaller radius — r20 would round a launcher this\n * short into a pill, r12 keeps the corners proportionate to a handful of\n * rows (two on a worktree row, up to six plus a header on a branch row).\n * Width hugs the widest item\n * (shrink-to-fit, no design width) with a generous cap for safety —\n * a launcher reads better snug than stretched. Positioned once at open\n * and dismissed rather than re-placed when the page moves (see\n * BranchMenu's ctx placement pass); z-index one step above the popCard so\n * it never slides under the confirm flyout. */\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: 12px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\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/* The target row's name, above the verbs. Unlike the items this one holds\n * a branch name, so it is the one line allowed to hit the 280px cap and\n * ellipsize (the full name rides in a title). Secondary tone and no hover\n * affordance: it is a label, not a seventh item. */\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/* Menu-item rows: the .menuRow_1594205807 geometry at a hair lighter weight — a\n * launcher's labels read as commands, not data. nowrap: the labels are\n * fixed copy (no branch names), the 280px cap is unreachable by design. */\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: 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.ctxItem_1594205807:hover,\n.ctxItem_1594205807:focus-visible {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n}\n\n/* The running-session withhold (worktree removal): a disabled item stays\n * visible — the reason it is missing lives on its hover title, and a verb\n * that appears and disappears with session state reads as a bug, not a\n * rule. No hover tint, no pointer; the label dims instead of vanishing. */\n.ctxItem_1594205807:disabled {\n cursor: default;\n opacity: 0.45;\n}\n\n.ctxItem_1594205807:disabled:hover {\n background: transparent;\n}\n\n/* The arrow-key walk lands here, so the focused item must read as strongly\n * as a hovered one — the tint above carries it, the default ring would sit\n * outside the 8px radius. */\n.ctxItem_1594205807:focus-visible {\n outline: none;\n}\n\n/* Leading glyph rides the label tone, a step quieter. */\n.ctxItem_1594205807 svg {\n flex-shrink: 0;\n opacity: 0.75;\n}\n\n.ctxItemLabel_1594205807 {\n flex: 1 1 0;\n overflow: hidden;\n text-overflow: ellipsis;\n}\n.menuCard_1594205807.menuCardGraph_1594205807 {\n width: min(1060px, calc(100vw - 24px));\n height: 700px;\n}\n.menuCardGraph_1594205807 .menuMain_1594205807 { flex: 0 0 236px; }\n.menuToolActive_1594205807 { color: var(--dsw-alias-label-primary-bluish, #4186f0); background: color-mix(in srgb, var(--dsw-alias-label-primary-bluish, #4186f0) 12%, transparent); }\n@media (max-width: 800px) { .menuCardGraph_1594205807 .menuMain_1594205807 { flex-basis: 180px; } }\n@media (max-width: 560px) { .menuCardGraph_1594205807 .menuMain_1594205807 { flex-basis: 128px; } }\n";
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2204
|
+
//#region src/client/toast-bus.ts
|
|
2205
|
+
let nextSeq = 0;
|
|
2206
|
+
let queue = [];
|
|
2207
|
+
let mountedHosts = 0;
|
|
2208
|
+
const listeners$1 = /* @__PURE__ */ new Set();
|
|
2209
|
+
function notify() {
|
|
2210
|
+
for (const listener of listeners$1) listener();
|
|
2211
|
+
}
|
|
2212
|
+
/**
|
|
2213
|
+
* Push a toast message onto the global sequential queue.
|
|
2214
|
+
* @param text - localized message to display.
|
|
2215
|
+
* @param tone - optional `'success'` tone for affirmative confirmations.
|
|
2216
|
+
*/
|
|
2217
|
+
function emitToast(text, tone) {
|
|
2218
|
+
nextSeq += 1;
|
|
2219
|
+
const entry = tone === void 0 ? {
|
|
2220
|
+
seq: nextSeq,
|
|
2221
|
+
text
|
|
2222
|
+
} : {
|
|
2223
|
+
seq: nextSeq,
|
|
2224
|
+
text,
|
|
2225
|
+
tone
|
|
2226
|
+
};
|
|
2227
|
+
queue = [...queue, entry];
|
|
2228
|
+
notify();
|
|
2229
|
+
}
|
|
2230
|
+
/** Dismiss the currently visible head toast (if its seq still matches). */
|
|
2231
|
+
function shiftToast(seq) {
|
|
2232
|
+
if (queue[0]?.seq !== seq) return;
|
|
2233
|
+
queue = queue.slice(1);
|
|
2234
|
+
notify();
|
|
2235
|
+
}
|
|
2236
|
+
/** Current head toast waiting to be rendered, or undefined when empty. */
|
|
2237
|
+
function peekToast() {
|
|
2238
|
+
return queue[0];
|
|
2239
|
+
}
|
|
2240
|
+
/** Subscribe to queue changes. */
|
|
2241
|
+
function subscribeToasts(listener) {
|
|
2242
|
+
listeners$1.add(listener);
|
|
2243
|
+
return () => {
|
|
2244
|
+
listeners$1.delete(listener);
|
|
2245
|
+
};
|
|
2246
|
+
}
|
|
2247
|
+
/** Register one mounted `shell.overlay` host and return its unregister disposer. */
|
|
2248
|
+
function registerToastHost() {
|
|
2249
|
+
mountedHosts += 1;
|
|
2250
|
+
return () => {
|
|
2251
|
+
mountedHosts = Math.max(0, mountedHosts - 1);
|
|
2252
|
+
};
|
|
2253
|
+
}
|
|
2254
|
+
/** Whether a `shell.overlay` host is currently mounted to drain the queue. */
|
|
2255
|
+
function hasGlobalToastHost() {
|
|
2256
|
+
return mountedHosts > 0;
|
|
2223
2257
|
}
|
|
2258
|
+
//#endregion
|
|
2259
|
+
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/BranchChip.module.css?inline
|
|
2224
2260
|
var BranchChip_module_default = {
|
|
2225
2261
|
"input": "input_1594205807",
|
|
2226
2262
|
"left": "left_1594205807",
|
|
2227
|
-
"trigger": "trigger_1594205807",
|
|
2228
2263
|
"dock": "dock_1594205807",
|
|
2229
2264
|
"chip": "chip_1594205807",
|
|
2230
2265
|
"branch": "branch_1594205807",
|
|
@@ -2235,14 +2270,15 @@ window.__ModuleLoader__.load({
|
|
|
2235
2270
|
"popDetail": "popDetail_1594205807",
|
|
2236
2271
|
"popDetailWarn": "popDetailWarn_1594205807",
|
|
2237
2272
|
"popActions": "popActions_1594205807",
|
|
2238
|
-
"
|
|
2239
|
-
"body": "body_1594205807",
|
|
2273
|
+
"popConfirmDanger": "popConfirmDanger_1594205807",
|
|
2240
2274
|
"menuCard": "menuCard_1594205807",
|
|
2241
2275
|
"menuToolbar": "menuToolbar_1594205807",
|
|
2242
2276
|
"menuToolButton": "menuToolButton_1594205807",
|
|
2243
2277
|
"menuToolButtonRunning": "menuToolButtonRunning_1594205807",
|
|
2244
2278
|
"menuMain": "menuMain_1594205807",
|
|
2279
|
+
"menuMainHidden": "menuMainHidden_1594205807",
|
|
2245
2280
|
"menuHeading": "menuHeading_1594205807",
|
|
2281
|
+
"menuRows": "menuRows_1594205807",
|
|
2246
2282
|
"menuRow": "menuRow_1594205807",
|
|
2247
2283
|
"menuRowSelected": "menuRowSelected_1594205807",
|
|
2248
2284
|
"menuRowPicked": "menuRowPicked_1594205807",
|
|
@@ -2267,6 +2303,7 @@ window.__ModuleLoader__.load({
|
|
|
2267
2303
|
"ctxCard": "ctxCard_1594205807",
|
|
2268
2304
|
"ctxHeader": "ctxHeader_1594205807",
|
|
2269
2305
|
"ctxItem": "ctxItem_1594205807",
|
|
2306
|
+
"ctxItemDanger": "ctxItemDanger_1594205807",
|
|
2270
2307
|
"ctxItemLabel": "ctxItemLabel_1594205807",
|
|
2271
2308
|
"menuCardGraph": "menuCardGraph_1594205807",
|
|
2272
2309
|
"menuToolActive": "menuToolActive_1594205807"
|
|
@@ -2532,6 +2569,14 @@ window.__ModuleLoader__.load({
|
|
|
2532
2569
|
}
|
|
2533
2570
|
const graphOpenRef = (0, react.useRef)(graphOpen);
|
|
2534
2571
|
graphOpenRef.current = graphOpen;
|
|
2572
|
+
const [branchesHidden, setBranchesHidden] = (0, react.useState)(false);
|
|
2573
|
+
(0, react.useEffect)(() => {
|
|
2574
|
+
if (!graphOpen) {
|
|
2575
|
+
setBranchesHidden(false);
|
|
2576
|
+
return;
|
|
2577
|
+
}
|
|
2578
|
+
if (typeof window !== "undefined" && window.innerWidth <= 640) setBranchesHidden(true);
|
|
2579
|
+
}, [graphOpen]);
|
|
2535
2580
|
const graphEscapeRef = (0, react.useRef)(null);
|
|
2536
2581
|
const graphAnimationRef = (0, react.useRef)(null);
|
|
2537
2582
|
const graphStartRectRef = (0, react.useRef)(null);
|
|
@@ -3661,7 +3706,9 @@ window.__ModuleLoader__.load({
|
|
|
3661
3706
|
setCtx(null);
|
|
3662
3707
|
const text = row?.path !== void 0 ? row.path : name;
|
|
3663
3708
|
(0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(text).then((ok) => {
|
|
3664
|
-
if (ok)
|
|
3709
|
+
if (!ok) return;
|
|
3710
|
+
if (hasGlobalToastHost()) emitToast(t("hover.copied"), "success");
|
|
3711
|
+
else setCopiedSeq(Date.now());
|
|
3665
3712
|
});
|
|
3666
3713
|
}
|
|
3667
3714
|
});
|
|
@@ -3671,6 +3718,7 @@ window.__ModuleLoader__.load({
|
|
|
3671
3718
|
id: "remove-worktree",
|
|
3672
3719
|
label: t("worktreeRemove.menu"),
|
|
3673
3720
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 14 }),
|
|
3721
|
+
danger: true,
|
|
3674
3722
|
...blocked ? {
|
|
3675
3723
|
disabled: true,
|
|
3676
3724
|
title: t("manager.running")
|
|
@@ -3764,6 +3812,7 @@ window.__ModuleLoader__.load({
|
|
|
3764
3812
|
id: "delete",
|
|
3765
3813
|
label: t("ctxDelete"),
|
|
3766
3814
|
icon: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconTrashOutlineRegular, { size: 14 }),
|
|
3815
|
+
danger: true,
|
|
3767
3816
|
run: () => {
|
|
3768
3817
|
confirmRef.current?.onCancel();
|
|
3769
3818
|
markPoint();
|
|
@@ -3781,7 +3830,9 @@ window.__ModuleLoader__.load({
|
|
|
3781
3830
|
run: () => {
|
|
3782
3831
|
setCtx(null);
|
|
3783
3832
|
(0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(name).then((ok) => {
|
|
3784
|
-
if (ok)
|
|
3833
|
+
if (!ok) return;
|
|
3834
|
+
if (hasGlobalToastHost()) emitToast(t("hover.copied"), "success");
|
|
3835
|
+
else setCopiedSeq(Date.now());
|
|
3785
3836
|
});
|
|
3786
3837
|
}
|
|
3787
3838
|
});
|
|
@@ -3916,7 +3967,7 @@ window.__ModuleLoader__.load({
|
|
|
3916
3967
|
]
|
|
3917
3968
|
}),
|
|
3918
3969
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
3919
|
-
className: BranchChip_module_default.menuMain
|
|
3970
|
+
className: `${BranchChip_module_default.menuMain} ${graphOpen && branchesHidden ? BranchChip_module_default.menuMainHidden : ""}`,
|
|
3920
3971
|
children: [
|
|
3921
3972
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
3922
3973
|
className: BranchChip_module_default.menuHeading,
|
|
@@ -3968,6 +4019,10 @@ window.__ModuleLoader__.load({
|
|
|
3968
4019
|
repoPath,
|
|
3969
4020
|
branchRef: browsingRef,
|
|
3970
4021
|
branchEpoch,
|
|
4022
|
+
branchesHidden,
|
|
4023
|
+
onToggleBranches: () => {
|
|
4024
|
+
setBranchesHidden((hidden) => !hidden);
|
|
4025
|
+
},
|
|
3971
4026
|
branch: browsingBranch || "HEAD",
|
|
3972
4027
|
escapeRef: graphEscapeRef,
|
|
3973
4028
|
t,
|
|
@@ -4028,6 +4083,7 @@ window.__ModuleLoader__.load({
|
|
|
4028
4083
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4029
4084
|
ref: flyConfirmRef,
|
|
4030
4085
|
type: "button",
|
|
4086
|
+
className: confirm.danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
4031
4087
|
disabled: confirm.busy || confirm.draftInvalid === true,
|
|
4032
4088
|
onClick: confirm.onConfirm,
|
|
4033
4089
|
children: confirm.confirmLabel
|
|
@@ -4161,7 +4217,7 @@ window.__ModuleLoader__.load({
|
|
|
4161
4217
|
}), ctxItems.map((item) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
4162
4218
|
type: "button",
|
|
4163
4219
|
role: "menuitem",
|
|
4164
|
-
className: BranchChip_module_default.ctxItem,
|
|
4220
|
+
className: item.danger === true ? `${BranchChip_module_default.ctxItem} ${BranchChip_module_default.ctxItemDanger}` : BranchChip_module_default.ctxItem,
|
|
4165
4221
|
disabled: busy || item.disabled,
|
|
4166
4222
|
title: item.title,
|
|
4167
4223
|
onClick: item.run,
|
|
@@ -4297,6 +4353,46 @@ window.__ModuleLoader__.load({
|
|
|
4297
4353
|
return failure;
|
|
4298
4354
|
}
|
|
4299
4355
|
//#endregion
|
|
4356
|
+
//#region src/client/git-error.ts
|
|
4357
|
+
/**
|
|
4358
|
+
* Strip `git <args> failed (exit N): ` wrapper prefixes so pattern matching
|
|
4359
|
+
* operates on git's own diagnostic lines.
|
|
4360
|
+
*/
|
|
4361
|
+
function stripGitWrapper(raw) {
|
|
4362
|
+
return raw.replace(/^git\b[\s\S]*?\bfailed\s*\(exit\s+\d+\):\s*/i, "").trim();
|
|
4363
|
+
}
|
|
4364
|
+
/**
|
|
4365
|
+
* Recognise frequent, actionable git failure messages from switch, branch
|
|
4366
|
+
* delete, and worktree creation operations.
|
|
4367
|
+
* @param raw - raw error text returned by the host route.
|
|
4368
|
+
* @returns structured failure kind when recognised, else null.
|
|
4369
|
+
*/
|
|
4370
|
+
function explainGitOpFailure(raw) {
|
|
4371
|
+
const text = stripGitWrapper(raw);
|
|
4372
|
+
if (text === "") return null;
|
|
4373
|
+
if (/Your local changes to the following files would be overwritten by (?:checkout|switch)/i.test(text) || /The following untracked working tree files would be overwritten by (?:checkout|switch)/i.test(text) || /you need to resolve your current index first/i.test(text)) return { kind: "switchDirty" };
|
|
4374
|
+
if (/invalid reference:/i.test(text) || /pathspec .* did not match any file/i.test(text)) return { kind: "switchMissing" };
|
|
4375
|
+
const unmerged = /the branch '([^']+)' is not fully merged/i.exec(text);
|
|
4376
|
+
if (unmerged !== null) return unmerged[1] === void 0 ? { kind: "deleteBranchUnmerged" } : {
|
|
4377
|
+
kind: "deleteBranchUnmerged",
|
|
4378
|
+
branch: unmerged[1]
|
|
4379
|
+
};
|
|
4380
|
+
if (/cannot delete (?:the )?branch '([^']+)' (?:used by worktree|checked out)/i.test(text) || /Cannot delete branch .* checked out at/i.test(text)) {
|
|
4381
|
+
const match = /branch '([^']+)'/i.exec(text);
|
|
4382
|
+
return match?.[1] === void 0 ? { kind: "deleteBranchCheckedOut" } : {
|
|
4383
|
+
kind: "deleteBranchCheckedOut",
|
|
4384
|
+
branch: match[1]
|
|
4385
|
+
};
|
|
4386
|
+
}
|
|
4387
|
+
const occupied = /'([^']+)' is already (?:checked out|used by worktree)/i.exec(text);
|
|
4388
|
+
if (occupied !== null) return occupied[1] === void 0 ? { kind: "worktreeOccupied" } : {
|
|
4389
|
+
kind: "worktreeOccupied",
|
|
4390
|
+
branch: occupied[1]
|
|
4391
|
+
};
|
|
4392
|
+
if (/already exists/i.test(text) && /worktree|destination path|fatal:/i.test(raw)) return { kind: "worktreePathExists" };
|
|
4393
|
+
return null;
|
|
4394
|
+
}
|
|
4395
|
+
//#endregion
|
|
4300
4396
|
//#region src/client/update-error.ts
|
|
4301
4397
|
/** Ordered: the most specific cause wins when several markers appear. */
|
|
4302
4398
|
const MARKERS = [
|
|
@@ -4394,15 +4490,6 @@ window.__ModuleLoader__.load({
|
|
|
4394
4490
|
}
|
|
4395
4491
|
//#endregion
|
|
4396
4492
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/SyncProgress.module.css?inline
|
|
4397
|
-
const css$2 = "/* The floating progress card of a running fetch/update.\n *\n * Fixed to the viewport and portalled out of the composer, so it can never\n * push or clip the layout it floats over. Only the card itself takes the\n * pointer; everything around it keeps working, which is the point — a\n * transfer that takes a minute must not hold the app hostage.\n *\n * Chrome is the branch menu card's recipe (r16 here: it is a small notice,\n * not a menu), so it reads as part of the same plugin in both themes. */\n.card_408765909 {\n box-sizing: border-box;\n position: fixed;\n right: 20px;\n bottom: 84px;\n z-index: 1000;\n /* Wide enough for git's longest ordinary counter line on one row\n * (`Receiving objects: 66% (1340/2030), 120.80 MiB | 10.24 MiB/s`), which a\n * 300px card cut to `… | 1024.0…` from the tens of MiB on. */\n width: 380px;\n max-width: calc(100vw - 40px);\n padding: 10px 12px 12px;\n border-radius: 16px;\n background: var(--dsw-specific-menu, var(--dsw-alias-surface-raised, #ffffff));\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 color: var(--dsw-alias-label-primary, inherit);\n animation: syncCardIn 160ms ease-out;\n}\n\n.head_408765909 {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 22px;\n}\n\n.title_408765909 {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.cancel_408765909 {\n flex: none;\n display: grid;\n place-items: center;\n width: 22px;\n height: 22px;\n margin: 0 -4px 0 0;\n padding: 0;\n border: 0;\n border-radius: 6px;\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #81858c);\n cursor: pointer;\n}\n\n.cancel_408765909:hover {\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 8%, transparent));\n color: var(--dsw-alias-label-primary, inherit);\n}\n\n.cancel_408765909:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary, #4186f0);\n outline-offset: 1px;\n}\n\n/* The bar: a determinate fill follows git's own percentage; with none to\n * show (connecting, a phase git cannot size, the fast-forward) a short\n * segment sweeps instead of a bar frozen at some stale number. */\n.track_408765909 {\n position: relative;\n height: 4px;\n margin: 8px 0 8px;\n overflow: hidden;\n border-radius: 2px;\n background: var(--dsw-alias-interactive-bg-hover, color-mix(in srgb, currentColor 10%, transparent));\n}\n\n.fill_408765909 {\n height: 100%;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary, #4186f0);\n transition: width 150ms linear;\n}\n\n.indeterminate_408765909 {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 40%;\n border-radius: 2px;\n background: var(--dsw-alias-brand-primary, #4186f0);\n animation: syncSweep 1.1s ease-in-out infinite;\n}\n\n/* git's line, verbatim: stage, counts and transfer speed in one row, the\n * way IDEA's task popup prints it. Tabular figures keep it from jittering. */\n.detail_408765909 {\n overflow: hidden;\n font-size: 12px;\n line-height: 18px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-secondary, #81858c);\n}\n\n@keyframes syncSweep {\n from { transform: translateX(-100%); }\n to { transform: translateX(250%); }\n}\n\n@keyframes syncCardIn {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .card_408765909 { animation: none; }\n .fill_408765909 { transition: none; }\n .indeterminate_408765909 { width: 100%; opacity: 0.35; animation: none; }\n}\n";
|
|
4398
|
-
const tagId$2 = "@laoyuehanni/dsh-git-worktree/SyncProgress.module.css";
|
|
4399
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$2 + "\"]") === null) {
|
|
4400
|
-
const tag = document.createElement("style");
|
|
4401
|
-
tag.dataset.plugin = "@laoyuehanni/dsh-git-worktree";
|
|
4402
|
-
tag.dataset.pluginCss = tagId$2;
|
|
4403
|
-
tag.textContent = css$2;
|
|
4404
|
-
document.head.appendChild(tag);
|
|
4405
|
-
}
|
|
4406
4493
|
var SyncProgress_module_default = {
|
|
4407
4494
|
"card": "card_408765909",
|
|
4408
4495
|
"head": "head_408765909",
|
|
@@ -4557,6 +4644,15 @@ window.__ModuleLoader__.load({
|
|
|
4557
4644
|
* gains the main checkout row (see {@link buildLinkedWorktreeRows}); a
|
|
4558
4645
|
* started MAIN-checkout session drops the group — its directory is fixed.
|
|
4559
4646
|
*/
|
|
4647
|
+
/** Friendly localized errors for common switch / delete / worktree failures. */
|
|
4648
|
+
const GIT_OP_FAIL = {
|
|
4649
|
+
switchDirty: "gitFailSwitchDirty",
|
|
4650
|
+
switchMissing: "gitFailSwitchMissing",
|
|
4651
|
+
deleteBranchUnmerged: "gitFailDeleteUnmerged",
|
|
4652
|
+
deleteBranchCheckedOut: "gitFailDeleteCheckedOut",
|
|
4653
|
+
worktreeOccupied: "gitFailWorktreeOccupied",
|
|
4654
|
+
worktreePathExists: "gitFailWorktreePathExists"
|
|
4655
|
+
};
|
|
4560
4656
|
/** The toast for an update failure the plugin can name. Each one says what
|
|
4561
4657
|
* to do next; git's hint essay is not part of it. */
|
|
4562
4658
|
const UPDATE_FAIL = {
|
|
@@ -4749,7 +4845,7 @@ window.__ModuleLoader__.load({
|
|
|
4749
4845
|
* the naming input (cutout flow) takes focus when present, else the
|
|
4750
4846
|
* confirm button does so Enter commits.
|
|
4751
4847
|
*/
|
|
4752
|
-
function ChipConfirm({ anchorRef, ask, subject, details, confirmLabel, cancelLabel, busy, draft, onDraftChange, draftPlaceholder, draftInvalid, draftHint, onConfirm, onCancel }) {
|
|
4848
|
+
function ChipConfirm({ anchorRef, ask, subject, details, confirmLabel, cancelLabel, danger, busy, draft, onDraftChange, draftPlaceholder, draftInvalid, draftHint, onConfirm, onCancel }) {
|
|
4753
4849
|
const popRef = (0, react.useRef)(null);
|
|
4754
4850
|
const confirmRef = (0, react.useRef)(null);
|
|
4755
4851
|
const draftInputRef = (0, react.useRef)(null);
|
|
@@ -4853,6 +4949,7 @@ window.__ModuleLoader__.load({
|
|
|
4853
4949
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
4854
4950
|
ref: confirmRef,
|
|
4855
4951
|
type: "button",
|
|
4952
|
+
className: danger === true ? BranchChip_module_default.popConfirmDanger : void 0,
|
|
4856
4953
|
disabled: busy || draftInvalid === true,
|
|
4857
4954
|
onClick: onConfirm,
|
|
4858
4955
|
children: confirmLabel
|
|
@@ -4879,14 +4976,14 @@ window.__ModuleLoader__.load({
|
|
|
4879
4976
|
* while a probe is in flight keeps showing the new path's loading line. */
|
|
4880
4977
|
const [removalPath, setRemovalPath] = (0, react.useState)(null);
|
|
4881
4978
|
const [removalFacts, setRemovalFacts] = (0, react.useState)(void 0);
|
|
4882
|
-
/**
|
|
4883
|
-
* can raise two in a row — a worktree creation whose fetch warned, then
|
|
4884
|
-
* the auto-prune's report — and a single-slot state made the second
|
|
4885
|
-
* silently erase the first before anyone read it. Head renders, `onDone`
|
|
4886
|
-
* shifts. */
|
|
4979
|
+
/** Local fallback queue when `shell.overlay` toast host is absent (e.g. legacy/minimal shells). */
|
|
4887
4980
|
const [toasts, setToasts] = (0, react.useState)([]);
|
|
4888
4981
|
const toastSeq = (0, react.useRef)(0);
|
|
4889
4982
|
const pushToast = (0, react.useCallback)((text) => {
|
|
4983
|
+
if (hasGlobalToastHost()) {
|
|
4984
|
+
emitToast(text);
|
|
4985
|
+
return;
|
|
4986
|
+
}
|
|
4890
4987
|
toastSeq.current += 1;
|
|
4891
4988
|
const seq = toastSeq.current;
|
|
4892
4989
|
setToasts((queue) => [...queue, {
|
|
@@ -5004,6 +5101,11 @@ window.__ModuleLoader__.load({
|
|
|
5004
5101
|
}, [pushToast, t]);
|
|
5005
5102
|
const showError = (0, react.useCallback)((message) => {
|
|
5006
5103
|
if (showFetchError(message)) return;
|
|
5104
|
+
const gitFail = explainGitOpFailure(message);
|
|
5105
|
+
if (gitFail !== null) {
|
|
5106
|
+
pushToast(t(GIT_OP_FAIL[gitFail.kind], gitFail.branch === void 0 ? void 0 : { branch: gitFail.branch }));
|
|
5107
|
+
return;
|
|
5108
|
+
}
|
|
5007
5109
|
pushToast(t("errorGeneric", { message }));
|
|
5008
5110
|
}, [
|
|
5009
5111
|
pushToast,
|
|
@@ -5296,6 +5398,7 @@ window.__ModuleLoader__.load({
|
|
|
5296
5398
|
}
|
|
5297
5399
|
if (result.fetchWarning !== void 0) pushToast(t("fetchWarning", { message: result.fetchWarning }));
|
|
5298
5400
|
if (result.excludeWarning !== void 0) pushToast(t("excludeWarning", { message: result.excludeWarning }));
|
|
5401
|
+
if (result.copyWarning !== void 0) pushToast(t("copyWarning", { message: result.copyWarning }));
|
|
5299
5402
|
pruneWorktrees?.(result.path).then((report) => {
|
|
5300
5403
|
if (report === void 0) return;
|
|
5301
5404
|
if (report.removed.length > 0) pushToast(report.failed.length > 0 ? `${t("pruneDone", { n: report.removed.length })} ${t("pruneFailed", { n: report.failed.length })}` : t("pruneDone", { n: report.removed.length }));
|
|
@@ -5361,6 +5464,7 @@ window.__ModuleLoader__.load({
|
|
|
5361
5464
|
} : confirm.remote === true ? { subject: confirm.branch } : {},
|
|
5362
5465
|
confirmLabel: busy ? confirm.kind === "delete" ? t("deleteBranchBusy") : confirm.kind === "remove-worktree" ? t("worktreeRemove.busy") : t("worktreeBusy") : t(confirm.kind === "remove-worktree" ? "worktreeRemove.menu" : "actionConfirm"),
|
|
5363
5466
|
cancelLabel: t("actionCancel"),
|
|
5467
|
+
...confirm.kind === "delete" || confirm.kind === "remove-worktree" ? { danger: true } : {},
|
|
5364
5468
|
busy,
|
|
5365
5469
|
...confirm.kind === "worktree-cutout" ? {
|
|
5366
5470
|
draft: cutoutDraft,
|
|
@@ -5535,6 +5639,16 @@ window.__ModuleLoader__.load({
|
|
|
5535
5639
|
const KEEP_FIELD = "keepWorktrees";
|
|
5536
5640
|
const COPY_FILES_FIELD = "postCreateCopyFiles";
|
|
5537
5641
|
/**
|
|
5642
|
+
* Browser-safe relative-path check mirroring `src/copy-files.ts#isSafeRelativePath`.
|
|
5643
|
+
* Rejects empty strings, POSIX/Windows absolute paths, and `..` traversal segments.
|
|
5644
|
+
*/
|
|
5645
|
+
function isSafeCopyRelativePath(relPath) {
|
|
5646
|
+
const trimmed = relPath.trim();
|
|
5647
|
+
if (trimmed === "") return false;
|
|
5648
|
+
if (trimmed.startsWith("/") || trimmed.startsWith("\\") || /^[a-zA-Z]:[\\/]/.test(trimmed)) return false;
|
|
5649
|
+
return !trimmed.split(/[\\/]/).some((segment) => segment === "..");
|
|
5650
|
+
}
|
|
5651
|
+
/**
|
|
5538
5652
|
* Stages the settings edit over the `git-worktree` scope.
|
|
5539
5653
|
*
|
|
5540
5654
|
* The form publishes through a snapshot store because the slot component
|
|
@@ -5659,6 +5773,11 @@ window.__ModuleLoader__.load({
|
|
|
5659
5773
|
intendedKeep = this.parseKeep(this.keepDraft);
|
|
5660
5774
|
if (intendedKeep === void 0 || intendedKeep < 1) return;
|
|
5661
5775
|
}
|
|
5776
|
+
let intendedCopyFiles;
|
|
5777
|
+
if (this.copyFilesDraft !== void 0) {
|
|
5778
|
+
intendedCopyFiles = this.parseCopyFiles(this.copyFilesDraft);
|
|
5779
|
+
if (!intendedCopyFiles.every(isSafeCopyRelativePath)) return;
|
|
5780
|
+
}
|
|
5662
5781
|
this.saving = true;
|
|
5663
5782
|
this.failed = false;
|
|
5664
5783
|
this.publish();
|
|
@@ -5668,9 +5787,10 @@ window.__ModuleLoader__.load({
|
|
|
5668
5787
|
await this.scope.set(KEEP_FIELD, intendedKeep);
|
|
5669
5788
|
if (this.userLayer()?.["keepWorktrees"] !== intendedKeep) landed = false;
|
|
5670
5789
|
}
|
|
5671
|
-
if (
|
|
5672
|
-
|
|
5673
|
-
|
|
5790
|
+
if (intendedCopyFiles !== void 0) {
|
|
5791
|
+
await this.scope.set(COPY_FILES_FIELD, intendedCopyFiles);
|
|
5792
|
+
const stored = this.userLayer()?.[COPY_FILES_FIELD];
|
|
5793
|
+
if (!Array.isArray(stored) || stored.length !== intendedCopyFiles.length || stored.some((item, index) => item !== intendedCopyFiles[index])) landed = false;
|
|
5674
5794
|
}
|
|
5675
5795
|
} catch (_settingsWriteFailure) {
|
|
5676
5796
|
landed = false;
|
|
@@ -5703,6 +5823,7 @@ window.__ModuleLoader__.load({
|
|
|
5703
5823
|
const keepText = this.effectiveKeepText();
|
|
5704
5824
|
const keepParsed = this.parseKeep(keepText);
|
|
5705
5825
|
const copyFilesText = this.effectiveCopyFilesText();
|
|
5826
|
+
const copyFilesValid = this.parseCopyFiles(copyFilesText).every(isSafeCopyRelativePath);
|
|
5706
5827
|
const keepDirty = this.keepDraft !== void 0 && this.keepDraft !== String(this.scope.getSnapshot().value?.["keepWorktrees"] ?? 30);
|
|
5707
5828
|
const copyFilesDirty = this.copyFilesDraft !== void 0 && this.copyFilesDraft !== this.storedCopyFilesText();
|
|
5708
5829
|
return {
|
|
@@ -5719,7 +5840,8 @@ window.__ModuleLoader__.load({
|
|
|
5719
5840
|
keepWorktreesText: keepText,
|
|
5720
5841
|
keepWorktreesValid: keepParsed !== void 0 && keepParsed >= 1,
|
|
5721
5842
|
switchFailed: this.switchFailed,
|
|
5722
|
-
postCreateCopyFilesText: copyFilesText
|
|
5843
|
+
postCreateCopyFilesText: copyFilesText,
|
|
5844
|
+
postCreateCopyFilesValid: copyFilesValid
|
|
5723
5845
|
};
|
|
5724
5846
|
}
|
|
5725
5847
|
/** Replace the snapshot reference and notify, only when the fact moved. */
|
|
@@ -5990,19 +6112,12 @@ window.__ModuleLoader__.load({
|
|
|
5990
6112
|
}
|
|
5991
6113
|
//#endregion
|
|
5992
6114
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/WorktreeManagerModal.module.css?inline
|
|
5993
|
-
const css$1 = "/* The worktree manager dialog opened from the git-worktree settings card.\n * Tokens only, mirroring the card chrome and the sidebar's removal dialog\n * (a list body, a warn tint on dirty facts, the delete-tinted confirm). */\n\n/* The dialog CARD is widened here — the primitive pins its own .dialog_854325390 to\n * min(380px, 100%), and the width lives on the card, not the content region\n * (this class rides Modal's className prop, which lands on the card; the\n * doubled class out-specifies the primitive regardless of bundle order). */\n.dialog_854325390.dialog_854325390 {\n width: min(680px, 100%);\n}\n\n.body_854325390 {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n\n.count_854325390 {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary);\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: 13px;\n color: var(--dsw-alias-label-danger, #d64545);\n white-space: pre-wrap;\n word-break: break-all;\n}\n\n.empty_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-dimmed);\n padding: 12px 0;\n}\n\n/* The scan-cap notice. Not .error_854325390: the list below it is real and usable,\n * the sentence only says it is a first slice — and unlike .error_854325390 it carries\n * prose, so no break-all. */\n.warn_854325390 {\n font-size: 12px;\n color: var(--dsw-alias-label-warning, #b07000);\n}\n\n/* The scroll region: worktree counts grow without bound, the dialog must\n * not (BranchMenu's cap posture, dialog-scaled). No frame of its own —\n * each repository group is a card below, and a border around cards would\n * read as one flat list again. */\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/* One repository = one card: the outline plus the tinted header bar make\n * the group read as a container that OWNS its rows, not as one more row\n * in a flat list (the previous bare-text header sat at nearly the same\n * size and weight as the branch rows, and the belonging was invisible). */\n.group_854325390 {\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 10px;\n /* Clip the header background to the card's rounded corners. */\n overflow: hidden;\n}\n\n/* The per-repository header bar (and the trailing unrecognized-directory\n * group): the tinted fill separates projects at a glance, the folder icon\n * names what the header IS (a project, not a branch), and the trailing\n * count answers \"how many of my worktrees live here\" without counting. */\n.groupHead_854325390 {\n display: flex;\n align-items: center;\n gap: 6px;\n padding: 7px 10px;\n background: var(--dsw-alias-bg-layer-2, rgba(127, 127, 127, 0.12));\n font-size: 12px;\n font-weight: 600;\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/* Where the group's rows physically live (project layout vs the legacy\n * central root): a quiet tag after the name, so a repo appearing under both\n * locations reads as two deliberate halves rather than a duplication bug. */\n.groupSource_854325390 {\n flex-shrink: 0;\n font-size: 10px;\n font-weight: 400;\n color: var(--dsw-alias-label-secondary);\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 4px;\n padding: 0 4px;\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 /* The 29px left step = the header's 10px pad + 13px icon + 6px gap:\n * row content starts level with the header TEXT, so every row visibly\n * sits INSIDE its project instead of beside it. */\n padding: 8px 10px 8px 29px;\n border-bottom: 0.5px solid var(--dsw-alias-border-l4);\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/* Head line: branch, dirty mark, then the activity time pushed to the\n * row's right edge (the repository lives in the card's header bar). */\n.rowHead_854325390 {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.rowBranch_854325390 {\n font-size: 13px;\n font-weight: 500;\n color: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rowDirty_854325390 {\n font-size: 11px;\n color: var(--dsw-alias-label-danger, #d64545);\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/* The tail of the path is the identity (the <repo>-<branch> folder name), so\n * the ellipsis trims the head. */\n.rowPath_854325390 {\n font-size: 11px;\n color: var(--dsw-alias-label-secondary);\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n direction: rtl;\n text-align: left;\n}\n\n.remove_854325390 {\n appearance: none;\n flex-shrink: 0;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: none;\n font: inherit;\n font-size: 12px;\n color: var(--dsw-alias-label-danger, #d64545);\n padding: 5px 10px;\n cursor: pointer;\n}\n\n.remove_854325390:hover:not(:disabled) {\n border-color: var(--dsw-alias-label-danger, #d64545);\n}\n\n.remove_854325390:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n.remove_854325390:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n.removeConfirm_854325390 {\n color: var(--dsw-alias-label-danger, #d64545);\n}\n\n.removeFacts_854325390 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.removeFact_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.removeFactWarn_854325390 {\n color: var(--dsw-alias-label-danger, #d64545);\n}\n";
|
|
5994
|
-
const tagId$1 = "@laoyuehanni/dsh-git-worktree/WorktreeManagerModal.module.css";
|
|
5995
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId$1 + "\"]") === null) {
|
|
5996
|
-
const tag = document.createElement("style");
|
|
5997
|
-
tag.dataset.plugin = "@laoyuehanni/dsh-git-worktree";
|
|
5998
|
-
tag.dataset.pluginCss = tagId$1;
|
|
5999
|
-
tag.textContent = css$1;
|
|
6000
|
-
document.head.appendChild(tag);
|
|
6001
|
-
}
|
|
6002
6115
|
var WorktreeManagerModal_module_default = {
|
|
6003
6116
|
"dialog": "dialog_854325390",
|
|
6004
6117
|
"body": "body_854325390",
|
|
6118
|
+
"toolbar": "toolbar_854325390",
|
|
6005
6119
|
"count": "count_854325390",
|
|
6120
|
+
"refresh": "refresh_854325390",
|
|
6006
6121
|
"status": "status_854325390",
|
|
6007
6122
|
"error": "error_854325390",
|
|
6008
6123
|
"empty": "empty_854325390",
|
|
@@ -6012,7 +6127,6 @@ window.__ModuleLoader__.load({
|
|
|
6012
6127
|
"groupHead": "groupHead_854325390",
|
|
6013
6128
|
"groupIcon": "groupIcon_854325390",
|
|
6014
6129
|
"groupName": "groupName_854325390",
|
|
6015
|
-
"groupSource": "groupSource_854325390",
|
|
6016
6130
|
"groupCount": "groupCount_854325390",
|
|
6017
6131
|
"row": "row_854325390",
|
|
6018
6132
|
"rowMain": "rowMain_854325390",
|
|
@@ -6021,6 +6135,8 @@ window.__ModuleLoader__.load({
|
|
|
6021
6135
|
"rowDirty": "rowDirty_854325390",
|
|
6022
6136
|
"rowActivity": "rowActivity_854325390",
|
|
6023
6137
|
"rowPath": "rowPath_854325390",
|
|
6138
|
+
"rowActions": "rowActions_854325390",
|
|
6139
|
+
"rowAction": "rowAction_854325390",
|
|
6024
6140
|
"remove": "remove_854325390",
|
|
6025
6141
|
"removeConfirm": "removeConfirm_854325390",
|
|
6026
6142
|
"removeFacts": "removeFacts_854325390",
|
|
@@ -6032,30 +6148,13 @@ window.__ModuleLoader__.load({
|
|
|
6032
6148
|
/**
|
|
6033
6149
|
* WorktreeManagerModal: the settings card's second-level dialog listing EVERY
|
|
6034
6150
|
* direct child of the worktree storage root — across repositories, orphan
|
|
6035
|
-
* directories included.
|
|
6036
|
-
* a card whose tinted header bar carries the folder icon, the repo name and
|
|
6037
|
-
* its worktree count, and every row steps in under that header — the
|
|
6038
|
-
* project→worktree ownership is readable from the layout alone. A row
|
|
6039
|
-
* spells the checked-out branch and the last-use time (the freshest
|
|
6040
|
-
* qualifying session's updatedAt, the same activity the lazy prune orders
|
|
6041
|
-
* by); the delete button rides the shared removal flow, so a removal here
|
|
6042
|
-
* is behaviorally the sidebar's removal: confirm with dirty/ahead facts,
|
|
6043
|
-
* git first, archives and unregistration after. Unrecognized directories
|
|
6044
|
-
* (probe finds no git repository) render read-only — deleting someone
|
|
6045
|
-
* else's folder is outside "worktree management" — and directories with a
|
|
6046
|
-
* running session withhold their delete button.
|
|
6151
|
+
* directories included.
|
|
6047
6152
|
*
|
|
6048
6153
|
* @module git-worktree/client/WorktreeManagerModal
|
|
6049
6154
|
*/
|
|
6050
|
-
/** Concurrent inspects while the dialog loads.
|
|
6051
|
-
* process on the host, so this is the browser-side twin of the /group
|
|
6052
|
-
* route's batch cap. */
|
|
6155
|
+
/** Concurrent inspects while the dialog loads. */
|
|
6053
6156
|
const INSPECT_CONCURRENCY = 8;
|
|
6054
|
-
/**
|
|
6055
|
-
* The sessions of `workspace.sessionIds` the removal flow will archive:
|
|
6056
|
-
* everything visible — not archived, not blank, not a subagent row (the
|
|
6057
|
-
* same qualification every removal entry shares).
|
|
6058
|
-
*/
|
|
6157
|
+
/** The sessions of `workspace.sessionIds` the removal flow will archive. */
|
|
6059
6158
|
function archiveIdsFor(face, sessionIds) {
|
|
6060
6159
|
const archived = new Set(face.archivedSessionIds());
|
|
6061
6160
|
const ids = [];
|
|
@@ -6069,35 +6168,33 @@ window.__ModuleLoader__.load({
|
|
|
6069
6168
|
}
|
|
6070
6169
|
function WorktreeManagerModal({ open, onClose, face, t }) {
|
|
6071
6170
|
const [scan, setScan] = (0, react.useState)({ status: "loading" });
|
|
6171
|
+
const [refreshing, setRefreshing] = (0, react.useState)(false);
|
|
6172
|
+
const [openingPath, setOpeningPath] = (0, react.useState)(null);
|
|
6072
6173
|
const [inspects, setInspects] = (0, react.useState)({});
|
|
6073
|
-
/** Paths known to hold a running session — their delete buttons withhold. */
|
|
6074
6174
|
const [runningPaths, setRunningPaths] = (0, react.useState)(/* @__PURE__ */ new Set());
|
|
6075
6175
|
const [removeTarget, setRemoveTarget] = (0, react.useState)(null);
|
|
6076
6176
|
const [removing, setRemoving] = (0, react.useState)(false);
|
|
6077
6177
|
const [removeError, setRemoveError] = (0, react.useState)(null);
|
|
6078
|
-
/** The "last used" column's reference point. Re-read on every OPEN: this
|
|
6079
|
-
* component is mounted for as long as the settings card is expanded (the
|
|
6080
|
-
* `open` prop only drives the Modal), so a value frozen at mount would
|
|
6081
|
-
* have the dialog quoting hour-old distances. */
|
|
6082
6178
|
const [now, setNow] = (0, react.useState)(() => Date.now());
|
|
6083
|
-
|
|
6084
|
-
* cell needs one, and the removal flow needs two more — as linear finds
|
|
6085
|
-
* that is rows × workspaces per render, on a list whose whole point is
|
|
6086
|
-
* holding every worktree of every repository. */
|
|
6179
|
+
const scanGenRef = (0, react.useRef)(0);
|
|
6087
6180
|
const workspaceAt = (0, react.useMemo)(() => {
|
|
6088
6181
|
const byPath = new Map(face.workspaces().map((ws) => [pathKey(ws.path), ws]));
|
|
6089
6182
|
return (path) => byPath.get(pathKey(path));
|
|
6090
|
-
}, [
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
|
|
6096
|
-
|
|
6097
|
-
setRemoveError(null);
|
|
6183
|
+
}, [
|
|
6184
|
+
face,
|
|
6185
|
+
scan,
|
|
6186
|
+
now
|
|
6187
|
+
]);
|
|
6188
|
+
const loadWorktrees = (0, react.useCallback)((showLoadingState) => {
|
|
6189
|
+
const gen = ++scanGenRef.current;
|
|
6098
6190
|
setNow(Date.now());
|
|
6191
|
+
if (showLoadingState) {
|
|
6192
|
+
setScan({ status: "loading" });
|
|
6193
|
+
setInspects({});
|
|
6194
|
+
}
|
|
6195
|
+
setRefreshing(true);
|
|
6099
6196
|
face.listWorktrees().then(async ({ worktrees: entries, truncated }) => {
|
|
6100
|
-
if (
|
|
6197
|
+
if (scanGenRef.current !== gen) return;
|
|
6101
6198
|
setScan({
|
|
6102
6199
|
status: "ready",
|
|
6103
6200
|
entries,
|
|
@@ -6115,23 +6212,52 @@ window.__ModuleLoader__.load({
|
|
|
6115
6212
|
return [entry.path, void 0];
|
|
6116
6213
|
}
|
|
6117
6214
|
});
|
|
6118
|
-
if (
|
|
6215
|
+
if (scanGenRef.current !== gen) return;
|
|
6119
6216
|
setInspects(Object.fromEntries(facts.filter(([, value]) => value !== void 0)));
|
|
6217
|
+
setRefreshing(false);
|
|
6120
6218
|
}, (reason) => {
|
|
6121
|
-
if (
|
|
6219
|
+
if (scanGenRef.current !== gen) return;
|
|
6220
|
+
setRefreshing(false);
|
|
6221
|
+
setScan({
|
|
6122
6222
|
status: "error",
|
|
6123
6223
|
error: reason instanceof Error ? reason.message : String(reason)
|
|
6124
6224
|
});
|
|
6125
6225
|
});
|
|
6226
|
+
}, [face]);
|
|
6227
|
+
(0, react.useEffect)(() => {
|
|
6228
|
+
if (!open) {
|
|
6229
|
+
scanGenRef.current += 1;
|
|
6230
|
+
return;
|
|
6231
|
+
}
|
|
6232
|
+
setRemoveTarget(null);
|
|
6233
|
+
setRemoveError(null);
|
|
6234
|
+
setOpeningPath(null);
|
|
6235
|
+
loadWorktrees(true);
|
|
6126
6236
|
return () => {
|
|
6127
|
-
|
|
6237
|
+
scanGenRef.current += 1;
|
|
6128
6238
|
};
|
|
6129
|
-
}, [open,
|
|
6239
|
+
}, [open, loadWorktrees]);
|
|
6130
6240
|
const closeRemove = () => {
|
|
6131
6241
|
if (removing) return;
|
|
6132
6242
|
setRemoveTarget(null);
|
|
6133
6243
|
setRemoveError(null);
|
|
6134
6244
|
};
|
|
6245
|
+
const handleOpenWorktree = (path) => {
|
|
6246
|
+
if (face.openWorktree === void 0 || openingPath !== null) return;
|
|
6247
|
+
setOpeningPath(path);
|
|
6248
|
+
face.openWorktree(path).then(() => {
|
|
6249
|
+
setOpeningPath(null);
|
|
6250
|
+
onClose();
|
|
6251
|
+
}, (reason) => {
|
|
6252
|
+
setOpeningPath(null);
|
|
6253
|
+
emitToast(t("manager.openFailed", { message: reason instanceof Error ? reason.message : String(reason) }));
|
|
6254
|
+
});
|
|
6255
|
+
};
|
|
6256
|
+
const handleCopyPath = (path) => {
|
|
6257
|
+
(0, _deepseek_ai_dsh_client_ui_primitives.writeClipboard)(path).then((ok) => {
|
|
6258
|
+
if (ok) emitToast(t("hover.copied"), "success");
|
|
6259
|
+
});
|
|
6260
|
+
};
|
|
6135
6261
|
const confirmRemove = () => {
|
|
6136
6262
|
if (removing || removeTarget === null) return;
|
|
6137
6263
|
const target = removeTarget;
|
|
@@ -6159,13 +6285,7 @@ window.__ModuleLoader__.load({
|
|
|
6159
6285
|
})).then(() => {
|
|
6160
6286
|
setRemoving(false);
|
|
6161
6287
|
setRemoveTarget(null);
|
|
6162
|
-
|
|
6163
|
-
setScan({
|
|
6164
|
-
status: "ready",
|
|
6165
|
-
entries,
|
|
6166
|
-
truncated: truncated === true
|
|
6167
|
-
});
|
|
6168
|
-
});
|
|
6288
|
+
loadWorktrees(false);
|
|
6169
6289
|
}, (reason) => {
|
|
6170
6290
|
setRemoving(false);
|
|
6171
6291
|
setRemoveError(reason instanceof Error ? reason.message : String(reason));
|
|
@@ -6177,9 +6297,6 @@ window.__ModuleLoader__.load({
|
|
|
6177
6297
|
return freshestUpdatedAt(workspace.sessionIds.map((id) => face.sessionById(id)));
|
|
6178
6298
|
};
|
|
6179
6299
|
const validCount = scan.status === "ready" ? scan.entries.filter((entry) => entry.repoName !== null).length : 0;
|
|
6180
|
-
/** Directories the scan could not read as a worktree. They sit in their
|
|
6181
|
-
* own trailing group, so the headline count must say they exist — a bare
|
|
6182
|
-
* "3 worktrees" over four groups reads as a miscount. */
|
|
6183
6300
|
const orphanCount = scan.status === "ready" ? scan.entries.length - validCount : 0;
|
|
6184
6301
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(react_jsx_runtime.Fragment, { children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_deepseek_ai_dsh_client_ui_primitives.Modal, {
|
|
6185
6302
|
open,
|
|
@@ -6193,18 +6310,45 @@ window.__ModuleLoader__.load({
|
|
|
6193
6310
|
role: "status",
|
|
6194
6311
|
children: t("manager.loading")
|
|
6195
6312
|
}),
|
|
6196
|
-
scan.status === "error" && /* @__PURE__ */ (0, react_jsx_runtime.
|
|
6197
|
-
className: WorktreeManagerModal_module_default.
|
|
6198
|
-
|
|
6199
|
-
|
|
6313
|
+
scan.status === "error" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6314
|
+
className: WorktreeManagerModal_module_default.body,
|
|
6315
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6316
|
+
className: WorktreeManagerModal_module_default.error,
|
|
6317
|
+
role: "alert",
|
|
6318
|
+
children: t("manager.loadFailed", { message: scan.error })
|
|
6319
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6320
|
+
className: WorktreeManagerModal_module_default.toolbar,
|
|
6321
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6322
|
+
size: "sm",
|
|
6323
|
+
variant: "outline",
|
|
6324
|
+
disabled: refreshing,
|
|
6325
|
+
onClick: () => {
|
|
6326
|
+
loadWorktrees(true);
|
|
6327
|
+
},
|
|
6328
|
+
children: t("manager.refresh")
|
|
6329
|
+
})
|
|
6330
|
+
})]
|
|
6200
6331
|
}),
|
|
6201
6332
|
scan.status === "ready" && /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6202
6333
|
className: WorktreeManagerModal_module_default.body,
|
|
6203
6334
|
children: [
|
|
6204
6335
|
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6205
|
-
className: WorktreeManagerModal_module_default.
|
|
6206
|
-
|
|
6207
|
-
|
|
6336
|
+
className: WorktreeManagerModal_module_default.toolbar,
|
|
6337
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6338
|
+
className: WorktreeManagerModal_module_default.count,
|
|
6339
|
+
role: "status",
|
|
6340
|
+
children: [t("manager.count", { n: validCount }), orphanCount > 0 && t("manager.countOrphans", { n: orphanCount })]
|
|
6341
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("button", {
|
|
6342
|
+
type: "button",
|
|
6343
|
+
className: WorktreeManagerModal_module_default.refresh,
|
|
6344
|
+
disabled: refreshing,
|
|
6345
|
+
title: t("manager.refresh"),
|
|
6346
|
+
"aria-label": t("manager.refresh"),
|
|
6347
|
+
onClick: () => {
|
|
6348
|
+
loadWorktrees(false);
|
|
6349
|
+
},
|
|
6350
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRefreshOutlineRegular, { size: 13 }), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", { children: t("manager.refresh") })]
|
|
6351
|
+
})]
|
|
6208
6352
|
}),
|
|
6209
6353
|
scan.truncated && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
6210
6354
|
className: WorktreeManagerModal_module_default.warn,
|
|
@@ -6232,8 +6376,8 @@ window.__ModuleLoader__.load({
|
|
|
6232
6376
|
className: WorktreeManagerModal_module_default.groupName,
|
|
6233
6377
|
children: group.repoName ?? t("manager.orphans")
|
|
6234
6378
|
}),
|
|
6235
|
-
group.repoName !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6236
|
-
|
|
6379
|
+
group.repoName !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
6380
|
+
tone: "neutral",
|
|
6237
6381
|
children: t(group.source === "legacy" ? "manager.sourceLegacy" : "manager.sourceProject")
|
|
6238
6382
|
}),
|
|
6239
6383
|
group.repoName !== null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
@@ -6267,41 +6411,66 @@ window.__ModuleLoader__.load({
|
|
|
6267
6411
|
children: activity > 0 ? timeLabel(activity, now, t) : t("manager.activityNever")
|
|
6268
6412
|
})
|
|
6269
6413
|
]
|
|
6270
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
children: entry.path
|
|
6414
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.PathLabel, {
|
|
6415
|
+
path: entry.path,
|
|
6416
|
+
className: WorktreeManagerModal_module_default.rowPath ?? ""
|
|
6274
6417
|
})]
|
|
6275
|
-
}),
|
|
6276
|
-
|
|
6277
|
-
|
|
6278
|
-
|
|
6279
|
-
|
|
6280
|
-
|
|
6281
|
-
|
|
6282
|
-
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
|
|
6288
|
-
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
|
|
6296
|
-
|
|
6297
|
-
|
|
6298
|
-
|
|
6299
|
-
|
|
6300
|
-
|
|
6301
|
-
|
|
6302
|
-
|
|
6303
|
-
|
|
6304
|
-
|
|
6418
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6419
|
+
className: WorktreeManagerModal_module_default.rowActions,
|
|
6420
|
+
children: [
|
|
6421
|
+
!unknown && face.openWorktree !== void 0 && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6422
|
+
type: "button",
|
|
6423
|
+
className: WorktreeManagerModal_module_default.rowAction,
|
|
6424
|
+
disabled: openingPath !== null,
|
|
6425
|
+
title: t("manager.openSession"),
|
|
6426
|
+
"aria-label": t("manager.openSession"),
|
|
6427
|
+
onClick: () => {
|
|
6428
|
+
handleOpenWorktree(entry.path);
|
|
6429
|
+
},
|
|
6430
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconRightUpOutlineRegular, { size: 14 })
|
|
6431
|
+
}),
|
|
6432
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6433
|
+
type: "button",
|
|
6434
|
+
className: WorktreeManagerModal_module_default.rowAction,
|
|
6435
|
+
title: t("manager.copyPath"),
|
|
6436
|
+
"aria-label": t("manager.copyPath"),
|
|
6437
|
+
onClick: () => {
|
|
6438
|
+
handleCopyPath(entry.path);
|
|
6439
|
+
},
|
|
6440
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.IconCopyOutlineRegular, { size: 14 })
|
|
6441
|
+
}),
|
|
6442
|
+
!unknown ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6443
|
+
type: "button",
|
|
6444
|
+
className: WorktreeManagerModal_module_default.remove,
|
|
6445
|
+
disabled: running,
|
|
6446
|
+
title: running ? t("manager.running") : t("manager.removeAria", { path: entry.path }),
|
|
6447
|
+
"aria-label": t("manager.removeAria", { path: entry.path }),
|
|
6448
|
+
onClick: () => {
|
|
6449
|
+
setRemoveTarget({
|
|
6450
|
+
path: entry.path,
|
|
6451
|
+
branch: entry.branch,
|
|
6452
|
+
kind: "git"
|
|
6453
|
+
});
|
|
6454
|
+
setRemoveError(null);
|
|
6455
|
+
},
|
|
6456
|
+
children: t("worktreeRemove.menu")
|
|
6457
|
+
}) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("button", {
|
|
6458
|
+
type: "button",
|
|
6459
|
+
className: WorktreeManagerModal_module_default.remove,
|
|
6460
|
+
disabled: running,
|
|
6461
|
+
title: running ? t("manager.running") : t("manager.purgeAria", { path: entry.path }),
|
|
6462
|
+
"aria-label": t("manager.purgeAria", { path: entry.path }),
|
|
6463
|
+
onClick: () => {
|
|
6464
|
+
setRemoveTarget({
|
|
6465
|
+
path: entry.path,
|
|
6466
|
+
branch: null,
|
|
6467
|
+
kind: "orphan"
|
|
6468
|
+
});
|
|
6469
|
+
setRemoveError(null);
|
|
6470
|
+
},
|
|
6471
|
+
children: t("manager.purgeMenu")
|
|
6472
|
+
})
|
|
6473
|
+
]
|
|
6305
6474
|
})]
|
|
6306
6475
|
}, entry.path);
|
|
6307
6476
|
})]
|
|
@@ -6376,15 +6545,6 @@ window.__ModuleLoader__.load({
|
|
|
6376
6545
|
}
|
|
6377
6546
|
//#endregion
|
|
6378
6547
|
//#region \0git-worktree-css:/home/runner/work/dsh-git-worktree/dsh-git-worktree/src/client/GitWorktreeCard.module.css?inline
|
|
6379
|
-
const css = "/* git-worktree bundle configuration on the Plugins page. The page owns the\n * chrome (title, icon, breadcrumb); this component renders either the\n * bundle-row summary line or the configuration form inside the page. Visual\n * language mirrors the settings section's own card chrome (layer fills,\n * footer buttons); tokens only, no literal colors. */\n\n/* The one-line preview on the bundle's row. */\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/* The configuration form inside the bundle's page. */\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-tertiary);\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/* The read-only legacy storage root: text (not an input — the location is\n * historical and cannot be edited) plus its \"unused\" state on one row. */\n.rootRow_1463286416 {\n display: flex;\n align-items: baseline;\n gap: 8px;\n min-width: 0;\n}\n\n.rootValue_1463286416 {\n font-size: 13px;\n line-height: 1.5;\n color: var(--dsw-alias-label-primary);\n overflow-wrap: anywhere;\n}\n\n.rootUnused_1463286416 {\n flex: none;\n font-size: 11px;\n line-height: 1.5;\n color: var(--dsw-alias-label-tertiary);\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 4px;\n padding: 0 5px;\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 font-size: 12px;\n line-height: 1.5;\n color: var(--dsw-alias-label-error);\n}\n\n.discard_1463286416,\n.save_1463286416 {\n appearance: none;\n border: 0.5px solid transparent;\n border-radius: 8px;\n padding: 5px 14px;\n font: inherit;\n font-size: 13px;\n line-height: 1.5;\n cursor: pointer;\n}\n\n.discard_1463286416 {\n border-color: var(--dsw-alias-border-l2);\n background: none;\n color: var(--dsw-alias-label-secondary);\n}\n\n.discard_1463286416:hover:not(:disabled) {\n color: var(--dsw-alias-label-primary);\n border-color: var(--dsw-alias-label-dimmed);\n}\n\n.save_1463286416 {\n background: var(--dsw-alias-label-primary);\n color: var(--dsw-alias-bg-layer-3);\n}\n\n.discard_1463286416:disabled,\n.save_1463286416:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.discard_1463286416:focus-visible,\n.save_1463286416:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: 1px;\n}\n\n/* Sidebar-grouping switch: title + hint + caution beside a checkbox. */\n.toggleRow_1463286416 {\n margin-top: 10px;\n flex-direction: row;\n align-items: flex-start;\n gap: 10px;\n}\n\n.toggleText_1463286416 {\n flex: 1;\n display: flex;\n flex-direction: column;\n gap: 2px;\n}\n\n.toggleLabel_1463286416 {\n color: var(--dsw-alias-label-primary);\n font-weight: 500;\n}\n\n.toggleMark_1463286416 {\n margin-left: 4px;\n font-weight: 400;\n color: var(--dsw-alias-label-tertiary);\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 gap: 6px;\n flex: none;\n margin-top: 2px;\n}\n\n.spinner_1463286416 {\n display: flex;\n color: var(--dsw-alias-label-tertiary);\n animation: spin 0.7s linear infinite;\n}\n\n@keyframes spin {\n to { transform: rotate(360deg); }\n}\n\n.toggle_1463286416 {\n width: 16px;\n height: 16px;\n accent-color: var(--dsw-alias-brand-primary);\n cursor: pointer;\n}\n\n.toggle_1463286416:disabled {\n cursor: progress;\n}\n\n/* Manager entry row: title + hint on the left (the toggle rows' text\n * column), the launcher button on the right — the same posture as the\n * grouping switch, minus the checkbox. (.field_1463286416 is columnar; the row\n * direction is restated here.) */\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.manage_1463286416 {\n appearance: none;\n border: 0.5px solid var(--dsw-alias-border-l4);\n border-radius: 8px;\n background: none;\n font: inherit;\n font-size: 13px;\n color: var(--dsw-alias-label-primary);\n padding: 6px 12px;\n cursor: pointer;\n}\n\n.manage_1463286416:hover {\n border-color: var(--dsw-alias-brand-primary);\n}\n\n.manage_1463286416:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n/* Keep-cap row: the number input rides the toggle row's title column, and\n * stays disabled while the auto-prune switch is off (the cap means nothing\n * without the prune that enforces it). */\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: 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-brand-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 font-size: 12px;\n color: var(--dsw-alias-label-danger, #d64545);\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: 8px;\n background: var(--dsw-alias-bg-layer-2);\n font: inherit;\n font-family: 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:focus-visible {\n outline: 2px solid var(--dsw-alias-brand-primary);\n outline-offset: -2px;\n}\n\n.copyFilesInput_1463286416:disabled {\n opacity: 0.45;\n cursor: not-allowed;\n}\n\n/* Write-through switches flip optimistically, so a rejected write shows up\n * as the control snapping back. This note sits in the switch's own text\n * column and says which one did not take. */\n.switchBad_1463286416 {\n font-size: 12px;\n line-height: 16px;\n color: var(--dsw-alias-label-danger, #d64545);\n}\n\n/* The auto-prune audit trail (清理记录): newest first, one run per line —\n * relative time, the removed directories with their belonging, then the\n * run's exceptions in the secondary tone. */\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: 2px;\n padding: 4px 8px;\n border: 0.5px solid color-mix(in srgb, currentColor 12%, transparent);\n border-radius: 6px;\n}\n\n.historyTime_1463286416 {\n font-size: 12px;\n font-weight: 600;\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/* The fold toggle. A link, not a button chrome: it reveals rows in place,\n * it does not act on anything. */\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 color: var(--dsw-alias-label-link, var(--dsw-alias-label-secondary));\n cursor: pointer;\n}\n\n.historyMore_1463286416:hover {\n text-decoration: underline;\n}\n";
|
|
6380
|
-
const tagId = "@laoyuehanni/dsh-git-worktree/GitWorktreeCard.module.css";
|
|
6381
|
-
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=\"" + tagId + "\"]") === null) {
|
|
6382
|
-
const tag = document.createElement("style");
|
|
6383
|
-
tag.dataset.plugin = "@laoyuehanni/dsh-git-worktree";
|
|
6384
|
-
tag.dataset.pluginCss = tagId;
|
|
6385
|
-
tag.textContent = css;
|
|
6386
|
-
document.head.appendChild(tag);
|
|
6387
|
-
}
|
|
6388
6548
|
var GitWorktreeCard_module_default = {
|
|
6389
6549
|
"summary": "summary_1463286416",
|
|
6390
6550
|
"page": "page_1463286416",
|
|
@@ -6393,29 +6553,23 @@ window.__ModuleLoader__.load({
|
|
|
6393
6553
|
"fieldLabel": "fieldLabel_1463286416",
|
|
6394
6554
|
"rootRow": "rootRow_1463286416",
|
|
6395
6555
|
"rootValue": "rootValue_1463286416",
|
|
6396
|
-
"rootUnused": "rootUnused_1463286416",
|
|
6397
6556
|
"hint": "hint_1463286416",
|
|
6398
6557
|
"footer": "footer_1463286416",
|
|
6399
6558
|
"failed": "failed_1463286416",
|
|
6400
|
-
"discard": "discard_1463286416",
|
|
6401
|
-
"save": "save_1463286416",
|
|
6402
6559
|
"toggleRow": "toggleRow_1463286416",
|
|
6403
6560
|
"toggleText": "toggleText_1463286416",
|
|
6404
6561
|
"toggleLabel": "toggleLabel_1463286416",
|
|
6405
|
-
"toggleMark": "toggleMark_1463286416",
|
|
6406
6562
|
"toggleHint": "toggleHint_1463286416",
|
|
6407
6563
|
"toggleControl": "toggleControl_1463286416",
|
|
6408
|
-
"spinner": "spinner_1463286416",
|
|
6409
|
-
"toggle": "toggle_1463286416",
|
|
6410
6564
|
"manageRow": "manageRow_1463286416",
|
|
6411
|
-
"manage": "manage_1463286416",
|
|
6412
6565
|
"keepRow": "keepRow_1463286416",
|
|
6413
6566
|
"keepControl": "keepControl_1463286416",
|
|
6414
6567
|
"keepInput": "keepInput_1463286416",
|
|
6415
6568
|
"keepBad": "keepBad_1463286416",
|
|
6569
|
+
"copyFilesBad": "copyFilesBad_1463286416",
|
|
6570
|
+
"switchBad": "switchBad_1463286416",
|
|
6416
6571
|
"copyFilesRow": "copyFilesRow_1463286416",
|
|
6417
6572
|
"copyFilesInput": "copyFilesInput_1463286416",
|
|
6418
|
-
"switchBad": "switchBad_1463286416",
|
|
6419
6573
|
"historyRow": "historyRow_1463286416",
|
|
6420
6574
|
"history": "history_1463286416",
|
|
6421
6575
|
"historyRun": "historyRun_1463286416",
|
|
@@ -6432,7 +6586,7 @@ window.__ModuleLoader__.load({
|
|
|
6432
6586
|
* bundle's row, `view: 'page'` renders the configuration form inside the
|
|
6433
6587
|
* bundle's page. The legacy storage root is READ-ONLY (existing worktrees
|
|
6434
6588
|
* stay where they are; new ones are created inside their repository), while
|
|
6435
|
-
* the keep cap and
|
|
6589
|
+
* the keep cap, copy files fallback, and write-through switches remain editable.
|
|
6436
6590
|
*
|
|
6437
6591
|
* Renders nothing while the namespace is unavailable: a deployment that did
|
|
6438
6592
|
* not compose the host half shows no trace of the card.
|
|
@@ -6441,9 +6595,7 @@ window.__ModuleLoader__.load({
|
|
|
6441
6595
|
*/
|
|
6442
6596
|
/** Prune runs shown before the log folds behind "show all". */
|
|
6443
6597
|
const HISTORY_PREVIEW = 3;
|
|
6444
|
-
/** One removed worktree as "repo/branch" — or whichever half the scan
|
|
6445
|
-
* knew. The belonging is a snapshot taken at prune time and either field
|
|
6446
|
-
* can be missing; joining them unconditionally printed a bare " /". */
|
|
6598
|
+
/** One removed worktree as "repo/branch" — or whichever half the scan knew. */
|
|
6447
6599
|
function labelOfRemoved(item) {
|
|
6448
6600
|
const parts = [item.repoName, item.branch].filter((part) => typeof part === "string" && part !== "");
|
|
6449
6601
|
return parts.length === 0 ? "?" : parts.join("/");
|
|
@@ -6457,19 +6609,9 @@ window.__ModuleLoader__.load({
|
|
|
6457
6609
|
*/
|
|
6458
6610
|
function GitWorktreeCard(props) {
|
|
6459
6611
|
const [managerOpen, setManagerOpen] = (0, react.useState)(false);
|
|
6460
|
-
/** The prune log and the clock it is measured against, both read ONCE per
|
|
6461
|
-
* page mount. Reading localStorage (and Date.now) from the render body
|
|
6462
|
-
* made every unrelated re-render re-parse the log and shift the relative
|
|
6463
|
-
* times underneath the user. */
|
|
6464
6612
|
const [history, setHistory] = (0, react.useState)([]);
|
|
6465
6613
|
const [historyNow, setHistoryNow] = (0, react.useState)(() => Date.now());
|
|
6466
|
-
/** Whether the log is showing past its preview. Collapses again on every
|
|
6467
|
-
* page mount: the log can hold 20 runs, and a settings page is not where
|
|
6468
|
-
* a wall of them belongs by default. */
|
|
6469
6614
|
const [historyAll, setHistoryAll] = (0, react.useState)(false);
|
|
6470
|
-
/** The legacy root as the Host resolves it (covers the inherited default
|
|
6471
|
-
* the scope snapshot cannot spell), plus whether it exists on disk —
|
|
6472
|
-
* "未使用" reads better than hiding the field. */
|
|
6473
6615
|
const [storage, setStorage] = (0, react.useState)(null);
|
|
6474
6616
|
const onPage = props.view === "page";
|
|
6475
6617
|
(0, react.useEffect)(() => {
|
|
@@ -6497,7 +6639,7 @@ window.__ModuleLoader__.load({
|
|
|
6497
6639
|
children: t("cardDescription")
|
|
6498
6640
|
});
|
|
6499
6641
|
const lockInput = !state.writable;
|
|
6500
|
-
const lockActions = !state.dirty || state.saving || !state.keepWorktreesValid;
|
|
6642
|
+
const lockActions = !state.dirty || state.saving || !state.keepWorktreesValid || !state.postCreateCopyFilesValid;
|
|
6501
6643
|
const legacyRootText = storage?.legacyRoot ?? (state.rootDir === "" ? "—" : state.rootDir);
|
|
6502
6644
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6503
6645
|
className: GitWorktreeCard_module_default.page,
|
|
@@ -6518,8 +6660,8 @@ window.__ModuleLoader__.load({
|
|
|
6518
6660
|
className: GitWorktreeCard_module_default.rootValue,
|
|
6519
6661
|
title: legacyRootText,
|
|
6520
6662
|
children: legacyRootText
|
|
6521
|
-
}), storage !== null && !storage.legacyRootExists && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6522
|
-
|
|
6663
|
+
}), storage !== null && !storage.legacyRootExists && /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Tag, {
|
|
6664
|
+
tone: "neutral",
|
|
6523
6665
|
children: t("cardLegacyUnused")
|
|
6524
6666
|
})]
|
|
6525
6667
|
})]
|
|
@@ -6528,7 +6670,7 @@ window.__ModuleLoader__.load({
|
|
|
6528
6670
|
className: GitWorktreeCard_module_default.hint,
|
|
6529
6671
|
children: [t("cardRootDirHint"), state.overridden ? ` ${t("cardOverridden")}` : ""]
|
|
6530
6672
|
}),
|
|
6531
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
6673
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6532
6674
|
className: `${GitWorktreeCard_module_default.field} ${GitWorktreeCard_module_default.toggleRow}`,
|
|
6533
6675
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6534
6676
|
className: GitWorktreeCard_module_default.toggleText,
|
|
@@ -6549,14 +6691,11 @@ window.__ModuleLoader__.load({
|
|
|
6549
6691
|
]
|
|
6550
6692
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6551
6693
|
className: GitWorktreeCard_module_default.toggleControl,
|
|
6552
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6553
|
-
|
|
6554
|
-
type: "checkbox",
|
|
6694
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
6695
|
+
label: t("cardOpenGraphLabel"),
|
|
6555
6696
|
disabled: lockInput,
|
|
6556
6697
|
checked: state.openGraphByDefault,
|
|
6557
|
-
onChange:
|
|
6558
|
-
props.setOpenGraphByDefault(event.target.checked);
|
|
6559
|
-
}
|
|
6698
|
+
onChange: props.setOpenGraphByDefault
|
|
6560
6699
|
})
|
|
6561
6700
|
})]
|
|
6562
6701
|
}),
|
|
@@ -6571,16 +6710,16 @@ window.__ModuleLoader__.load({
|
|
|
6571
6710
|
className: GitWorktreeCard_module_default.toggleHint,
|
|
6572
6711
|
children: t("cardManageHint")
|
|
6573
6712
|
})]
|
|
6574
|
-
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6575
|
-
|
|
6576
|
-
|
|
6713
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6714
|
+
size: "sm",
|
|
6715
|
+
variant: "outline",
|
|
6577
6716
|
onClick: () => {
|
|
6578
6717
|
setManagerOpen(true);
|
|
6579
6718
|
},
|
|
6580
6719
|
children: t("cardManageWorktrees")
|
|
6581
6720
|
})]
|
|
6582
6721
|
}),
|
|
6583
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
6722
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6584
6723
|
className: `${GitWorktreeCard_module_default.field} ${GitWorktreeCard_module_default.toggleRow}`,
|
|
6585
6724
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6586
6725
|
className: GitWorktreeCard_module_default.toggleText,
|
|
@@ -6601,18 +6740,15 @@ window.__ModuleLoader__.load({
|
|
|
6601
6740
|
]
|
|
6602
6741
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6603
6742
|
className: GitWorktreeCard_module_default.toggleControl,
|
|
6604
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6605
|
-
|
|
6606
|
-
type: "checkbox",
|
|
6743
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
6744
|
+
label: t("cardFetchBeforeCreateLabel"),
|
|
6607
6745
|
disabled: lockInput,
|
|
6608
6746
|
checked: state.fetchBeforeCreate,
|
|
6609
|
-
onChange:
|
|
6610
|
-
props.setFetchBeforeCreate(event.target.checked);
|
|
6611
|
-
}
|
|
6747
|
+
onChange: props.setFetchBeforeCreate
|
|
6612
6748
|
})
|
|
6613
6749
|
})]
|
|
6614
6750
|
}),
|
|
6615
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("
|
|
6751
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("div", {
|
|
6616
6752
|
className: `${GitWorktreeCard_module_default.field} ${GitWorktreeCard_module_default.toggleRow}`,
|
|
6617
6753
|
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsxs)("span", {
|
|
6618
6754
|
className: GitWorktreeCard_module_default.toggleText,
|
|
@@ -6633,14 +6769,11 @@ window.__ModuleLoader__.load({
|
|
|
6633
6769
|
]
|
|
6634
6770
|
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6635
6771
|
className: GitWorktreeCard_module_default.toggleControl,
|
|
6636
|
-
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6637
|
-
|
|
6638
|
-
type: "checkbox",
|
|
6772
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Switch, {
|
|
6773
|
+
label: t("cardAutoPruneLabel"),
|
|
6639
6774
|
disabled: lockInput,
|
|
6640
6775
|
checked: state.autoPruneWorktrees,
|
|
6641
|
-
onChange:
|
|
6642
|
-
props.setAutoPruneWorktrees(event.target.checked);
|
|
6643
|
-
}
|
|
6776
|
+
onChange: props.setAutoPruneWorktrees
|
|
6644
6777
|
})
|
|
6645
6778
|
})]
|
|
6646
6779
|
}),
|
|
@@ -6691,6 +6824,7 @@ window.__ModuleLoader__.load({
|
|
|
6691
6824
|
className: GitWorktreeCard_module_default.copyFilesInput,
|
|
6692
6825
|
rows: 3,
|
|
6693
6826
|
disabled: lockInput,
|
|
6827
|
+
"aria-invalid": !state.postCreateCopyFilesValid,
|
|
6694
6828
|
placeholder: t("cardPostCreateCopyFilesPlaceholder"),
|
|
6695
6829
|
value: state.postCreateCopyFilesText,
|
|
6696
6830
|
onChange: (event) => {
|
|
@@ -6700,6 +6834,11 @@ window.__ModuleLoader__.load({
|
|
|
6700
6834
|
/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6701
6835
|
className: GitWorktreeCard_module_default.toggleHint,
|
|
6702
6836
|
children: t("cardPostCreateCopyFilesHint")
|
|
6837
|
+
}),
|
|
6838
|
+
!state.postCreateCopyFilesValid && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
6839
|
+
className: GitWorktreeCard_module_default.copyFilesBad,
|
|
6840
|
+
role: "alert",
|
|
6841
|
+
children: t("cardPostCreateCopyFilesBad")
|
|
6703
6842
|
})
|
|
6704
6843
|
]
|
|
6705
6844
|
}),
|
|
@@ -6769,16 +6908,16 @@ window.__ModuleLoader__.load({
|
|
|
6769
6908
|
role: "status",
|
|
6770
6909
|
children: t("cardSaveFailed")
|
|
6771
6910
|
}) : null,
|
|
6772
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6773
|
-
|
|
6774
|
-
|
|
6911
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6912
|
+
size: "sm",
|
|
6913
|
+
variant: "outline",
|
|
6775
6914
|
disabled: lockActions,
|
|
6776
6915
|
onClick: props.discard,
|
|
6777
6916
|
children: t("cardDiscard")
|
|
6778
6917
|
}),
|
|
6779
|
-
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(
|
|
6780
|
-
|
|
6781
|
-
|
|
6918
|
+
/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Button, {
|
|
6919
|
+
size: "sm",
|
|
6920
|
+
variant: "primary",
|
|
6782
6921
|
disabled: lockActions,
|
|
6783
6922
|
onClick: props.save,
|
|
6784
6923
|
children: t(state.saving ? "cardSaving" : "cardSave")
|
|
@@ -6804,6 +6943,8 @@ window.__ModuleLoader__.load({
|
|
|
6804
6943
|
graphCloseWindow: "Close popup",
|
|
6805
6944
|
graphToggleOpen: "Open graph",
|
|
6806
6945
|
graphToggleClose: "Close graph",
|
|
6946
|
+
graphShowBranches: "Show branches",
|
|
6947
|
+
graphHideBranches: "Hide branches",
|
|
6807
6948
|
graphSearch: "Search",
|
|
6808
6949
|
graphSearchPlaceholder: "Text or hash",
|
|
6809
6950
|
graphAuthorFilter: "Filter by author",
|
|
@@ -6947,6 +7088,7 @@ window.__ModuleLoader__.load({
|
|
|
6947
7088
|
cardPostCreateCopyFilesLabel: "Inherit configuration files (global fallback)",
|
|
6948
7089
|
cardPostCreateCopyFilesPlaceholder: "e.g.:\n.env\nconfig/secrets.json",
|
|
6949
7090
|
cardPostCreateCopyFilesHint: "One relative path per line. Only used when .worktreeinclude is absent from repository root; if present, .worktreeinclude takes precedence.",
|
|
7091
|
+
cardPostCreateCopyFilesBad: "Use relative paths inside the repository; absolute paths and “..” are not allowed.",
|
|
6950
7092
|
cardPruneHistoryLabel: "Prune history",
|
|
6951
7093
|
cardPruneHistoryEmpty: "No prune runs yet",
|
|
6952
7094
|
cardPruneHistoryRun: "Removed {n}:",
|
|
@@ -6975,8 +7117,19 @@ window.__ModuleLoader__.load({
|
|
|
6975
7117
|
"worktreePurge.desc": "This directory has no git record anymore. It will be deleted along with everything in it. This cannot be undone.",
|
|
6976
7118
|
"worktreePurge.busy": "Deleting folder…",
|
|
6977
7119
|
"manager.removeAria": "Remove the worktree “{path}”",
|
|
7120
|
+
"manager.refresh": "Refresh",
|
|
7121
|
+
"manager.openSession": "Open session in this worktree",
|
|
7122
|
+
"manager.copyPath": "Copy path",
|
|
7123
|
+
"manager.openFailed": "Could not open worktree: {message}",
|
|
6978
7124
|
fetchWarning: "Upstream sync failed; created from the local state: {message}",
|
|
6979
7125
|
excludeWarning: "The ignore rule for the repository could not be written; `.dsh/` will show as untracked: {message}",
|
|
7126
|
+
copyWarning: "Some configuration files could not be copied: {message}",
|
|
7127
|
+
gitFailSwitchDirty: "Uncommitted changes would be overwritten by switching branches. Commit or stash them, then try again.",
|
|
7128
|
+
gitFailSwitchMissing: "That branch no longer exists. Refresh the list and try again.",
|
|
7129
|
+
gitFailDeleteUnmerged: "Branch {branch} is not fully merged yet and was not deleted.",
|
|
7130
|
+
gitFailDeleteCheckedOut: "Branch {branch} is currently checked out and cannot be deleted.",
|
|
7131
|
+
gitFailWorktreeOccupied: "Branch {branch} is already checked out in another worktree.",
|
|
7132
|
+
gitFailWorktreePathExists: "The target worktree directory already exists and is not empty.",
|
|
6980
7133
|
pruneDone: "Auto-removed {n} stale worktree(s)",
|
|
6981
7134
|
pruneFailed: "{n} worktree(s) could not be auto-removed",
|
|
6982
7135
|
"worktreeRemove.menu": "Remove worktree",
|
|
@@ -7016,6 +7169,8 @@ window.__ModuleLoader__.load({
|
|
|
7016
7169
|
graphCloseWindow: "关闭弹出的窗",
|
|
7017
7170
|
graphToggleOpen: "打开图谱",
|
|
7018
7171
|
graphToggleClose: "关闭图谱",
|
|
7172
|
+
graphShowBranches: "显示分支列表",
|
|
7173
|
+
graphHideBranches: "收起分支列表",
|
|
7019
7174
|
graphSearch: "搜索",
|
|
7020
7175
|
graphSearchPlaceholder: "文本或哈希",
|
|
7021
7176
|
graphAuthorFilter: "作者筛选",
|
|
@@ -7159,6 +7314,7 @@ window.__ModuleLoader__.load({
|
|
|
7159
7314
|
cardPostCreateCopyFilesLabel: "新建工作树配置文件继承(全局后备)",
|
|
7160
7315
|
cardPostCreateCopyFilesPlaceholder: "例如:\n.env\nconfig/secrets.json",
|
|
7161
7316
|
cardPostCreateCopyFilesHint: "每行一个相对路径。仅在仓库根目录不存在 .worktreeinclude 时生效;若仓库存在 .worktreeinclude,则优先使用该文件。",
|
|
7317
|
+
cardPostCreateCopyFilesBad: "请仅填写仓库内的相对路径,不允许绝对路径或包含“..”。",
|
|
7162
7318
|
cardPruneHistoryLabel: "清理记录",
|
|
7163
7319
|
cardPruneHistoryEmpty: "暂无清理记录",
|
|
7164
7320
|
cardPruneHistoryRun: "清理了 {n} 个:",
|
|
@@ -7187,8 +7343,19 @@ window.__ModuleLoader__.load({
|
|
|
7187
7343
|
"worktreePurge.desc": "该目录已无 git 记录,将连同全部内容一并删除,此操作不可恢复。",
|
|
7188
7344
|
"worktreePurge.busy": "正在删除文件夹…",
|
|
7189
7345
|
"manager.removeAria": "删除工作树“{path}”",
|
|
7346
|
+
"manager.refresh": "刷新",
|
|
7347
|
+
"manager.openSession": "在此工作树中打开会话",
|
|
7348
|
+
"manager.copyPath": "复制路径",
|
|
7349
|
+
"manager.openFailed": "无法打开工作树:{message}",
|
|
7190
7350
|
fetchWarning: "上游同步失败,已按本地状态创建:{message}",
|
|
7191
7351
|
excludeWarning: "仓库忽略规则写入失败,`.dsh/` 将显示为未跟踪目录:{message}",
|
|
7352
|
+
copyWarning: "部分配置文件未能复制到新工作树:{message}",
|
|
7353
|
+
gitFailSwitchDirty: "工作区有未提交的改动,切换分支会覆盖它们。请先提交或暂存后再试。",
|
|
7354
|
+
gitFailSwitchMissing: "目标分支已不存在,请刷新分支列表后重试。",
|
|
7355
|
+
gitFailDeleteUnmerged: "分支 {branch} 尚未完全合并,已拒绝安全删除。",
|
|
7356
|
+
gitFailDeleteCheckedOut: "分支 {branch} 正在被当前或其他工作树检出,无法删除。",
|
|
7357
|
+
gitFailWorktreeOccupied: "分支 {branch} 已被其他工作树占用,请直接跳转到该工作树或切出新分支。",
|
|
7358
|
+
gitFailWorktreePathExists: "目标工作树目录已存在且非空,请清理后重试。",
|
|
7192
7359
|
pruneDone: "已自动清理 {n} 个旧工作树",
|
|
7193
7360
|
pruneFailed: "{n} 个工作树自动清理失败",
|
|
7194
7361
|
"worktreeRemove.menu": "删除工作树",
|
|
@@ -7215,6 +7382,37 @@ window.__ModuleLoader__.load({
|
|
|
7215
7382
|
cancel: "取消"
|
|
7216
7383
|
};
|
|
7217
7384
|
//#endregion
|
|
7385
|
+
//#region src/client/ToastHost.tsx
|
|
7386
|
+
/**
|
|
7387
|
+
* Global toast host mounted into `shell.overlay` so worktree notifications
|
|
7388
|
+
* survive session switches and modal closes.
|
|
7389
|
+
*
|
|
7390
|
+
* @module git-worktree/client/ToastHost
|
|
7391
|
+
*/
|
|
7392
|
+
/** Render the head entry of the shared git-worktree toast queue. */
|
|
7393
|
+
function WorktreeToastHost() {
|
|
7394
|
+
const [head, setHead] = (0, react.useState)(() => peekToast());
|
|
7395
|
+
(0, react.useEffect)(() => {
|
|
7396
|
+
const unregister = registerToastHost();
|
|
7397
|
+
setHead(peekToast());
|
|
7398
|
+
const off = subscribeToasts(() => {
|
|
7399
|
+
setHead(peekToast());
|
|
7400
|
+
});
|
|
7401
|
+
return () => {
|
|
7402
|
+
off();
|
|
7403
|
+
unregister();
|
|
7404
|
+
};
|
|
7405
|
+
}, []);
|
|
7406
|
+
if (head === void 0) return null;
|
|
7407
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_deepseek_ai_dsh_client_ui_primitives.Toast, {
|
|
7408
|
+
text: head.text,
|
|
7409
|
+
...head.tone === void 0 ? {} : { tone: head.tone },
|
|
7410
|
+
onDone: () => {
|
|
7411
|
+
shiftToast(head.seq);
|
|
7412
|
+
}
|
|
7413
|
+
}, head.seq);
|
|
7414
|
+
}
|
|
7415
|
+
//#endregion
|
|
7218
7416
|
//#region src/client/index.ts
|
|
7219
7417
|
/** Dictionary namespace owned by this plugin. */
|
|
7220
7418
|
const NS = "git-worktree";
|
|
@@ -7229,6 +7427,7 @@ window.__ModuleLoader__.load({
|
|
|
7229
7427
|
* package name; it matches the `cordis.patch.yml` entry verbatim).
|
|
7230
7428
|
*/
|
|
7231
7429
|
const PLUGIN_PACKAGE = "@laoyuehanni/dsh-git-worktree";
|
|
7430
|
+
const hasSyncedRef = (ref) => ref !== void 0 && typeof ref.get === "function" && typeof ref.subscribe === "function";
|
|
7232
7431
|
/** Required services: the slot ledger, session/workspace runtimes, the
|
|
7233
7432
|
* workspace navigation/directory face, copy, and the config forms backing
|
|
7234
7433
|
* the plugin configuration card. */
|
|
@@ -7242,12 +7441,15 @@ window.__ModuleLoader__.load({
|
|
|
7242
7441
|
"remote",
|
|
7243
7442
|
"configForms"
|
|
7244
7443
|
];
|
|
7245
|
-
function apply(ctx) {
|
|
7444
|
+
function apply(ctx, config) {
|
|
7246
7445
|
ctx.effect(() => ctx.locale.register(NS, {
|
|
7247
7446
|
zh,
|
|
7248
7447
|
en
|
|
7249
7448
|
}), "git-worktree: dictionaries");
|
|
7250
7449
|
const groupingForm = ctx.configForms.get(GIT_WORKTREE_NS);
|
|
7450
|
+
const openGraphRef = hasSyncedRef(config?.openGraphByDefault) ? config.openGraphByDefault : void 0;
|
|
7451
|
+
const autoPruneRef = hasSyncedRef(config?.autoPruneWorktrees) ? config.autoPruneWorktrees : void 0;
|
|
7452
|
+
const keepWorktreesRef = hasSyncedRef(config?.keepWorktrees) ? config.keepWorktrees : void 0;
|
|
7251
7453
|
/** The DSH half of one worktree removal, read from the live snapshots: the
|
|
7252
7454
|
* workspace registration sitting on the directory, whether any of its
|
|
7253
7455
|
* sessions is running (the verb withholds), and the archive set —
|
|
@@ -7311,14 +7513,14 @@ window.__ModuleLoader__.load({
|
|
|
7311
7513
|
});
|
|
7312
7514
|
},
|
|
7313
7515
|
openGraphByDefault: () => {
|
|
7516
|
+
if (openGraphRef !== void 0) return openGraphRef.get() === true;
|
|
7314
7517
|
const section = groupingForm.getSnapshot();
|
|
7315
7518
|
return section.status === "ready" && section.value?.openGraphByDefault === true;
|
|
7316
7519
|
},
|
|
7317
7520
|
pruneWorktrees: async (createdPath) => {
|
|
7318
|
-
const section = groupingForm.getSnapshot();
|
|
7319
|
-
if (section.status
|
|
7320
|
-
|
|
7321
|
-
const keep = section.value?.keepWorktrees ?? 30;
|
|
7521
|
+
const section = autoPruneRef === void 0 || keepWorktreesRef === void 0 ? groupingForm.getSnapshot() : void 0;
|
|
7522
|
+
if (!(autoPruneRef !== void 0 ? autoPruneRef.get() === true : section !== void 0 && section.status === "ready" && (section.value?.autoPruneWorktrees ?? false) === true)) return void 0;
|
|
7523
|
+
const keep = keepWorktreesRef !== void 0 ? keepWorktreesRef.get() ?? 30 : section?.status === "ready" ? section.value?.keepWorktrees ?? 30 : 30;
|
|
7322
7524
|
const workspaces = ctx.workspaces.list.getSnapshot();
|
|
7323
7525
|
const scan = await requestWorktreesAll(workspaces.items.map((workspace) => workspace.path));
|
|
7324
7526
|
if (!scan.ok) return void 0;
|
|
@@ -7401,6 +7603,11 @@ window.__ModuleLoader__.load({
|
|
|
7401
7603
|
locale: NS,
|
|
7402
7604
|
inject: chipInjected
|
|
7403
7605
|
}, BranchChipDock));
|
|
7606
|
+
ctx.slots.inject("shell.overlay", () => ctx.slots.register({
|
|
7607
|
+
name: "shell.overlay",
|
|
7608
|
+
id: "git-worktree-toasts",
|
|
7609
|
+
order: 20
|
|
7610
|
+
}, WorktreeToastHost));
|
|
7404
7611
|
const managerFace = () => ({
|
|
7405
7612
|
listWorktrees: async () => {
|
|
7406
7613
|
const result = await requestWorktreesAll(ctx.workspaces.list.getSnapshot().items.map((workspace) => workspace.path));
|
|
@@ -7457,7 +7664,11 @@ window.__ModuleLoader__.load({
|
|
|
7457
7664
|
if (!result.ok) throw new Error(result.error);
|
|
7458
7665
|
},
|
|
7459
7666
|
archiveSession: (sessionId) => ctx.workspaces.archiveSession(sessionId),
|
|
7460
|
-
deleteWorkspace: (workspaceId) => ctx.workspaces.delete(workspaceId)
|
|
7667
|
+
deleteWorkspace: (workspaceId) => ctx.workspaces.delete(workspaceId),
|
|
7668
|
+
openWorktree: async (path) => {
|
|
7669
|
+
const workspace = await ctx.workspaces.create({ path });
|
|
7670
|
+
ctx.uiWorkspace.startSession(workspace.workspaceId);
|
|
7671
|
+
}
|
|
7461
7672
|
});
|
|
7462
7673
|
const form = new CardForm(groupingForm);
|
|
7463
7674
|
const store = form.bind();
|
|
@@ -7492,8 +7703,76 @@ window.__ModuleLoader__.load({
|
|
|
7492
7703
|
//#endregion
|
|
7493
7704
|
exports.apply = apply;
|
|
7494
7705
|
exports.inject = inject;
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7706
|
+
const __dsh_exports = module.exports;
|
|
7707
|
+
return __dsh_exports && typeof __dsh_exports.apply === "function" ? Object.assign({}, __dsh_exports, { apply(ctx, config) {
|
|
7708
|
+
if (!__dsh_meta_used && typeof document !== "undefined" && ctx && typeof ctx.effect === "function") ctx.effect(() => {
|
|
7709
|
+
if (__dsh_meta_used) return () => {};
|
|
7710
|
+
const mounted = [];
|
|
7711
|
+
for (const [, tagId, css] of __dsh_sheets) if (document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]") === null) {
|
|
7712
|
+
const tag = document.createElement("style");
|
|
7713
|
+
tag.dataset.plugin = __dsh_id;
|
|
7714
|
+
tag.dataset.pluginCss = tagId;
|
|
7715
|
+
tag.textContent = css;
|
|
7716
|
+
document.head.appendChild(tag);
|
|
7717
|
+
mounted.push(tag);
|
|
7718
|
+
}
|
|
7719
|
+
return () => {
|
|
7720
|
+
for (const tag of mounted) tag.remove();
|
|
7721
|
+
};
|
|
7722
|
+
}, "git-worktree: fallback stylesheets");
|
|
7723
|
+
return __dsh_exports.apply.call(this, ctx, config);
|
|
7724
|
+
} }) : __dsh_exports;
|
|
7725
|
+
};
|
|
7726
|
+
const __dsh_sheets = [
|
|
7727
|
+
[
|
|
7728
|
+
"src/client/BranchChip.module.css",
|
|
7729
|
+
"@laoyuehanni/dsh-git-worktree/BranchChip.module.css",
|
|
7730
|
+
"/* 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: 168px;\n max-width: min(400px, 80vw);\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 display: flex;\n flex-direction: column;\n gap: 2px;\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: 6px 8px;\n font-size: 13px;\n line-height: 20px;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popSubject_1594205807 {\n margin: 0;\n padding: 0 8px 2px;\n font-size: 13px;\n line-height: 20px;\n font-weight: 500;\n color: inherit;\n overflow-wrap: anywhere;\n}\n\n.popDetails_1594205807 {\n padding: 0 8px 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: 2px;\n padding: 2px;\n}\n\n.popActions_1594205807 button {\n flex: 1 1 0;\n height: 28px;\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: 248px;\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.menuCreate_1594205807::placeholder {\n color: var(--dsw-alias-label-secondary);\n}\n\n.menuCreate_1594205807:focus {\n outline: none;\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 8px;\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"
|
|
7731
|
+
],
|
|
7732
|
+
[
|
|
7733
|
+
"src/client/CommitGraph.module.css",
|
|
7734
|
+
"@laoyuehanni/dsh-git-worktree/CommitGraph.module.css",
|
|
7735
|
+
".panel_486748374 {\n display: flex;\n flex-direction: column;\n flex: 1 1 auto;\n min-width: 0;\n min-height: 0;\n border-left: 0.5px solid var(--dsw-alias-border-l2);\n font-size: 12px;\n color: var(--dsw-alias-label-primary);\n --dsh-scrollbar-thumb: var(--dsw-alias-scrollbar-bg-l2);\n --dsh-scrollbar-thumb-hover: var(--dsw-alias-scrollbar-hover-l2);\n}\n\n.heading_486748374 {\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n padding: 8px 10px 8px 12px;\n flex-shrink: 0;\n}\n\n.branch_486748374 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-size: 14px;\n font-weight: 500;\n min-width: 0;\n flex: 0 1 auto;\n}\n\n.loaded_486748374 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n}\n\n.headingActions_486748374 {\n display: inline-flex;\n align-items: center;\n gap: 2px;\n margin-left: auto;\n flex-shrink: 0;\n}\n\n.iconButton_486748374 {\n display: grid;\n place-items: center;\n border: 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary);\n width: 24px;\n height: 24px;\n padding: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n cursor: pointer;\n flex-shrink: 0;\n}\n\n.iconButtonActive_486748374 {\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.closeIcon_486748374 {\n stroke-width: 1.8px;\n stroke-linecap: round;\n}\n\n@media (hover: hover) {\n .iconButton_486748374:hover:not(:disabled),\n .textButton_486748374:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.iconButton_486748374:disabled,\n.textButton_486748374:disabled {\n opacity: 0.4;\n cursor: default;\n}\n\n.search_486748374,\n.authorFilter_486748374 {\n box-sizing: border-box;\n min-width: 0;\n height: 28px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: var(--dsw-alias-interactive-bg-hover);\n color: inherit;\n padding: 4px 8px;\n font: inherit;\n}\n\n.search_486748374 {\n width: 150px;\n flex: 0 1 150px;\n}\n\n.authorFilter_486748374 {\n width: 108px;\n flex: 0 1 108px;\n cursor: pointer;\n}\n\n.authorFilter_486748374 option {\n background: var(--dsw-alias-bg-layer-2);\n color: var(--dsw-alias-label-primary);\n}\n\n.search_486748374:focus-visible,\n.authorFilter_486748374:focus-visible,\n.iconButton_486748374:focus-visible,\n.textButton_486748374:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -1px;\n}\n\n.search_486748374::placeholder {\n color: var(--dsw-alias-label-tertiary);\n}\n\n.columns_486748374 {\n display: flex;\n align-items: center;\n gap: 8px;\n height: 25px;\n padding: 0 14px 0 8px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n flex-shrink: 0;\n}\n\n.columns_486748374 > span:first-child { flex: 0 0 auto; }\n.columns_486748374 > span:nth-child(2) { flex: 1; }\n.columns_486748374 > span:nth-child(3) { width: 70px; }\n.columns_486748374 > span:last-child { width: 99px; }\n\n.list_486748374 {\n flex: 1 1 0%;\n min-height: 58px;\n overflow: auto;\n padding: 0 6px;\n scrollbar-width: thin;\n}\n\n.row_486748374 {\n display: flex;\n align-items: center;\n gap: 8px;\n width: 100%;\n height: 36px;\n padding: 0 7px 0 2px;\n border: 0;\n border-radius: var(--dsw-radius-sm, 8px);\n background: transparent;\n color: inherit;\n text-align: left;\n font: inherit;\n cursor: pointer;\n}\n\n@media (hover: hover) {\n .row_486748374:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n }\n}\n\n.selected_486748374 {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 14%, transparent);\n}\n\n@media (hover: hover) {\n .selected_486748374:hover {\n background: color-mix(in srgb, var(--dsw-alias-state-business-primary) 18%, transparent);\n }\n}\n\n.row_486748374:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: -2px;\n}\n\n.graph_486748374 {\n flex-shrink: 0;\n overflow: visible;\n}\n\n.graph_486748374 path {\n fill: none;\n stroke-width: 1.5px;\n}\n\n.subject_486748374 {\n flex: 1 1 auto;\n min-width: 40px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.author_486748374 {\n flex: 0 0 70px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n}\n\n.date_486748374 {\n flex: 0 0 44px;\n color: var(--dsw-alias-label-secondary);\n font-size: 11px;\n}\n\n.hash_486748374 {\n flex: 0 0 47px;\n font-size: 10px;\n font-family: var(--ds-font-family-code, monospace);\n color: var(--dsw-alias-label-tertiary);\n}\n\n.state_486748374 {\n padding: 16px;\n color: var(--dsw-alias-label-secondary);\n overflow-wrap: anywhere;\n}\n\n.footer_486748374 {\n display: flex;\n align-items: center;\n justify-content: space-between;\n gap: 8px;\n padding: 4px 13px;\n min-height: 27px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 11px;\n flex-shrink: 0;\n}\n\n.error_486748374 {\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--dsw-alias-state-error-primary);\n}\n\n.textButton_486748374 {\n border: 0;\n background: transparent;\n padding: 4px 6px;\n border-radius: var(--dsw-radius-sm, 8px);\n color: var(--dsw-alias-link);\n font: inherit;\n font-size: 11px;\n font-weight: 500;\n cursor: pointer;\n align-self: flex-start;\n flex-shrink: 0;\n}\n\n.detailHost_486748374 {\n display: flex;\n flex: 0 0 auto;\n min-height: 0;\n max-height: min(316px, 44%);\n}\n\n.detail_486748374 {\n box-sizing: border-box;\n display: flex;\n flex: 1;\n flex-direction: column;\n min-width: 0;\n min-height: 0;\n padding: 12px 16px 10px;\n border-top: 0.5px solid var(--dsw-alias-border-l2);\n}\n\n.detailTitle_486748374 {\n font-size: 13px;\n font-weight: 500;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n flex-shrink: 0;\n}\n\n.meta_486748374 {\n display: flex;\n flex-wrap: wrap;\n gap: 5px 12px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n padding: 6px 0;\n flex-shrink: 0;\n}\n\n.meta_486748374 code {\n font-family: var(--ds-font-family-code, monospace);\n}\n\n.messageScroll_486748374 {\n min-height: 0;\n overflow: hidden;\n}\n\n.message_486748374 {\n margin: 2px 0;\n white-space: pre-wrap;\n overflow-wrap: anywhere;\n font-size: 12px;\n line-height: 18px;\n color: var(--dsw-alias-label-secondary);\n display: -webkit-box;\n -webkit-line-clamp: 3;\n -webkit-box-orient: vertical;\n overflow: hidden;\n}\n\n.expanded_486748374 .messageScroll_486748374 {\n overflow: auto;\n scrollbar-width: thin;\n}\n\n.expanded_486748374 .message_486748374 {\n display: block;\n -webkit-line-clamp: unset;\n}\n\n.files_486748374 {\n display: flex;\n align-items: center;\n gap: 9px;\n color: var(--dsw-alias-label-tertiary);\n font-size: 10px;\n padding-top: 7px;\n flex-shrink: 0;\n white-space: nowrap;\n}\n\n.fileName_486748374 {\n overflow: hidden;\n text-overflow: ellipsis;\n min-width: 0;\n flex: 1;\n}\n\n.added_486748374 {\n color: var(--dsw-alias-file-diff-added-marker, var(--dsw-alias-state-success-primary));\n}\n\n.removed_486748374 {\n color: var(--dsw-alias-file-diff-deleted-marker, var(--dsw-alias-state-error-primary));\n}\n\n@media (max-width: 900px) {\n .author_486748374,\n .hash_486748374,\n .columns_486748374 > span:nth-child(3) {\n display: none;\n }\n .columns_486748374 > span:last-child {\n width: 44px;\n }\n}\n\n@media (max-height: 600px) {\n .detail_486748374 {\n padding: 7px 12px;\n }\n .meta_486748374 {\n padding: 3px 0;\n }\n}\n"
|
|
7736
|
+
],
|
|
7737
|
+
[
|
|
7738
|
+
"src/client/GitWorktreeCard.module.css",
|
|
7739
|
+
"@laoyuehanni/dsh-git-worktree/GitWorktreeCard.module.css",
|
|
7740
|
+
"/* 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-tertiary);\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 font-size: 13px;\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 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: 2px;\n padding: 6px 8px;\n border: 0.5px solid var(--dsw-alias-border-l2);\n border-radius: var(--dsw-radius-sm, 8px);\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.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"
|
|
7741
|
+
],
|
|
7742
|
+
[
|
|
7743
|
+
"src/client/PushDialog.module.css",
|
|
7744
|
+
"@laoyuehanni/dsh-git-worktree/PushDialog.module.css",
|
|
7745
|
+
".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: 34px;\n padding: 3px 10px;\n border-radius: var(--dsw-radius-md, 12px);\n background: var(--dsw-alias-interactive-bg-hover);\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 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 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 overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.badge_517543419 {\n font-size: 11px;\n line-height: 18px;\n padding: 0 5px;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-secondary);\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: 120px;\n margin-bottom: 8px;\n overflow: auto;\n font-size: 12px;\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"
|
|
7746
|
+
],
|
|
7747
|
+
[
|
|
7748
|
+
"src/client/SyncProgress.module.css",
|
|
7749
|
+
"@laoyuehanni/dsh-git-worktree/SyncProgress.module.css",
|
|
7750
|
+
"/* The floating progress card of a running fetch/update/push. */\n.card_408765909 {\n box-sizing: border-box;\n position: fixed;\n right: 20px;\n bottom: 84px;\n z-index: 1000;\n width: 380px;\n max-width: calc(100vw - 40px);\n padding: 10px 12px 12px;\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-l1);\n box-shadow: var(--dsw-elevation-prominent, var(--dsw-shadow-lv3));\n color: var(--dsw-alias-label-primary);\n animation: syncCardIn 160ms ease-out;\n}\n\n.head_408765909 {\n display: flex;\n align-items: center;\n gap: 8px;\n min-height: 22px;\n}\n\n.title_408765909 {\n flex: 1 1 auto;\n min-width: 0;\n overflow: hidden;\n font-size: 13px;\n font-weight: 500;\n line-height: 20px;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n\n.cancel_408765909 {\n flex: none;\n display: grid;\n place-items: center;\n width: 24px;\n height: 24px;\n margin: 0 -4px 0 0;\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 .cancel_408765909:hover {\n background: var(--dsw-alias-interactive-bg-hover);\n color: var(--dsw-alias-label-primary);\n }\n}\n\n.cancel_408765909:focus-visible {\n outline: 2px solid var(--dsw-alias-state-business-primary);\n outline-offset: 1px;\n}\n\n.track_408765909 {\n position: relative;\n height: 4px;\n margin: 8px 0;\n overflow: hidden;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-interactive-bg-hover);\n}\n\n.fill_408765909 {\n height: 100%;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-state-business-primary);\n transition: width 150ms linear;\n}\n\n.indeterminate_408765909 {\n position: absolute;\n top: 0;\n bottom: 0;\n left: 0;\n width: 40%;\n border-radius: var(--dsw-radius-xs, 4px);\n background: var(--dsw-alias-state-business-primary);\n animation: syncSweep 1.1s ease-in-out infinite;\n}\n\n.detail_408765909 {\n overflow: hidden;\n font-size: 12px;\n line-height: 18px;\n font-variant-numeric: tabular-nums;\n white-space: nowrap;\n text-overflow: ellipsis;\n color: var(--dsw-alias-label-secondary);\n}\n\n@keyframes syncSweep {\n from { transform: translateX(-100%); }\n to { transform: translateX(250%); }\n}\n\n@keyframes syncCardIn {\n from { opacity: 0; transform: translateY(6px); }\n to { opacity: 1; transform: translateY(0); }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .card_408765909 { animation: none; }\n .fill_408765909 { transition: none; }\n .indeterminate_408765909 { width: 100%; opacity: 0.35; animation: none; }\n}\n"
|
|
7751
|
+
],
|
|
7752
|
+
[
|
|
7753
|
+
"src/client/WorktreeManagerModal.module.css",
|
|
7754
|
+
"@laoyuehanni/dsh-git-worktree/WorktreeManagerModal.module.css",
|
|
7755
|
+
"/* 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.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: 13px;\n color: var(--dsw-alias-state-error-primary);\n white-space: pre-wrap;\n word-break: break-all;\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 font-size: 12px;\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-size: 13px;\n font-weight: 500;\n color: inherit;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n\n.rowDirty_854325390 {\n font-size: 11px;\n color: 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 var(--dsw-alias-border-l4);\n border-radius: var(--dsw-radius-sm, 8px);\n background: none;\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: var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover));\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\n.removeConfirm_854325390 {\n color: var(--dsw-alias-state-error-primary);\n}\n\n@media (hover: hover) {\n .removeConfirm_854325390:hover:not(:disabled) {\n border-color: var(--dsw-alias-state-error-primary);\n background: var(--dsw-alias-interactive-bg-hover-danger, var(--dsw-alias-interactive-bg-hover));\n }\n}\n\n.removeFacts_854325390 {\n display: flex;\n flex-direction: column;\n gap: 6px;\n}\n\n.removeFact_854325390 {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary);\n}\n\n.removeFactWarn_854325390 {\n color: var(--dsw-alias-state-error-primary);\n}\n"
|
|
7756
|
+
]
|
|
7757
|
+
];
|
|
7758
|
+
const __dsh_remove_fallback = () => {
|
|
7759
|
+
if (typeof document === "undefined") return;
|
|
7760
|
+
for (const [, tagId] of __dsh_sheets) {
|
|
7761
|
+
const el = document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId) + "]");
|
|
7762
|
+
if (el) el.remove();
|
|
7763
|
+
}
|
|
7764
|
+
};
|
|
7765
|
+
return {
|
|
7766
|
+
id: __dsh_id,
|
|
7767
|
+
meta: () => {
|
|
7768
|
+
__dsh_meta_used = true;
|
|
7769
|
+
__dsh_remove_fallback();
|
|
7770
|
+
const stylesheets = {};
|
|
7771
|
+
for (const [path, , css] of __dsh_sheets) stylesheets[path] = { text: () => css };
|
|
7772
|
+
return { stylesheets };
|
|
7773
|
+
},
|
|
7774
|
+
factory: __dsh_factory
|
|
7775
|
+
};
|
|
7776
|
+
})());
|
|
7498
7777
|
|
|
7499
7778
|
//# sourceMappingURL=client.js.map
|