dsh-github-flow 0.2.1 → 0.4.0
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.en.md +234 -130
- package/README.md +217 -112
- package/docs/UPGRADE-NOTES.md +15 -9
- package/docs/architecture.md +120 -108
- package/docs/images/2.png +0 -0
- package/docs/npm-publish-guide.md +12 -1
- package/lib/api/routes-actions.js +117 -0
- package/lib/api/routes-overview.js +198 -3
- package/lib/cache.d.ts +4 -0
- package/lib/cache.js +14 -0
- package/lib/client.d.ts +13 -1
- package/lib/client.js +3162 -2162
- package/lib/executor/git-parser.d.ts +25 -0
- package/lib/executor/git-parser.js +143 -0
- package/lib/executor/platform-guide.d.ts +14 -0
- package/lib/executor/platform-guide.js +40 -0
- package/lib/executor/process-utils.d.ts +51 -0
- package/lib/executor/process-utils.js +162 -0
- package/lib/executor/version-utils.d.ts +12 -0
- package/lib/executor/version-utils.js +27 -0
- package/lib/executor.d.ts +131 -17
- package/lib/executor.js +411 -223
- package/lib/git-watcher.d.ts +36 -0
- package/lib/git-watcher.js +91 -0
- package/lib/main.js +11 -0
- package/lib/renderers/cache.d.ts +8 -0
- package/lib/renderers/cache.js +66 -0
- package/lib/renderers/common.d.ts +24 -0
- package/lib/renderers/common.js +88 -0
- package/lib/renderers/gist.d.ts +15 -0
- package/lib/renderers/gist.js +99 -0
- package/lib/renderers/issue.d.ts +4 -0
- package/lib/renderers/issue.js +70 -0
- package/lib/renderers/label.d.ts +4 -0
- package/lib/renderers/label.js +48 -0
- package/lib/renderers/markdown.d.ts +15 -26
- package/lib/renderers/markdown.js +15 -517
- package/lib/renderers/pr.d.ts +4 -0
- package/lib/renderers/pr.js +107 -0
- package/lib/renderers/release.d.ts +4 -0
- package/lib/renderers/release.js +74 -0
- package/lib/renderers/repo.d.ts +4 -0
- package/lib/renderers/repo.js +149 -0
- package/lib/renderers/ruleset.d.ts +4 -0
- package/lib/renderers/ruleset.js +74 -0
- package/lib/renderers/run.d.ts +4 -0
- package/lib/renderers/run.js +79 -0
- package/lib/renderers/skill.d.ts +4 -0
- package/lib/renderers/skill.js +61 -0
- package/lib/renderers/status.d.ts +23 -0
- package/lib/renderers/status.js +124 -0
- package/lib/tools/cache.d.ts +64 -0
- package/lib/tools/cache.js +186 -0
- package/lib/tools/gist.d.ts +155 -0
- package/lib/tools/gist.js +190 -0
- package/lib/tools/help.js +233 -11
- package/lib/tools/image-utils.d.ts +8 -0
- package/lib/tools/image-utils.js +34 -0
- package/lib/tools/issue.d.ts +17 -1
- package/lib/tools/issue.js +114 -8
- package/lib/tools/label.d.ts +80 -0
- package/lib/tools/label.js +237 -0
- package/lib/tools/pr.d.ts +12 -0
- package/lib/tools/pr.js +96 -4
- package/lib/tools/repo.d.ts +8 -0
- package/lib/tools/repo.js +127 -3
- package/lib/tools/ruleset.d.ts +80 -0
- package/lib/tools/ruleset.js +177 -0
- package/lib/tools/run.d.ts +8 -0
- package/lib/tools/run.js +104 -3
- package/lib/tools/secret.d.ts +5 -0
- package/lib/tools/secret.js +108 -23
- package/lib/tools/status.d.ts +39 -0
- package/lib/tools/status.js +53 -0
- package/lib/types.d.ts +112 -0
- package/lib/ui/auth-guide-card.d.ts +4 -0
- package/lib/ui/auth-guide-card.js +161 -0
- package/lib/ui/branch-selector.d.ts +10 -0
- package/lib/ui/branch-selector.js +163 -0
- package/lib/ui/commit-modal.d.ts +8 -0
- package/lib/ui/commit-modal.js +89 -0
- package/lib/ui/icons.d.ts +7 -0
- package/lib/ui/icons.js +53 -0
- package/lib/ui/network-banner.d.ts +10 -0
- package/lib/ui/network-banner.js +54 -0
- package/lib/ui/storage.d.ts +26 -0
- package/lib/ui/storage.js +134 -0
- package/lib/ui/styles.d.ts +6 -0
- package/lib/ui/styles.js +1285 -0
- package/lib/ui/sync-settings-modal.d.ts +11 -0
- package/lib/ui/sync-settings-modal.js +350 -0
- package/lib/ui/sync-status-badge.d.ts +8 -0
- package/lib/ui/sync-status-badge.js +64 -0
- package/lib/ui/upgrade-card.d.ts +7 -0
- package/lib/ui/upgrade-card.js +197 -0
- package/lib/ui/utils.d.ts +10 -0
- package/lib/ui/utils.js +66 -0
- package/lib/ui/workspace-panel.d.ts +4 -0
- package/lib/ui/workspace-panel.js +464 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 分支查看与快速切换下拉选择器组件
|
|
3
|
+
*/
|
|
4
|
+
export function BranchSelectorDropdown(props) {
|
|
5
|
+
var currentBranch = props.currentBranch || "main";
|
|
6
|
+
var cwd = props.cwd;
|
|
7
|
+
var branchesData = props.branchesData;
|
|
8
|
+
var onBranchSwitched = props.onBranchSwitched || (() => { });
|
|
9
|
+
var showToast = props.showToast || (() => { });
|
|
10
|
+
var [isOpen, setIsOpen] = React.useState(false);
|
|
11
|
+
var [loading, setLoading] = React.useState(false);
|
|
12
|
+
var [switching, setSwitching] = React.useState(false);
|
|
13
|
+
var [branches, setBranches] = React.useState([]);
|
|
14
|
+
var [search, setSearch] = React.useState("");
|
|
15
|
+
var [fetchError, setFetchError] = React.useState(null);
|
|
16
|
+
var containerRef = React.useRef(null);
|
|
17
|
+
React.useEffect(() => {
|
|
18
|
+
if (!isOpen)
|
|
19
|
+
return;
|
|
20
|
+
var handleClickOutside = (e) => {
|
|
21
|
+
if (containerRef.current && !containerRef.current.contains(e.target)) {
|
|
22
|
+
setIsOpen(false);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
document.addEventListener("mousedown", handleClickOutside);
|
|
26
|
+
return () => document.removeEventListener("mousedown", handleClickOutside);
|
|
27
|
+
}, [isOpen]);
|
|
28
|
+
var toggleOpen = () => {
|
|
29
|
+
if (isOpen) {
|
|
30
|
+
setIsOpen(false);
|
|
31
|
+
return;
|
|
32
|
+
}
|
|
33
|
+
setIsOpen(true);
|
|
34
|
+
setSearch("");
|
|
35
|
+
setFetchError(null);
|
|
36
|
+
if (branchesData && Array.isArray(branchesData.branches) && branchesData.branches.length > 0) {
|
|
37
|
+
setBranches(branchesData.branches);
|
|
38
|
+
setLoading(false);
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
setLoading(true);
|
|
42
|
+
var url = "/api/github/branches" + (cwd ? "?cwd=" + encodeURIComponent(cwd) : "");
|
|
43
|
+
fetch(url)
|
|
44
|
+
.then(async (res) => {
|
|
45
|
+
if (!res.ok) {
|
|
46
|
+
var errText = await res.text().catch(() => "");
|
|
47
|
+
if (res.status === 404 || errText.includes("not found")) {
|
|
48
|
+
throw new Error("后端分支接口未注册 (404)。请重启 DSH 桌面端以加载新后端服务。");
|
|
49
|
+
}
|
|
50
|
+
throw new Error(`服务响应异常 (${res.status}): ${errText || res.statusText}`);
|
|
51
|
+
}
|
|
52
|
+
return res.json();
|
|
53
|
+
})
|
|
54
|
+
.then((json) => {
|
|
55
|
+
setLoading(false);
|
|
56
|
+
if (json && json.ok && json.data && Array.isArray(json.data.branches)) {
|
|
57
|
+
setBranches(json.data.branches);
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
setFetchError(json.error || "获取分支列表失败");
|
|
61
|
+
}
|
|
62
|
+
})
|
|
63
|
+
.catch((err) => {
|
|
64
|
+
setLoading(false);
|
|
65
|
+
setFetchError(err.message || "读取分支失败");
|
|
66
|
+
});
|
|
67
|
+
};
|
|
68
|
+
var handleSwitch = async (targetBranch) => {
|
|
69
|
+
if (targetBranch === currentBranch || switching)
|
|
70
|
+
return;
|
|
71
|
+
setSwitching(true);
|
|
72
|
+
try {
|
|
73
|
+
var res = await fetch("/api/github/branch-switch", {
|
|
74
|
+
method: "POST",
|
|
75
|
+
headers: { "Content-Type": "application/json" },
|
|
76
|
+
body: JSON.stringify({ cwd, branch: targetBranch }),
|
|
77
|
+
}).catch(() => null);
|
|
78
|
+
if (!res || !res.ok) {
|
|
79
|
+
res = await fetch("/api/github/action", {
|
|
80
|
+
method: "POST",
|
|
81
|
+
headers: { "Content-Type": "application/json" },
|
|
82
|
+
body: JSON.stringify({ action: "switch_branch", cwd, branch: targetBranch }),
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
if (!res.ok) {
|
|
86
|
+
var errText = await res.text().catch(() => "");
|
|
87
|
+
showToast(`❌ 切换失败:${errText || res.statusText}`);
|
|
88
|
+
return;
|
|
89
|
+
}
|
|
90
|
+
var json = await res.json();
|
|
91
|
+
if (json && json.ok) {
|
|
92
|
+
setIsOpen(false);
|
|
93
|
+
showToast(`✅ 已切换到分支 ${json.currentBranch || targetBranch}`);
|
|
94
|
+
onBranchSwitched(json.currentBranch || targetBranch);
|
|
95
|
+
}
|
|
96
|
+
else {
|
|
97
|
+
showToast(`❌ 切换失败:${json.error || json.message || "未知错误"}`);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
catch (e) {
|
|
101
|
+
showToast(`❌ 切换分支网络请求失败:${e.message || e}`);
|
|
102
|
+
}
|
|
103
|
+
finally {
|
|
104
|
+
setSwitching(false);
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
var filtered = branches.filter((b) => !search || b.name.toLowerCase().includes(search.toLowerCase()));
|
|
108
|
+
var localBranches = filtered.filter((b) => !b.isRemote);
|
|
109
|
+
var remoteBranches = filtered.filter((b) => b.isRemote);
|
|
110
|
+
var h = React.createElement;
|
|
111
|
+
return h("div", {
|
|
112
|
+
ref: containerRef,
|
|
113
|
+
style: { position: "relative", display: "inline-block" },
|
|
114
|
+
}, h("button", {
|
|
115
|
+
type: "button",
|
|
116
|
+
className: "dsh-github-branch-btn",
|
|
117
|
+
onClick: toggleOpen,
|
|
118
|
+
title: `当前分支: ${currentBranch}(点击可切换分支)`,
|
|
119
|
+
}, renderGitIcon(12, "currentColor"), h("span", { style: { maxWidth: "160px", overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, currentBranch), h("span", { style: { fontSize: "9px", opacity: 0.7, marginLeft: "1px" } }, "▾")), isOpen
|
|
120
|
+
? h("div", { className: "dsh-github-branch-dropdown" }, h("div", { className: "dsh-github-branch-search" }, h("input", {
|
|
121
|
+
className: "dsh-github-branch-input",
|
|
122
|
+
type: "text",
|
|
123
|
+
placeholder: "搜索分支 (输入关键词)...",
|
|
124
|
+
value: search,
|
|
125
|
+
autoFocus: true,
|
|
126
|
+
onChange: (e) => setSearch(e.target.value),
|
|
127
|
+
})), h("div", { className: "dsh-github-branch-list" }, loading
|
|
128
|
+
? h("div", { style: { padding: "12px", textAlign: "center", fontSize: "11px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, "⏳ 读取分支中...")
|
|
129
|
+
: fetchError
|
|
130
|
+
? h("div", { style: { padding: "12px", textAlign: "center", fontSize: "11px", color: "var(--dsw-alias-state-error-primary, #cf222e)" } }, `⚠️ ${fetchError}`)
|
|
131
|
+
: [
|
|
132
|
+
localBranches.length > 0
|
|
133
|
+
? h("div", { key: "hdr-local", style: { padding: "4px 12px", fontSize: "10px", fontWeight: 600, color: "var(--dsw-alias-label-tertiary, #8c8c8c)", textTransform: "uppercase" } }, "本地分支")
|
|
134
|
+
: null,
|
|
135
|
+
...localBranches.map((b) => h("div", {
|
|
136
|
+
key: b.name,
|
|
137
|
+
className: "dsh-github-branch-item" + (b.isCurrent ? " active" : ""),
|
|
138
|
+
onClick: () => handleSwitch(b.name),
|
|
139
|
+
title: b.subject ? `${b.name}\n${b.subject} (${b.relativeTime})` : b.name,
|
|
140
|
+
}, h("div", { style: { display: "flex", alignItems: "center", gap: "6px", minWidth: 0 } }, b.isCurrent
|
|
141
|
+
? h("span", { style: { color: "var(--dsw-alias-state-success, #2ea043)", fontWeight: 700 } }, "✓")
|
|
142
|
+
: h("span", { style: { width: "10px" } }), h("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap" } }, b.name)), b.relativeTime
|
|
143
|
+
? h("span", { style: { fontSize: "10px", color: "var(--dsw-alias-label-tertiary, #8c8c8c)", flexShrink: 0, marginLeft: "6px" } }, b.relativeTime)
|
|
144
|
+
: null)),
|
|
145
|
+
remoteBranches.length > 0
|
|
146
|
+
? h("div", { key: "hdr-remote", style: { padding: "6px 12px 4px", fontSize: "10px", fontWeight: 600, color: "var(--dsw-alias-label-tertiary, #8c8c8c)", textTransform: "uppercase", borderTop: "1px solid var(--dsw-alias-border-l2, rgba(0,0,0,0.06))", marginTop: "4px" } }, "远程分支 (点击检出)")
|
|
147
|
+
: null,
|
|
148
|
+
...remoteBranches.map((b) => h("div", {
|
|
149
|
+
key: b.name,
|
|
150
|
+
className: "dsh-github-branch-item",
|
|
151
|
+
onClick: () => handleSwitch(b.name),
|
|
152
|
+
title: b.subject ? `${b.name}\n${b.subject} (${b.relativeTime})` : b.name,
|
|
153
|
+
}, h("div", { style: { display: "flex", alignItems: "center", gap: "6px", minWidth: 0 } }, h("span", { style: { width: "10px" } }), h("span", { style: { overflow: "hidden", textOverflow: "ellipsis", whiteSpace: "nowrap", opacity: 0.85 } }, b.name)), b.relativeTime
|
|
154
|
+
? h("span", { style: { fontSize: "10px", color: "var(--dsw-alias-label-tertiary, #8c8c8c)", flexShrink: 0, marginLeft: "6px" } }, b.relativeTime)
|
|
155
|
+
: null)),
|
|
156
|
+
filtered.length === 0 && !loading
|
|
157
|
+
? h("div", { style: { padding: "12px", textAlign: "center", fontSize: "11px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, "未匹配到任何分支")
|
|
158
|
+
: null,
|
|
159
|
+
].filter(Boolean)), switching
|
|
160
|
+
? h("div", { style: { padding: "6px", textAlign: "center", fontSize: "11px", background: "rgba(9, 105, 218, 0.1)", color: "var(--dsw-alias-link, #0969da)", fontWeight: 500 } }, "正在切换分支...")
|
|
161
|
+
: null)
|
|
162
|
+
: null);
|
|
163
|
+
}
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 提交详情模态弹窗组件(与设置弹窗同构)
|
|
3
|
+
*/
|
|
4
|
+
export function CommitDetailModal(props) {
|
|
5
|
+
if (!props.commit)
|
|
6
|
+
return null;
|
|
7
|
+
var c = props.commit;
|
|
8
|
+
var h = React.createElement;
|
|
9
|
+
var [fetchedDetail, setFetchedDetail] = React.useState(null);
|
|
10
|
+
var [fetchingDetail, setFetchingDetail] = React.useState(false);
|
|
11
|
+
React.useEffect(function () {
|
|
12
|
+
var onKeyDown = function (e) {
|
|
13
|
+
if (e.key === "Escape" || e.keyCode === 27)
|
|
14
|
+
props.onClose();
|
|
15
|
+
};
|
|
16
|
+
window.addEventListener("keydown", onKeyDown);
|
|
17
|
+
return function () { window.removeEventListener("keydown", onKeyDown); };
|
|
18
|
+
}, [props.onClose]);
|
|
19
|
+
React.useEffect(function () {
|
|
20
|
+
setFetchedDetail(null);
|
|
21
|
+
if (c.body || c.stat)
|
|
22
|
+
return;
|
|
23
|
+
setFetchingDetail(true);
|
|
24
|
+
var url = "/api/github/commit-detail?sha=" + encodeURIComponent(c.sha) + (props.cwd ? "&cwd=" + encodeURIComponent(props.cwd) : "");
|
|
25
|
+
fetch(url)
|
|
26
|
+
.then(function (r) { return r.json(); })
|
|
27
|
+
.then(function (j) {
|
|
28
|
+
setFetchingDetail(false);
|
|
29
|
+
if (j && j.ok && j.detail)
|
|
30
|
+
setFetchedDetail(j.detail);
|
|
31
|
+
})
|
|
32
|
+
.catch(function () { setFetchingDetail(false); });
|
|
33
|
+
}, [c.sha, props.cwd]);
|
|
34
|
+
var effectiveBody = c.body;
|
|
35
|
+
var effectiveStat = c.stat;
|
|
36
|
+
if (!effectiveBody && !effectiveStat && fetchedDetail) {
|
|
37
|
+
effectiveStat = fetchedDetail;
|
|
38
|
+
}
|
|
39
|
+
return h("div", {
|
|
40
|
+
className: "dsh-github-modal-overlay",
|
|
41
|
+
onClick: props.onClose,
|
|
42
|
+
style: { zIndex: 100000 },
|
|
43
|
+
}, h("div", {
|
|
44
|
+
className: "dsh-github-modal-dialog",
|
|
45
|
+
style: { width: "94%", maxWidth: "460px", maxHeight: "84vh", display: "flex", flexDirection: "column", overflow: "hidden" },
|
|
46
|
+
onClick: function (e) { e.stopPropagation(); },
|
|
47
|
+
}, h("div", { className: "dsh-github-modal-header", style: { flexShrink: 0 } }, h("div", { style: { display: "flex", alignItems: "center", gap: "8px" } }, renderGitIcon(15, "#1296db"), h("h3", { style: { margin: 0, fontSize: "14px", fontWeight: 600 } }, "提交详情")), h("button", {
|
|
48
|
+
style: { background: "none", border: "none", cursor: "pointer", fontSize: "18px", color: "var(--dsw-alias-label-secondary, #656d76)", padding: "0 4px" },
|
|
49
|
+
onClick: props.onClose,
|
|
50
|
+
title: "关闭 (Esc)",
|
|
51
|
+
}, "✕")), h("div", {
|
|
52
|
+
className: "dsh-github-modal-body",
|
|
53
|
+
style: { padding: "16px", overflowY: "auto", flex: 1, minHeight: 0, display: "flex", flexDirection: "column", gap: "12px", boxSizing: "border-box" },
|
|
54
|
+
}, h("div", { style: { display: "flex", justifyContent: "space-between", alignItems: "center", fontSize: "11px", opacity: 0.85 } }, h("span", { style: { fontFamily: "monospace", fontWeight: 600, userSelect: "all" }, title: "完整 SHA: " + (c.fullSha || c.sha) }, c.fullSha || c.sha), h("span", null, c.relative)), h("div", { style: { fontSize: "13px", fontWeight: 600, color: "var(--dsw-alias-label-primary, #1f2328)", wordBreak: "break-word", lineHeight: "1.45" } }, c.subject), h("div", { style: { fontSize: "11px", color: "var(--dsw-alias-label-secondary, #656d76)" } }, `提交者: ${c.author}${c.email ? ` <${c.email}>` : ""}${c.date ? ` · ${c.date}` : ""}`), effectiveBody
|
|
55
|
+
? h("div", {
|
|
56
|
+
style: {
|
|
57
|
+
fontSize: "12px",
|
|
58
|
+
lineHeight: "1.6",
|
|
59
|
+
whiteSpace: "pre-wrap",
|
|
60
|
+
wordBreak: "break-word",
|
|
61
|
+
padding: "10px 12px",
|
|
62
|
+
borderRadius: "6px",
|
|
63
|
+
background: "var(--dsw-alias-bg-module-platform, #f6f8fa)",
|
|
64
|
+
border: "1px solid var(--dsw-alias-border-l2, #e1e4e8)",
|
|
65
|
+
},
|
|
66
|
+
}, effectiveBody)
|
|
67
|
+
: null, effectiveStat
|
|
68
|
+
? h("div", null, h("div", { style: { fontSize: "11px", fontWeight: 600, marginBottom: "4px", opacity: 0.8 } }, "📁 文件变更统计:"), h("pre", {
|
|
69
|
+
className: "dsh-github-commit-pre",
|
|
70
|
+
style: {
|
|
71
|
+
fontSize: "11px",
|
|
72
|
+
lineHeight: "1.5",
|
|
73
|
+
whiteSpace: "pre-wrap",
|
|
74
|
+
wordBreak: "break-word",
|
|
75
|
+
margin: 0,
|
|
76
|
+
maxHeight: "34vh",
|
|
77
|
+
overflowY: "auto",
|
|
78
|
+
padding: "8px 10px",
|
|
79
|
+
borderRadius: "6px",
|
|
80
|
+
background: "var(--dsw-alias-bg-module-platform, #f6f8fa)",
|
|
81
|
+
border: "1px solid var(--dsw-alias-border-l2, #e1e4e8)",
|
|
82
|
+
},
|
|
83
|
+
}, effectiveStat))
|
|
84
|
+
: null, !effectiveBody && !effectiveStat
|
|
85
|
+
? (fetchingDetail
|
|
86
|
+
? h("div", { style: { fontSize: "12px", opacity: 0.7, padding: "8px 0" } }, "⏳ 正在获取详细变更说明…")
|
|
87
|
+
: h("div", { style: { fontSize: "11px", opacity: 0.6, fontStyle: "italic", padding: "6px 0" } }, "(该提交未包含多行正文;重启 DSH 桌面端可同步最新格式并直接呈现变更统计)"))
|
|
88
|
+
: null)));
|
|
89
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 官方高清 SVG 矢量组件与图标徽章
|
|
3
|
+
*/
|
|
4
|
+
export declare function renderOctocat(size?: number, color?: string): any;
|
|
5
|
+
export declare function renderGitIcon(size?: number, color?: string): any;
|
|
6
|
+
export declare function renderOctocatBadge(size?: number): any;
|
|
7
|
+
export declare function renderPluginBadge(hFactory: any): any;
|
package/lib/ui/icons.js
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 官方高清 SVG 矢量组件与图标徽章
|
|
3
|
+
*/
|
|
4
|
+
export function renderOctocat(size = 18, color = "currentColor") {
|
|
5
|
+
return React.createElement("svg", {
|
|
6
|
+
viewBox: "0 0 16 16",
|
|
7
|
+
width: size,
|
|
8
|
+
height: size,
|
|
9
|
+
fill: color,
|
|
10
|
+
style: { flexShrink: 0, display: "inline-block", verticalAlign: "middle" }
|
|
11
|
+
}, React.createElement("path", {
|
|
12
|
+
fillRule: "evenodd",
|
|
13
|
+
clipRule: "evenodd",
|
|
14
|
+
d: "M8 0C3.58 0 0 3.58 0 8C0 11.54 2.29 14.53 5.47 15.59C5.87 15.66 6.02 15.42 6.02 15.21C6.02 15.02 6.01 14.39 6.01 13.72C4 14.09 3.48 13.23 3.32 12.78C3.23 12.55 2.84 11.84 2.5 11.65C2.22 11.5 1.82 11.13 2.49 11.12C3.12 11.11 3.57 11.7 3.72 11.94C4.44 13.15 5.59 12.81 6.05 12.6C6.12 12.08 6.33 11.72 6.56 11.52C4.78 11.32 2.92 10.63 2.92 7.58C2.92 6.71 3.23 5.99 3.74 5.43C3.66 5.23 3.38 4.41 3.82 3.31C3.82 3.31 4.49 3.1 6.02 4.13C6.66 3.95 7.34 3.86 8.02 3.86C8.7 3.86 9.38 3.95 10.02 4.13C11.55 3.09 12.22 3.31 12.22 3.31C12.66 4.41 12.38 5.23 12.3 5.43C12.81 5.99 13.12 6.7 13.12 7.58C13.12 10.65 11.25 11.32 9.47 11.52C9.76 11.77 10.01 12.25 10.01 13C10.01 14.08 10 14.95 10 15.21C10 15.42 10.15 15.67 10.55 15.59C13.71 14.53 16 11.53 16 8C16 3.58 12.42 0 8 0Z"
|
|
15
|
+
}));
|
|
16
|
+
}
|
|
17
|
+
export function renderGitIcon(size = 14, color = "#1296db") {
|
|
18
|
+
return React.createElement("svg", {
|
|
19
|
+
viewBox: "0 0 1024 1024",
|
|
20
|
+
width: size,
|
|
21
|
+
height: size,
|
|
22
|
+
style: { flexShrink: 0, display: "inline-block", verticalAlign: "middle" }
|
|
23
|
+
}, React.createElement("path", {
|
|
24
|
+
fill: color,
|
|
25
|
+
d: "M943.078 472.342L551.076 80.34c-21.859-21.859-57.626-21.859-79.485 0L79.589 472.342c-21.859 21.859-21.859 57.626 0 79.485l392.002 392.002c21.859 21.859 57.626 21.859 79.485 0l392.002-392.002c21.858-21.858 21.858-57.626 0-79.485z m-249.083 113.12c-37.939 0-68.693-30.755-68.693-68.693a68.532 68.532 0 0 1 4.136-23.521l-86.88-86.88v237.369c21.391 11.639 35.908 34.313 35.908 60.378 0 37.939-30.755 68.693-68.693 68.693s-68.693-30.755-68.693-68.693c0-27.314 15.944-50.903 39.03-61.973v-250.25c-23.022-10.642-39.03-33.879-39.03-60.907 0-7.808 1.401-15.272 3.853-22.243L344.061 207.871l44.159-44.159L490.738 266.23c5.58-1.503 11.418-2.378 17.473-2.378 37.076 0 67.132 30.056 67.132 67.132 0 6.055-0.875 11.893-2.378 17.473l102.241 102.241a68.68 68.68 0 0 1 18.789-2.623c37.939 0 68.693 30.755 68.693 68.693s-30.754 68.694-68.693 68.694z"
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
export function renderOctocatBadge(size = 32) {
|
|
29
|
+
return React.createElement("div", {
|
|
30
|
+
className: "dsh-octocat-badge",
|
|
31
|
+
style: {
|
|
32
|
+
width: size + "px",
|
|
33
|
+
height: size + "px",
|
|
34
|
+
borderRadius: Math.round(size * 0.25) + "px",
|
|
35
|
+
}
|
|
36
|
+
}, renderOctocat(Math.round(size * 0.58), "#ffffff"));
|
|
37
|
+
}
|
|
38
|
+
export function renderPluginBadge(hFactory) {
|
|
39
|
+
var h = hFactory;
|
|
40
|
+
return h("button", {
|
|
41
|
+
className: "dsh-github-plugin-badge",
|
|
42
|
+
type: "button",
|
|
43
|
+
title: "本界面由第三方插件 dsh-github-flow 提供(非 DSH / GitHub 官方)。点击查看关于。",
|
|
44
|
+
onClick: function (e) {
|
|
45
|
+
e.stopPropagation();
|
|
46
|
+
e.preventDefault();
|
|
47
|
+
try {
|
|
48
|
+
window.dispatchEvent(new CustomEvent("dsh-github-open-about"));
|
|
49
|
+
}
|
|
50
|
+
catch (err) { }
|
|
51
|
+
},
|
|
52
|
+
}, "插件");
|
|
53
|
+
}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 网络连接异常与离线状态醒目横幅组件
|
|
3
|
+
*/
|
|
4
|
+
export function NetworkAlertBanner(props) {
|
|
5
|
+
var isRightbar = Boolean(props.isRightbar);
|
|
6
|
+
var reason = props.networkErrorReason || "无法连接至 GitHub API 服务器(网络超时或被防火墙/代理阻断),本次未能获取最新数据。";
|
|
7
|
+
var lastSyncedAt = props.lastSyncedAt || 0;
|
|
8
|
+
var onRefresh = props.onRefresh || (() => { });
|
|
9
|
+
var onOpenProxy = props.onOpenProxy || (() => {
|
|
10
|
+
try {
|
|
11
|
+
window.dispatchEvent(new CustomEvent("dsh-github-open-proxy"));
|
|
12
|
+
}
|
|
13
|
+
catch (e) { }
|
|
14
|
+
});
|
|
15
|
+
var formatTime = function (ts) {
|
|
16
|
+
if (!ts)
|
|
17
|
+
return "未知时间";
|
|
18
|
+
var diff = Date.now() - ts;
|
|
19
|
+
var MIN = 60 * 1000, HOUR = 60 * MIN, DAY = 24 * HOUR;
|
|
20
|
+
if (diff < MIN)
|
|
21
|
+
return "刚刚";
|
|
22
|
+
if (diff < HOUR)
|
|
23
|
+
return Math.floor(diff / MIN) + " 分钟前";
|
|
24
|
+
if (diff < DAY)
|
|
25
|
+
return Math.floor(diff / HOUR) + " 小时前";
|
|
26
|
+
return new Date(ts).toLocaleDateString();
|
|
27
|
+
};
|
|
28
|
+
var h = React.createElement;
|
|
29
|
+
return h("div", {
|
|
30
|
+
className: "dsh-github-network-alert",
|
|
31
|
+
style: {
|
|
32
|
+
display: "flex",
|
|
33
|
+
flexDirection: "column",
|
|
34
|
+
gap: "6px",
|
|
35
|
+
padding: isRightbar ? "10px 12px" : "12px 16px",
|
|
36
|
+
marginBottom: "12px",
|
|
37
|
+
borderRadius: "8px",
|
|
38
|
+
background: "rgba(240, 136, 62, 0.12)",
|
|
39
|
+
border: "1px solid rgba(240, 136, 62, 0.4)",
|
|
40
|
+
fontSize: "12px",
|
|
41
|
+
color: "var(--dsw-alias-label-primary, #1f2328)",
|
|
42
|
+
},
|
|
43
|
+
}, h("div", { style: { display: "flex", alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: "6px" } }, h("div", { style: { display: "flex", alignItems: "center", gap: "6px", fontWeight: 600, color: "var(--dsw-alias-state-attention-primary, #9a6700)" } }, h("span", null, "⚠️"), h("span", null, "网络连接失败,当前展示离线历史数据")), h("div", { style: { display: "flex", alignItems: "center", gap: "6px", flexShrink: 0 } }, h("button", {
|
|
44
|
+
className: "dsh-github-btn-sm",
|
|
45
|
+
onClick: onRefresh,
|
|
46
|
+
title: "重新发起网络连接刷新",
|
|
47
|
+
style: { padding: "3px 8px", fontSize: "11px", cursor: "pointer" },
|
|
48
|
+
}, "🔄 重试刷新"), h("button", {
|
|
49
|
+
className: "dsh-github-btn-sm",
|
|
50
|
+
onClick: onOpenProxy,
|
|
51
|
+
title: "打开网络代理设置配置 HTTP/SOCKS5 代理",
|
|
52
|
+
style: { padding: "3px 8px", fontSize: "11px", cursor: "pointer" },
|
|
53
|
+
}, "⚙️ 配置代理"))), h("div", { style: { fontSize: "11px", color: "var(--dsw-alias-label-secondary, #656d76)", lineHeight: 1.4 } }, reason + (lastSyncedAt ? `(当前数据快照同步于 ${formatTime(lastSyncedAt)})` : "")));
|
|
54
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本地持久化缓存状态机与偏好配置存储管理
|
|
3
|
+
*/
|
|
4
|
+
export declare const GLOBAL_OVERVIEW_CACHE_KEY = "dsh_github_global_overview_snapshot_v1";
|
|
5
|
+
export declare const SYNC_SETTINGS_STORAGE_KEY = "dsh_github_sync_settings_v1";
|
|
6
|
+
export declare const DEFAULT_SYNC_SETTINGS: {
|
|
7
|
+
strategy: string;
|
|
8
|
+
cloudSyncIntervalMs: number;
|
|
9
|
+
localGitWatch: boolean;
|
|
10
|
+
};
|
|
11
|
+
export declare function getLocalSyncSettings(): any;
|
|
12
|
+
export declare function saveLocalSyncSettings(settings: any): void;
|
|
13
|
+
export declare function getStoredGlobalOverview(): any;
|
|
14
|
+
export declare function saveStoredGlobalOverview(data: any): void;
|
|
15
|
+
export declare function clearStoredGlobalOverview(): void;
|
|
16
|
+
export declare function getCacheStorageMeta(): {
|
|
17
|
+
exists: boolean;
|
|
18
|
+
sizeKb: number;
|
|
19
|
+
savedAt: any;
|
|
20
|
+
};
|
|
21
|
+
export declare function getRightbarStorageKey(cwd: string | null): string;
|
|
22
|
+
export declare function getStoredRightbarSnapshot(cwd: string | null): {
|
|
23
|
+
data: any;
|
|
24
|
+
savedAt: any;
|
|
25
|
+
} | null;
|
|
26
|
+
export declare function saveStoredRightbarData(cwd: string | null, data: any): void;
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 本地持久化缓存状态机与偏好配置存储管理
|
|
3
|
+
*/
|
|
4
|
+
export const GLOBAL_OVERVIEW_CACHE_KEY = "dsh_github_global_overview_snapshot_v1";
|
|
5
|
+
export const SYNC_SETTINGS_STORAGE_KEY = "dsh_github_sync_settings_v1";
|
|
6
|
+
export const DEFAULT_SYNC_SETTINGS = {
|
|
7
|
+
strategy: "swr", // 'swr' | 'auto' | 'manual'
|
|
8
|
+
cloudSyncIntervalMs: 600000, // 云端定时周期:默认 10 分钟 (600,000ms,下限 5分钟)
|
|
9
|
+
localGitWatch: true, // 本地 .git 改动实时感知 (仅右侧栏当前工作区生效,默认开启)
|
|
10
|
+
};
|
|
11
|
+
export function getLocalSyncSettings() {
|
|
12
|
+
try {
|
|
13
|
+
var raw = localStorage.getItem(SYNC_SETTINGS_STORAGE_KEY);
|
|
14
|
+
if (!raw)
|
|
15
|
+
return DEFAULT_SYNC_SETTINGS;
|
|
16
|
+
var parsed = JSON.parse(raw);
|
|
17
|
+
var merged = Object.assign({}, DEFAULT_SYNC_SETTINGS, parsed);
|
|
18
|
+
if (merged.strategy === "interval" || parsed.cloudAutoSync === true) {
|
|
19
|
+
merged.strategy = "auto";
|
|
20
|
+
saveLocalSyncSettings(merged);
|
|
21
|
+
}
|
|
22
|
+
if (typeof merged.cloudSyncIntervalMs !== "number" || merged.cloudSyncIntervalMs < 300000) {
|
|
23
|
+
merged.cloudSyncIntervalMs = 600000;
|
|
24
|
+
}
|
|
25
|
+
if (typeof parsed.localGitWatch !== "boolean") {
|
|
26
|
+
merged.localGitWatch = true;
|
|
27
|
+
}
|
|
28
|
+
return merged;
|
|
29
|
+
}
|
|
30
|
+
catch (e) {
|
|
31
|
+
return DEFAULT_SYNC_SETTINGS;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
export function saveLocalSyncSettings(settings) {
|
|
35
|
+
try {
|
|
36
|
+
localStorage.setItem(SYNC_SETTINGS_STORAGE_KEY, JSON.stringify(settings));
|
|
37
|
+
if (typeof window !== "undefined") {
|
|
38
|
+
window.dispatchEvent(new CustomEvent("dsh-github-sync-settings-change", { detail: settings }));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
catch (e) { }
|
|
42
|
+
}
|
|
43
|
+
export function getStoredGlobalOverview() {
|
|
44
|
+
try {
|
|
45
|
+
var raw = localStorage.getItem(GLOBAL_OVERVIEW_CACHE_KEY);
|
|
46
|
+
if (!raw)
|
|
47
|
+
return null;
|
|
48
|
+
var parsed = JSON.parse(raw);
|
|
49
|
+
if (!parsed || !parsed.data) {
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
if (typeof parsed.savedAt === "number") {
|
|
53
|
+
return parsed;
|
|
54
|
+
}
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
catch (e) {
|
|
58
|
+
return null;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
export function saveStoredGlobalOverview(data) {
|
|
62
|
+
if (!data || !data.auth || data.auth.networkError) {
|
|
63
|
+
return;
|
|
64
|
+
}
|
|
65
|
+
try {
|
|
66
|
+
localStorage.setItem(GLOBAL_OVERVIEW_CACHE_KEY, JSON.stringify({
|
|
67
|
+
data: data,
|
|
68
|
+
savedAt: Date.now(),
|
|
69
|
+
}));
|
|
70
|
+
}
|
|
71
|
+
catch (e) { }
|
|
72
|
+
}
|
|
73
|
+
export function clearStoredGlobalOverview() {
|
|
74
|
+
try {
|
|
75
|
+
localStorage.removeItem(GLOBAL_OVERVIEW_CACHE_KEY);
|
|
76
|
+
if (typeof localStorage !== "undefined") {
|
|
77
|
+
for (var i = localStorage.length - 1; i >= 0; i--) {
|
|
78
|
+
var k = localStorage.key(i);
|
|
79
|
+
if (k && k.indexOf("dsh_github_rightbar_snapshot_") === 0) {
|
|
80
|
+
localStorage.removeItem(k);
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
if (typeof window !== "undefined") {
|
|
85
|
+
window.dispatchEvent(new CustomEvent("dsh-github-cache-cleared"));
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
catch (e) { }
|
|
89
|
+
}
|
|
90
|
+
export function getCacheStorageMeta() {
|
|
91
|
+
try {
|
|
92
|
+
var raw = localStorage.getItem(GLOBAL_OVERVIEW_CACHE_KEY);
|
|
93
|
+
if (!raw)
|
|
94
|
+
return { exists: false, sizeKb: 0, savedAt: 0 };
|
|
95
|
+
var parsed = JSON.parse(raw);
|
|
96
|
+
var sizeKb = Math.round((raw.length * 2) / 1024 * 10) / 10;
|
|
97
|
+
return { exists: true, sizeKb: sizeKb, savedAt: parsed?.savedAt || 0 };
|
|
98
|
+
}
|
|
99
|
+
catch (e) {
|
|
100
|
+
return { exists: false, sizeKb: 0, savedAt: 0 };
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
export function getRightbarStorageKey(cwd) {
|
|
104
|
+
var safe = (cwd || "default").replace(/[^a-zA-Z0-9_-]/g, "_");
|
|
105
|
+
return "dsh_github_rightbar_snapshot_" + safe;
|
|
106
|
+
}
|
|
107
|
+
export function getStoredRightbarSnapshot(cwd) {
|
|
108
|
+
try {
|
|
109
|
+
var key = getRightbarStorageKey(cwd);
|
|
110
|
+
var raw = localStorage.getItem(key);
|
|
111
|
+
if (!raw)
|
|
112
|
+
return null;
|
|
113
|
+
var parsed = JSON.parse(raw);
|
|
114
|
+
if (!parsed || !parsed.data) {
|
|
115
|
+
return null;
|
|
116
|
+
}
|
|
117
|
+
return { data: parsed.data, savedAt: typeof parsed.savedAt === "number" ? parsed.savedAt : 0 };
|
|
118
|
+
}
|
|
119
|
+
catch (e) {
|
|
120
|
+
return null;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
export function saveStoredRightbarData(cwd, data) {
|
|
124
|
+
if (!data || !data.auth || data.auth.networkError)
|
|
125
|
+
return;
|
|
126
|
+
try {
|
|
127
|
+
var key = getRightbarStorageKey(cwd);
|
|
128
|
+
localStorage.setItem(key, JSON.stringify({
|
|
129
|
+
data: data,
|
|
130
|
+
savedAt: Date.now(),
|
|
131
|
+
}));
|
|
132
|
+
}
|
|
133
|
+
catch (e) { }
|
|
134
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DSH GitHub Flow - 主题自适应样式系统 (Light / Dark 动态联动)
|
|
3
|
+
* 遵循 DSH 原生 DSW (DeepSeek Web) 设计语言规范
|
|
4
|
+
*/
|
|
5
|
+
export declare const GITHUB_PANEL_CSS = "\n/* 1. \u4FA7\u8FB9\u680F\u56FE\u6807\u4E0E\u5916\u58F3 */\n.dsh-github-icon {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 100%;\n height: 100%;\n cursor: pointer;\n color: var(--dsw-alias-label-secondary, #656d76);\n transition: color 0.15s ease;\n}\n.dsh-github-icon:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.dsh-github-icon-inner {\n display: flex;\n align-items: center;\n justify-content: center;\n width: 28px;\n height: 28px;\n border-radius: 7px;\n background: transparent;\n color: inherit;\n border: 1px solid transparent;\n transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);\n}\n.dsh-github-icon-inner.active {\n background: var(--dsw-alias-bg-module-platform, rgba(9, 105, 218, 0.08));\n color: var(--dsw-alias-link, #0969da);\n border-color: var(--dsw-alias-border-l2, rgba(9, 105, 218, 0.2));\n}\n\nbody[data-ds-dark-theme] .dsh-github-icon {\n color: var(--dsw-alias-label-secondary, #9ca3af);\n}\nbody[data-ds-dark-theme] .dsh-github-icon:hover {\n color: var(--dsw-alias-label-primary, #ffffff);\n}\nbody[data-ds-dark-theme] .dsh-github-icon-inner.active {\n background: linear-gradient(135deg, rgba(46, 160, 67, 0.3) 0%, rgba(31, 111, 235, 0.45) 100%);\n color: #ffffff;\n box-shadow: 0 0 12px rgba(31, 111, 235, 0.4);\n border-color: rgba(88, 166, 255, 0.45);\n}\n\n/* 2. Octocat \u79D1\u6280\u52CB\u7AE0 Badge */\n.dsh-octocat-badge {\n display: flex;\n align-items: center;\n justify-content: center;\n background: linear-gradient(135deg, #1f6feb 0%, #0969da 60%, #8957e5 100%);\n box-shadow: 0 2px 6px rgba(9, 105, 218, 0.25);\n flex-shrink: 0;\n}\nbody[data-ds-dark-theme] .dsh-octocat-badge {\n background: linear-gradient(135deg, #2ea043 0%, #1f6feb 60%, #8957e5 100%);\n box-shadow: 0 2px 8px rgba(31, 111, 235, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.25);\n}\n\n/* 3. \u5BB9\u5668\u89C6\u56FE\uFF08\u4E3B\u9762\u677F\u4E0E\u53F3\u4FA7\u62BD\u5C49\u680F\uFF09 */\n.dsh-github-panel {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 24px 32px;\n box-sizing: border-box;\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n}\n\n.dsh-github-rightbar-container {\n display: flex;\n flex-direction: column;\n width: 100%;\n height: 100%;\n overflow-y: auto;\n padding: 16px 18px;\n box-sizing: border-box;\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n}\n\nbody[data-ds-dark-theme] .dsh-github-panel,\nbody[data-ds-dark-theme] .dsh-github-rightbar-container {\n background: var(--dsw-alias-bg-base, #151517);\n color: var(--dsw-alias-label-primary, #ececec);\n}\n\n/* 4. \u5934\u90E8\u533A\u57DF */\n.dsh-github-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 20px;\n padding-bottom: 12px;\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n}\nbody[data-ds-dark-theme] .dsh-github-header {\n border-bottom-color: var(--dsw-alias-border-l1, #2c2c2e);\n}\n.dsh-github-title {\n display: flex;\n align-items: center;\n gap: 10px;\n}\n.dsh-github-title h2 {\n margin: 0;\n font-size: 18px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-title h2 {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n\n/* 5. \u5237\u65B0\u6309\u94AE */\n.dsh-github-refresh-btn {\n display: inline-flex;\n align-items: center;\n gap: 6px;\n padding: 5px 12px;\n font-size: 12px;\n font-weight: 500;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n background: var(--dsw-alias-bg-module-platform, #f6f8fa);\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-refresh-btn:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef2);\n border-color: var(--dsw-alias-border-l3, #d0d7de);\n}\n.dsh-github-refresh-btn:disabled {\n opacity: 0.6;\n cursor: not-allowed;\n}\nbody[data-ds-dark-theme] .dsh-github-refresh-btn {\n border-color: var(--dsw-alias-border-l1, #38383c);\n background: var(--dsw-alias-bg-layer-2, #242528);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\nbody[data-ds-dark-theme] .dsh-github-refresh-btn:hover:not(:disabled) {\n background: var(--dsw-alias-interactive-bg-hover, #2f3034);\n border-color: rgba(255, 255, 255, 0.25);\n}\n\n/* 6. \u6982\u89C8\u5361\u7247\u4E0E\u7F51\u683C */\n.dsh-github-overview-cards {\n display: grid;\n grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));\n gap: 14px;\n margin-bottom: 20px;\n}\n.dsh-github-card {\n padding: 14px 16px;\n border-radius: 8px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n background: var(--dsw-alias-bg-layer-1, #fcfcfd);\n box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);\n margin-bottom: 12px;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\nbody[data-ds-dark-theme] .dsh-github-card {\n border-color: var(--dsw-alias-border-l1, #303034);\n background: var(--dsw-alias-bg-layer-2, #212124);\n box-shadow: none;\n}\n.dsh-github-card-title {\n font-size: 11px;\n text-transform: uppercase;\n letter-spacing: 0.5px;\n color: var(--dsw-alias-label-tertiary, #656d76);\n margin-bottom: 6px;\n font-weight: 500;\n}\nbody[data-ds-dark-theme] .dsh-github-card-title {\n color: var(--dsw-alias-label-tertiary, #888);\n}\n.dsh-github-card-value {\n font-size: 15px;\n font-weight: 600;\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-card-value {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n.dsh-github-card-desc {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #656d76);\n margin-top: 4px;\n line-height: 1.4;\n}\nbody[data-ds-dark-theme] .dsh-github-card-desc {\n color: var(--dsw-alias-label-secondary, #bbb);\n}\n.dsh-github-card-subtext {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary, #8c959f);\n margin-top: 6px;\n}\nbody[data-ds-dark-theme] .dsh-github-card-subtext {\n color: var(--dsw-alias-label-tertiary, #888);\n}\n\n/* 7. \u5FBD\u7AE0\uFF08Badges\uFF09 */\n.dsh-github-badge {\n display: inline-flex;\n align-items: center;\n font-size: 11px;\n padding: 2px 8px;\n border-radius: 12px;\n font-weight: 500;\n line-height: 16px;\n}\n.dsh-badge-green {\n background: rgba(46, 160, 67, 0.12);\n color: #1a7f37;\n border: 1px solid rgba(46, 160, 67, 0.2);\n}\n.dsh-badge-red {\n background: rgba(207, 34, 46, 0.12);\n color: #cf222e;\n border: 1px solid rgba(207, 34, 46, 0.2);\n}\n.dsh-badge-yellow {\n background: rgba(154, 103, 0, 0.12);\n color: #9a6700;\n border: 1px solid rgba(154, 103, 0, 0.2);\n}\n.dsh-badge-blue {\n background: rgba(9, 105, 218, 0.12);\n color: #0969da;\n border: 1px solid rgba(9, 105, 218, 0.2);\n}\n.dsh-badge-purple {\n background: rgba(137, 87, 229, 0.12);\n color: #8250df;\n border: 1px solid rgba(137, 87, 229, 0.2);\n}\nbody[data-ds-dark-theme] .dsh-badge-green {\n background: rgba(46, 160, 67, 0.22);\n color: #3fb950;\n border-color: rgba(46, 160, 67, 0.3);\n}\nbody[data-ds-dark-theme] .dsh-badge-red {\n background: rgba(248, 81, 73, 0.22);\n color: #f85149;\n border-color: rgba(248, 81, 73, 0.3);\n}\nbody[data-ds-dark-theme] .dsh-badge-yellow {\n background: rgba(210, 153, 34, 0.22);\n color: #d29922;\n border-color: rgba(210, 153, 34, 0.3);\n}\nbody[data-ds-dark-theme] .dsh-badge-blue {\n background: rgba(56, 139, 253, 0.22);\n color: #58a6ff;\n border-color: rgba(56, 139, 253, 0.3);\n}\nbody[data-ds-dark-theme] .dsh-badge-purple {\n background: rgba(163, 113, 247, 0.22);\n color: #bc8cff;\n border-color: rgba(163, 113, 247, 0.3);\n}\n\n/* \u63D2\u4EF6\u8EAB\u4EFD\u5FBD\u6807\uFF1A\u6807\u8BC6\u754C\u9762\u7531\u7B2C\u4E09\u65B9\u63D2\u4EF6 dsh-github-flow \u63D0\u4F9B\uFF08\u975E DSH/GitHub \u5B98\u65B9\uFF09 */\n.dsh-github-plugin-badge {\n display: inline-flex;\n align-items: center;\n font-size: 10px;\n font-weight: 500;\n padding: 1px 7px;\n border-radius: 10px;\n line-height: 14px;\n vertical-align: middle;\n margin-left: 8px;\n text-decoration: none !important;\n background: rgba(125, 133, 144, 0.12);\n color: #656d76;\n border: 1px solid rgba(125, 133, 144, 0.25);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-plugin-badge:hover {\n background: rgba(125, 133, 144, 0.2);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-plugin-badge {\n background: rgba(139, 148, 158, 0.18);\n color: #8b949e;\n border-color: rgba(139, 148, 158, 0.3);\n}\nbody[data-ds-dark-theme] .dsh-github-plugin-badge:hover {\n background: rgba(139, 148, 158, 0.28);\n color: #f0f6fc;\n}\n\n/* 7.5. \u5206\u7C7B\u7B5B\u9009\u836F\u4E38\u680F */\n.dsh-github-pills {\n display: flex;\n align-items: center;\n gap: 6px;\n flex-wrap: wrap;\n margin-bottom: 12px;\n}\n.dsh-github-pill-btn {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 4px 10px;\n border-radius: 14px;\n font-size: 11px;\n font-weight: 500;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-module-platform, #f6f8fa);\n color: var(--dsw-alias-label-secondary, #656d76);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-pill-btn:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n border-color: var(--dsw-alias-border-l3, #b0b8c1);\n}\n.dsh-github-pill-btn.active {\n background: var(--dsw-alias-bg-module-platform, rgba(9, 105, 218, 0.1));\n color: var(--dsw-alias-link, #0969da);\n border-color: var(--dsw-alias-link, #0969da);\n font-weight: 600;\n}\nbody[data-ds-dark-theme] .dsh-github-pill-btn {\n background: var(--dsw-alias-bg-layer-2, #21262d);\n color: var(--dsw-alias-label-secondary, #8b949e);\n border-color: var(--dsw-alias-border-l1, #30363d);\n}\nbody[data-ds-dark-theme] .dsh-github-pill-btn:hover {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n border-color: #8b949e;\n}\nbody[data-ds-dark-theme] .dsh-github-pill-btn.active {\n background: rgba(56, 139, 253, 0.18);\n color: #58a6ff;\n border-color: #58a6ff;\n}\n\n/* 8. \u5FEB\u6377\u64CD\u4F5C\u7F51\u683C */\n.dsh-github-quick-actions {\n display: grid;\n grid-template-columns: 1fr 1fr;\n gap: 8px;\n margin-bottom: 16px;\n}\n.dsh-github-action-btn {\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 6px;\n padding: 8px 10px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n background: var(--dsw-alias-bg-module-platform, #f6f8fa);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-action-btn:hover {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef2);\n border-color: var(--dsw-alias-link, #0969da);\n color: var(--dsw-alias-link, #0969da);\n}\nbody[data-ds-dark-theme] .dsh-github-action-btn {\n border-color: var(--dsw-alias-border-l1, #444);\n background: var(--dsw-alias-bg-layer-2, #28282b);\n color: var(--dsw-alias-label-primary, #fff);\n}\nbody[data-ds-dark-theme] .dsh-github-action-btn:hover {\n background: var(--dsw-alias-interactive-bg-hover, #343438);\n border-color: #58a6ff;\n color: #58a6ff;\n}\n\n/* \u7EC4\u5408\u5F0F\u5FEB\u6377\u64CD\u4F5C\u6309\u94AE (AI \u667A\u80FD\u88C5\u586B\u4E3B\u64CD\u4F5C + \u5B98\u65B9\u5916\u94FE\u76F4\u8FBE) */\n.dsh-github-split-btn {\n display: flex;\n align-items: stretch;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n background: var(--dsw-alias-bg-module-platform, #f6f8fa);\n overflow: hidden;\n transition: all 0.15s ease;\n}\n.dsh-github-split-btn:hover {\n border-color: var(--dsw-alias-link, #0969da);\n}\nbody[data-ds-dark-theme] .dsh-github-split-btn {\n border-color: var(--dsw-alias-border-l1, #444);\n background: var(--dsw-alias-bg-layer-2, #28282b);\n}\nbody[data-ds-dark-theme] .dsh-github-split-btn:hover {\n border-color: #58a6ff;\n}\n.dsh-github-split-main {\n flex: 1;\n display: flex;\n align-items: center;\n justify-content: center;\n gap: 5px;\n padding: 8px 8px;\n border: 0;\n background: transparent;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 12px;\n font-weight: 500;\n cursor: pointer;\n transition: all 0.15s ease;\n white-space: nowrap;\n}\n.dsh-github-split-main:hover {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef2);\n color: var(--dsw-alias-link, #0969da);\n}\nbody[data-ds-dark-theme] .dsh-github-split-main {\n color: var(--dsw-alias-label-primary, #fff);\n}\nbody[data-ds-dark-theme] .dsh-github-split-main:hover {\n background: var(--dsw-alias-interactive-bg-hover, #343438);\n color: #58a6ff;\n}\n.dsh-github-split-link {\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 0 8px;\n border-left: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n background: transparent;\n color: var(--dsw-alias-label-tertiary, #656d76);\n font-size: 12px;\n font-weight: bold;\n text-decoration: none !important;\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-split-link:hover {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef2);\n color: var(--dsw-alias-link, #0969da);\n}\nbody[data-ds-dark-theme] .dsh-github-split-link {\n border-left-color: var(--dsw-alias-border-l1, #444);\n color: var(--dsw-alias-label-secondary, #9ca3af);\n}\nbody[data-ds-dark-theme] .dsh-github-split-link:hover {\n background: var(--dsw-alias-interactive-bg-hover, #343438);\n color: #58a6ff;\n}\n\n/* 9. \u6A21\u5757\u5206\u533A\u4E0E\u5217\u8868 */\n.dsh-github-section {\n margin-bottom: 20px;\n}\n.dsh-github-section-header {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n.dsh-github-section-header h3 {\n margin: 0;\n font-size: 13px;\n font-weight: 600;\n color: var(--dsw-alias-label-secondary, #656d76);\n}\nbody[data-ds-dark-theme] .dsh-github-section-header h3 {\n color: var(--dsw-alias-label-secondary, #ccc);\n}\n.dsh-github-list {\n display: flex;\n flex-direction: column;\n gap: 8px;\n}\n.dsh-github-item {\n display: flex;\n flex-direction: column;\n gap: 4px;\n padding: 10px 14px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n background: var(--dsw-alias-bg-layer-1, #fcfcfd);\n transition: border-color 0.15s ease, background 0.15s ease;\n}\n.dsh-github-item:hover {\n border-color: var(--dsw-alias-border-l3, #d0d7de);\n background: var(--dsw-alias-interactive-bg-hover, #f6f8fa);\n}\nbody[data-ds-dark-theme] .dsh-github-item {\n border-color: var(--dsw-alias-border-l1, #333336);\n background: var(--dsw-alias-bg-layer-2, #252528);\n}\nbody[data-ds-dark-theme] .dsh-github-item:hover {\n border-color: var(--dsw-alias-border-l2, #555);\n background: var(--dsw-alias-interactive-bg-hover, #2c2c30);\n}\n.dsh-github-item-title {\n font-size: 13px;\n font-weight: 500;\n color: var(--dsw-alias-label-primary, #1f2328);\n text-decoration: none;\n transition: color 0.15s ease;\n}\n.dsh-github-item-title:hover {\n color: var(--dsw-alias-link, #0969da);\n text-decoration: underline;\n}\nbody[data-ds-dark-theme] .dsh-github-item-title {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\nbody[data-ds-dark-theme] .dsh-github-item-title:hover {\n color: #58a6ff;\n}\n.dsh-github-item-desc {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #656d76);\n line-height: 1.4;\n}\nbody[data-ds-dark-theme] .dsh-github-item-desc {\n color: var(--dsw-alias-label-secondary, #bbb);\n}\n.dsh-github-item-meta {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary, #656d76);\n display: flex;\n align-items: center;\n flex-wrap: wrap;\n gap: 8px;\n}\nbody[data-ds-dark-theme] .dsh-github-item-meta {\n color: var(--dsw-alias-label-secondary, #8c8c8c);\n}\n\n/* 10. \u5C0F\u6309\u94AE\u6837\u5F0F\uFF08\u5728 GitHub \u6253\u5F00\u7B49\uFF09 */\n.dsh-github-btn-sm {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n font-size: 12px;\n font-weight: 500;\n padding: 4px 10px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-module-platform, #f6f8fa);\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n text-decoration: none !important;\n transition: all 0.15s ease;\n}\n.dsh-github-btn-sm:hover {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef2);\n border-color: var(--dsw-alias-border-l3, #b0b8c1);\n color: var(--dsw-alias-link, #0969da);\n}\nbody[data-ds-dark-theme] .dsh-github-btn-sm {\n border-color: var(--dsw-alias-border-l1, #444);\n background: var(--dsw-alias-bg-layer-2, #26272b);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\nbody[data-ds-dark-theme] .dsh-github-btn-sm:hover {\n background: var(--dsw-alias-interactive-bg-hover, #33343a);\n border-color: rgba(255, 255, 255, 0.25);\n color: #58a6ff;\n}\n\n/* 11. \u7A7A\u72B6\u6001 */\n.dsh-github-empty {\n padding: 24px;\n text-align: center;\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #656d76);\n border: 1px dashed var(--dsw-alias-border-l2, #d0d7de);\n border-radius: 8px;\n background: rgba(0, 0, 0, 0.01);\n}\nbody[data-ds-dark-theme] .dsh-github-empty {\n color: var(--dsw-alias-label-tertiary, #888);\n border-color: var(--dsw-alias-border-l1, #38383c);\n background: rgba(255, 255, 255, 0.01);\n}\n\n/* 12. Tabs \u5BFC\u822A\u680F */\n.dsh-github-tabs {\n display: flex;\n gap: 8px;\n margin-bottom: 18px;\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e5e7eb);\n padding-bottom: 8px;\n}\nbody[data-ds-dark-theme] .dsh-github-tabs {\n border-bottom-color: var(--dsw-alias-border-l1, #303034);\n}\n.dsh-github-tab-btn {\n padding: 6px 14px;\n border-radius: 6px;\n font-size: 13px;\n font-weight: 500;\n border: 0;\n background: transparent;\n color: var(--dsw-alias-label-secondary, #656d76);\n cursor: pointer;\n transition: all 0.15s ease;\n}\n.dsh-github-tab-btn:hover {\n color: var(--dsw-alias-label-primary, #1f2328);\n background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.05));\n}\n.dsh-github-tab-btn.active {\n color: var(--dsw-alias-link, #0969da);\n background: rgba(9, 105, 218, 0.1);\n font-weight: 600;\n}\nbody[data-ds-dark-theme] .dsh-github-tab-btn {\n color: var(--dsw-alias-label-secondary, #8c8c8c);\n}\nbody[data-ds-dark-theme] .dsh-github-tab-btn:hover {\n color: var(--dsw-alias-label-primary, #fff);\n background: var(--dsw-alias-interactive-bg-hover, rgba(255, 255, 255, 0.06));\n}\nbody[data-ds-dark-theme] .dsh-github-tab-btn.active {\n color: #58a6ff;\n background: rgba(88, 166, 255, 0.15);\n}\n\n/* 13. \u641C\u7D22\u8F93\u5165\u6846 */\n.dsh-github-search-input {\n width: 100%;\n max-width: 320px;\n padding: 6px 12px;\n font-size: 12px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n outline: none;\n margin-bottom: 14px;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.dsh-github-search-input:focus {\n border-color: var(--dsw-alias-link, #0969da);\n box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);\n}\nbody[data-ds-dark-theme] .dsh-github-search-input {\n border-color: var(--dsw-alias-border-l1, #444);\n background: var(--dsw-alias-bg-layer-2, #212124);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\nbody[data-ds-dark-theme] .dsh-github-search-input:focus {\n border-color: #58a6ff;\n box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);\n}\n\n/* 14. \u5DE5\u4F5C\u533A\u77E9\u9635\u6761\u76EE\u4E13\u5C5E\u7C7B */\n.dsh-github-workspace-card {\n display: flex;\n align-items: center;\n justify-content: space-between;\n margin-bottom: 8px;\n}\n.dsh-github-ws-title {\n font-size: 14px;\n font-weight: 600;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-ws-title {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n.dsh-github-ws-path {\n font-size: 12px;\n color: var(--dsw-alias-label-tertiary, #656d76);\n font-family: var(--ds-font-family-code, monospace);\n}\nbody[data-ds-dark-theme] .dsh-github-ws-path {\n color: var(--dsw-alias-label-tertiary, #888);\n}\n.dsh-github-ws-repo-link {\n color: var(--dsw-alias-link, #0969da);\n display: inline-flex;\n align-items: center;\n gap: 5px;\n font-weight: 500;\n}\nbody[data-ds-dark-theme] .dsh-github-ws-repo-link {\n color: #58a6ff;\n}\n.dsh-github-repo-link {\n color: var(--dsw-alias-link, #0969da);\n text-decoration: none;\n font-weight: 600;\n}\n.dsh-github-repo-link:hover {\n text-decoration: underline;\n}\nbody[data-ds-dark-theme] .dsh-github-repo-link {\n color: #58a6ff;\n}\n.dsh-github-subheading {\n font-size: 14px;\n font-weight: 600;\n margin: 0 0 10px 0;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-subheading {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n\n/* 15. \u5C31\u7EEA\u5F15\u5BFC\u6A2A\u5E45 (Setup Guide Banner) */\n.dsh-github-guide-card {\n padding: 16px;\n border-radius: 8px;\n margin-bottom: 16px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n}\n.dsh-github-guide-card.warning {\n border-color: rgba(210, 153, 34, 0.4);\n background: rgba(210, 153, 34, 0.08);\n}\n.dsh-github-guide-card.danger {\n border-color: rgba(248, 81, 73, 0.4);\n background: rgba(248, 81, 73, 0.08);\n}\n.dsh-github-guide-header {\n display: flex;\n align-items: center;\n gap: 8px;\n font-size: 15px;\n font-weight: 600;\n margin-bottom: 6px;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-guide-header {\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n.dsh-github-guide-desc {\n font-size: 13px;\n color: var(--dsw-alias-label-secondary, #656d76);\n line-height: 1.5;\n margin-bottom: 12px;\n}\nbody[data-ds-dark-theme] .dsh-github-guide-desc {\n color: var(--dsw-alias-label-secondary, #8c8c8c);\n}\n.dsh-github-cmd-box {\n display: flex;\n align-items: center;\n justify-content: space-between;\n background: var(--dsw-alias-bg-base, #ffffff);\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n border-radius: 6px;\n padding: 8px 12px;\n font-family: var(--ds-font-family-code, monospace);\n font-size: 13px;\n color: var(--dsw-alias-label-primary, #1f2328);\n margin-bottom: 12px;\n}\nbody[data-ds-dark-theme] .dsh-github-cmd-box {\n background: var(--dsw-alias-bg-layer-2, #161b22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\n.dsh-github-copy-btn {\n padding: 4px 10px;\n font-size: 12px;\n border-radius: 4px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n color: var(--dsw-alias-label-primary, #1f2328);\n cursor: pointer;\n white-space: nowrap;\n transition: all 0.15s ease;\n}\nbody[data-ds-dark-theme] .dsh-github-copy-btn {\n background: var(--dsw-alias-bg-layer-2, #21262d);\n border-color: var(--dsw-alias-border-l1, #30363d);\n color: var(--dsw-alias-label-primary, #c9d1d9);\n}\n.dsh-github-copy-btn:hover {\n background: var(--dsw-alias-interactive-bg-hover, #ebeef1);\n}\nbody[data-ds-dark-theme] .dsh-github-copy-btn:hover {\n background: #30363d;\n}\n.dsh-github-copy-btn.copied {\n color: #2da44e !important;\n border-color: #2da44e !important;\n background: rgba(45, 164, 78, 0.15) !important;\n}\n.dsh-github-steps-list {\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #656d76);\n line-height: 1.6;\n margin: 0 0 12px 18px;\n padding: 0;\n}\nbody[data-ds-dark-theme] .dsh-github-steps-list {\n color: var(--dsw-alias-label-secondary, #8c8c8c);\n}\n.dsh-github-guide-actions {\n display: flex;\n gap: 8px;\n flex-wrap: wrap;\n}\n.dsh-github-guide-tip {\n font-size: 11px;\n color: var(--dsw-alias-label-tertiary, #8c8c8c);\n margin-top: 10px;\n line-height: 1.4;\n}\n\n/* 16. \u8BBE\u7F6E\u5F39\u7A97 (Settings Modal)\uFF1A\u5DE6\u4FA7\u5206\u533A\u5BFC\u822A + \u53F3\u4FA7\u5185\u5BB9\u533A */\n.dsh-github-modal-overlay {\n position: fixed;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n background: rgba(0, 0, 0, 0.45);\n display: flex;\n align-items: center;\n justify-content: center;\n z-index: 99999;\n backdrop-filter: blur(2px);\n}\n.dsh-github-modal-dialog {\n width: 92%;\n max-width: 640px;\n max-height: 86vh;\n display: flex;\n flex-direction: column;\n background: var(--dsw-alias-bg-base, #ffffff);\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n border-radius: 12px;\n box-shadow: 0 16px 32px rgba(0, 0, 0, 0.18);\n padding: 0;\n box-sizing: border-box;\n overflow: hidden;\n color: var(--dsw-alias-label-primary, #1f2328);\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n}\nbody[data-ds-dark-theme] .dsh-github-modal-dialog {\n background: var(--dsw-alias-bg-layer-2, #1e1e22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n box-shadow: 0 16px 36px rgba(0, 0, 0, 0.45);\n}\n.dsh-github-modal-header {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: 18px 22px 14px;\n border-bottom: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n flex-shrink: 0;\n}\nbody[data-ds-dark-theme] .dsh-github-modal-header {\n border-bottom-color: var(--dsw-alias-border-l1, #30363d);\n}\n.dsh-github-modal-body {\n display: flex;\n min-height: 0;\n flex: 1;\n}\n.dsh-github-settings-nav {\n flex-shrink: 0;\n width: 148px;\n padding: 14px 10px;\n border-right: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n display: flex;\n flex-direction: column;\n gap: 4px;\n box-sizing: border-box;\n}\nbody[data-ds-dark-theme] .dsh-github-settings-nav {\n border-right-color: var(--dsw-alias-border-l1, #30363d);\n}\n.dsh-github-settings-nav-item {\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 8px 10px;\n border-radius: 6px;\n border: none;\n background: none;\n cursor: pointer;\n font-size: 13px;\n text-align: left;\n color: var(--dsw-alias-label-secondary, #656d76);\n transition: background 0.12s ease, color 0.12s ease;\n}\n.dsh-github-settings-nav-item:hover {\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n color: var(--dsw-alias-label-primary, #1f2328);\n}\n.dsh-github-settings-nav-item.active {\n background: rgba(9, 105, 218, 0.1);\n color: var(--dsw-alias-link, #0969da);\n font-weight: 600;\n}\nbody[data-ds-dark-theme] .dsh-github-settings-nav-item:hover {\n background: rgba(240, 246, 252, 0.06);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n}\nbody[data-ds-dark-theme] .dsh-github-settings-nav-item.active {\n background: rgba(88, 166, 255, 0.15);\n color: #58a6ff;\n}\n.dsh-github-settings-content {\n flex: 1;\n min-width: 0;\n padding: 18px 22px 20px;\n overflow-y: auto;\n box-sizing: border-box;\n}\n@media (max-width: 560px) {\n .dsh-github-modal-body {\n flex-direction: column;\n }\n .dsh-github-settings-nav {\n width: 100%;\n flex-direction: row;\n border-right: none;\n border-bottom: 1px solid var(--dsw-alias-border-l2, #d0d7e0);\n overflow-x: auto;\n }\n body[data-ds-dark-theme] .dsh-github-settings-nav {\n border-bottom-color: var(--dsw-alias-border-l1, #30363d);\n }\n .dsh-github-settings-nav-item {\n white-space: nowrap;\n }\n}\n.dsh-github-modal-footer {\n display: flex;\n justify-content: flex-end;\n gap: 8px;\n padding: 14px 22px;\n border-top: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n flex-shrink: 0;\n}\nbody[data-ds-dark-theme] .dsh-github-modal-footer {\n border-top-color: var(--dsw-alias-border-l1, #30363d);\n}\n.dsh-github-radio-card {\n display: flex;\n align-items: flex-start;\n gap: 10px;\n padding: 10px 12px;\n border-radius: 8px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n margin-bottom: 8px;\n cursor: pointer;\n transition: all 0.15s ease;\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n}\n.dsh-github-radio-card:hover {\n border-color: var(--dsw-alias-link, #0969da);\n}\n.dsh-github-radio-card.active {\n border-color: var(--dsw-alias-link, #0969da);\n background: rgba(9, 105, 218, 0.08);\n}\nbody[data-ds-dark-theme] .dsh-github-radio-card {\n background: var(--dsw-alias-bg-base, #161b22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n}\nbody[data-ds-dark-theme] .dsh-github-radio-card.active {\n border-color: #58a6ff;\n background: rgba(88, 166, 255, 0.12);\n}\n\n.dsh-github-select {\n width: 100%;\n padding: 8px 12px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 13px;\n outline: none;\n cursor: pointer;\n box-sizing: border-box;\n color-scheme: light;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.dsh-github-select:focus {\n border-color: var(--dsw-alias-link, #0969da);\n box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);\n}\n.dsh-github-select option {\n background-color: #ffffff;\n color: #1f2328;\n padding: 6px 10px;\n}\nbody[data-ds-dark-theme] .dsh-github-select {\n border-color: var(--dsw-alias-border-l1, #30363d);\n background: var(--dsw-alias-bg-layer-2, #1e1e22);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n color-scheme: dark;\n}\nbody[data-ds-dark-theme] .dsh-github-select:focus {\n border-color: #58a6ff;\n box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);\n}\nbody[data-ds-dark-theme] .dsh-github-select option {\n background-color: #1e1e22;\n color: #f0f6fc;\n}\n\n.dsh-github-input {\n padding: 7px 12px;\n border-radius: 6px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n font-size: 13px;\n outline: none;\n box-sizing: border-box;\n color-scheme: light;\n transition: border-color 0.15s ease, box-shadow 0.15s ease;\n}\n.dsh-github-input:focus {\n border-color: var(--dsw-alias-link, #0969da);\n box-shadow: 0 0 0 3px rgba(9, 105, 218, 0.15);\n}\n.dsh-github-input::placeholder {\n color: var(--dsw-alias-label-tertiary, #8c959f);\n}\nbody[data-ds-dark-theme] .dsh-github-input {\n border-color: var(--dsw-alias-border-l1, #30363d);\n background: var(--dsw-alias-bg-layer-2, #1e1e22);\n color: var(--dsw-alias-label-primary, #f0f6fc);\n color-scheme: dark;\n}\nbody[data-ds-dark-theme] .dsh-github-input:focus {\n border-color: #58a6ff;\n box-shadow: 0 0 0 3px rgba(88, 166, 255, 0.2);\n}\n\n.dsh-github-cache-info-box {\n padding: 10px 12px;\n border-radius: 6px;\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n margin-bottom: 20px;\n font-size: 12px;\n color: var(--dsw-alias-label-secondary, #656d76);\n transition: all 0.15s ease;\n}\nbody[data-ds-dark-theme] .dsh-github-cache-info-box {\n background: var(--dsw-alias-bg-base, #161b22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n color: var(--dsw-alias-label-secondary, #8c8c8c);\n}\n\n.dsh-github-about-star-box {\n padding: 12px 14px;\n border-radius: 8px;\n background: var(--dsw-alias-bg-layer-1, #f6f8fa);\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n}\nbody[data-ds-dark-theme] .dsh-github-about-star-box {\n background: var(--dsw-alias-bg-base, #161b22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n}\n\n.dsh-github-primary-btn {\n padding: 5px 14px;\n font-weight: 600;\n white-space: nowrap;\n background: var(--dsw-alias-link, #0969da);\n border-color: var(--dsw-alias-link, #0969da);\n color: #ffffff;\n}\n.dsh-github-primary-btn:hover {\n background: var(--dsw-alias-link, #0969da);\n border-color: var(--dsw-alias-link, #0969da);\n color: #ffffff;\n opacity: 0.88;\n}\nbody[data-ds-dark-theme] .dsh-github-primary-btn {\n background: #58a6ff;\n border-color: #58a6ff;\n color: #0d1117;\n}\nbody[data-ds-dark-theme] .dsh-github-primary-btn:hover {\n background: #58a6ff;\n border-color: #58a6ff;\n color: #0d1117;\n opacity: 0.88;\n}\n\n.dsh-github-radio {\n accent-color: var(--dsw-alias-link, #0969da);\n cursor: pointer;\n margin-top: 3px;\n}\nbody[data-ds-dark-theme] .dsh-github-radio {\n accent-color: #58a6ff;\n}\n\n#dsh-github-commit-dialog {\n max-width: 600px;\n width: calc(100vw - 48px);\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n border-radius: 12px;\n padding: 0;\n box-sizing: border-box;\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);\n font-family: var(--dsw-font-family, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, sans-serif);\n}\n#dsh-github-commit-dialog::backdrop {\n background: rgba(0, 0, 0, 0.45);\n backdrop-filter: blur(2px);\n}\nbody[data-ds-dark-theme] #dsh-github-commit-dialog {\n background: var(--dsw-alias-bg-layer-2, #1e1e22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n color: var(--dsw-alias-label-primary, #ececec);\n box-shadow: 0 16px 36px rgba(0, 0, 0, 0.5);\n}\n.dsh-github-commit-row {\n transition: background 0.15s ease;\n}\n.dsh-github-commit-row:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.05));\n}\nbody[data-ds-dark-theme] .dsh-github-commit-row:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(255, 255, 255, 0.08));\n}\nbody[data-ds-dark-theme] .dsh-github-commit-pre {\n background: var(--dsw-alias-bg-base, #151517) !important;\n color: #ececec !important;\n border: 1px solid #30363d !important;\n}\n.dsh-github-dialog-close-btn:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.08)) !important;\n opacity: 1 !important;\n}\n\n.dsh-github-branch-btn {\n display: inline-flex;\n align-items: center;\n gap: 4px;\n padding: 2px 8px;\n font-size: 11px;\n font-weight: 500;\n border-radius: 12px;\n border: 1px solid rgba(46, 160, 67, 0.4);\n background: rgba(46, 160, 67, 0.12);\n color: var(--dsw-alias-state-success, #2ea043);\n cursor: pointer;\n transition: all 0.15s ease;\n user-select: none;\n}\n.dsh-github-branch-btn:hover {\n background: rgba(46, 160, 67, 0.22);\n border-color: rgba(46, 160, 67, 0.6);\n}\nbody[data-ds-dark-theme] .dsh-github-branch-btn {\n border-color: rgba(56, 139, 253, 0.4);\n background: rgba(56, 139, 253, 0.15);\n color: #58a6ff;\n}\nbody[data-ds-dark-theme] .dsh-github-branch-btn:hover {\n background: rgba(56, 139, 253, 0.25);\n border-color: #58a6ff;\n}\n\n.dsh-github-branch-dropdown {\n position: absolute;\n top: 100%;\n left: 0;\n margin-top: 5px;\n width: 290px;\n max-height: 380px;\n background: var(--dsw-alias-bg-base, #ffffff);\n border: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n border-radius: 8px;\n box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);\n z-index: 1000;\n display: flex;\n flex-direction: column;\n overflow: hidden;\n}\nbody[data-ds-dark-theme] .dsh-github-branch-dropdown {\n background: var(--dsw-alias-bg-layer-2, #1e1e22);\n border-color: var(--dsw-alias-border-l1, #30363d);\n box-shadow: 0 8px 28px rgba(0, 0, 0, 0.5);\n}\n\n.dsh-github-branch-search {\n padding: 8px 10px;\n border-bottom: 1px solid var(--dsw-alias-border-l2, #e1e4e8);\n}\nbody[data-ds-dark-theme] .dsh-github-branch-search {\n border-bottom-color: var(--dsw-alias-border-l1, #30363d);\n}\n.dsh-github-branch-input {\n width: 100%;\n padding: 5px 8px;\n box-sizing: border-box;\n font-size: 11px;\n border-radius: 5px;\n border: 1px solid var(--dsw-alias-border-l2, #d0d7de);\n background: var(--dsw-alias-bg-base, #ffffff);\n color: var(--dsw-alias-label-primary, #1f2328);\n outline: none;\n}\nbody[data-ds-dark-theme] .dsh-github-branch-input {\n border-color: var(--dsw-alias-border-l1, #30363d);\n background: var(--dsw-alias-bg-base, #151517);\n color: #ececec;\n}\n.dsh-github-branch-input:focus {\n border-color: var(--dsw-alias-link, #0969da);\n}\n\n.dsh-github-branch-list {\n flex: 1;\n overflow-y: auto;\n max-height: 280px;\n padding: 4px 0;\n}\n.dsh-github-branch-item {\n display: flex;\n align-items: center;\n justify-content: space-between;\n padding: 6px 12px;\n font-size: 12px;\n cursor: pointer;\n transition: background 0.12s ease;\n color: var(--dsw-alias-label-primary, #1f2328);\n}\nbody[data-ds-dark-theme] .dsh-github-branch-item {\n color: var(--dsw-alias-label-primary, #ececec);\n}\n.dsh-github-branch-item:hover {\n background: var(--dsw-alias-interactive-bg-hover, rgba(0, 0, 0, 0.05));\n}\nbody[data-ds-dark-theme] .dsh-github-branch-item:hover {\n background: rgba(255, 255, 255, 0.08);\n}\n.dsh-github-branch-item.active {\n font-weight: 600;\n color: var(--dsw-alias-state-success, #1a7f37);\n}\nbody[data-ds-dark-theme] .dsh-github-branch-item.active {\n color: #3fb950;\n}\n";
|
|
6
|
+
export declare function injectStyles(): () => void;
|