dsh-skill-browser 1.5.6 → 1.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/client.js +45 -10
- package/package.json +53 -53
package/lib/client.js
CHANGED
|
@@ -741,6 +741,38 @@ window.__ModuleLoader__.load({
|
|
|
741
741
|
|
|
742
742
|
// v1.5.3 一键恢复默认位置:清位置记忆与收起/隐藏状态,球立即回右下角默认位。
|
|
743
743
|
// 供 DSH 设置页「悬浮球导航」分区按钮调用(球可能被拖出屏幕外卡住,无法点回)。
|
|
744
|
+
// v1.5.7 推荐位安装徽标:探测三个插件的 client 运行状态,注入「已安装/未安装」徽标。
|
|
745
|
+
function recBadgeInstalled(id) {
|
|
746
|
+
if (id === "font") return !!document.getElementById("dsh-fe-toggle");
|
|
747
|
+
if (id === "skillbrowser") return !!document.getElementById(BALL_ID);
|
|
748
|
+
return false; // lightbox 用异步 fetch 判定,不走这里
|
|
749
|
+
}
|
|
750
|
+
function markRecBadge(recId, installed) {
|
|
751
|
+
var row = document.querySelector('[data-rec-id="' + recId + '"]');
|
|
752
|
+
if (!row || row.querySelector(".fe-rec-badge")) return;
|
|
753
|
+
var badge = document.createElement("span");
|
|
754
|
+
badge.className = "fe-rec-badge";
|
|
755
|
+
badge.textContent = installed ? "已安装" : "未安装";
|
|
756
|
+
badge.style.cssText = "flex-shrink:0;margin-left:8px;font-size:11px;padding:2px 8px;border-radius:6px;" +
|
|
757
|
+
(installed ? "background:rgba(120,220,150,.15);border:1px solid rgba(120,220,150,.4);color:#9fe0b5"
|
|
758
|
+
: "background:rgba(255,120,120,.15);border:1px solid rgba(255,120,120,.35);color:#ffb3b3") +
|
|
759
|
+
";white-space:nowrap";
|
|
760
|
+
var star = row.querySelector("a");
|
|
761
|
+
if (star) row.insertBefore(badge, star); else row.appendChild(badge);
|
|
762
|
+
}
|
|
763
|
+
function applyRecBadges() {
|
|
764
|
+
["font", "skillbrowser", "lightbox"].forEach(function (id) {
|
|
765
|
+
if (id === "lightbox") {
|
|
766
|
+
try {
|
|
767
|
+
fetch("/api/image-gallery/list").then(function (r) {
|
|
768
|
+
markRecBadge("lightbox", r.ok);
|
|
769
|
+
}).catch(function () { markRecBadge("lightbox", false); });
|
|
770
|
+
} catch (e) { markRecBadge("lightbox", false); }
|
|
771
|
+
} else {
|
|
772
|
+
markRecBadge(id, recBadgeInstalled(id));
|
|
773
|
+
}
|
|
774
|
+
});
|
|
775
|
+
}
|
|
744
776
|
function resetBallToDefault() {
|
|
745
777
|
try { localStorage.removeItem(BALL_POS_KEY); } catch (e) {}
|
|
746
778
|
try { writeStore(BALL_VIS_KEY, true); } catch (e) {}
|
|
@@ -890,15 +922,16 @@ window.__ModuleLoader__.load({
|
|
|
890
922
|
background: "rgba(255,210,122,.12)", border: "1px solid rgba(255,210,122,.35)",
|
|
891
923
|
borderRadius: "6px", padding: "6px 12px", color: "#ffd27a" }
|
|
892
924
|
}, isFontEnhancerInstalled() ? "🎯 一键恢复悬浮球默认位置(右下角,双球)" : "🎯 一键恢复悬浮球默认位置(右下角)"));
|
|
893
|
-
// ── 推荐插件(v1.5.
|
|
894
|
-
rows.push(React.createElement("div", { key: "rec-head", style: { fontWeight: "600", marginTop: "12px", marginBottom: "4px", borderTop: "1px solid rgba(255,255,255,.08)", paddingTop: "10px" } }, "推荐插件"));
|
|
895
|
-
|
|
896
|
-
React.createElement("
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
925
|
+
// ── 推荐插件(v1.5.7 统一三条清单:字体/技能/照片,探测式安装徽标)──
|
|
926
|
+
rows.push(React.createElement("div", { key: "rec-head", style: { fontWeight: "600", marginTop: "12px", marginBottom: "4px", borderTop: "1px solid rgba(255,255,255,.08)", paddingTop: "10px" } }, "推荐插件"));
|
|
927
|
+
function recRow(key, recId, icon, text, repo) {
|
|
928
|
+
return React.createElement("div", { key: key, "data-rec-id": recId, style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
|
|
929
|
+
React.createElement("span", null, icon + " " + text),
|
|
930
|
+
React.createElement("a", { href: "https://github.com/" + repo, target: "_blank", rel: "noopener", style: { textDecoration: "none", fontSize: "12px", background: "rgba(255,255,255,.06)", border: "1px solid rgba(255,255,255,.12)", borderRadius: "6px", padding: "2px 8px", color: "#ffd27a", cursor: "pointer", whiteSpace: "nowrap" } }, "⭐ Star"));
|
|
931
|
+
}
|
|
932
|
+
rows.push(recRow("rec-font", "font", "🔤", "字体插件 — 区域自定义字体/颜色/字号", "loyalchiiina/dsh-font-enhancer"));
|
|
933
|
+
rows.push(recRow("rec-skillbrowser", "skillbrowser", "🧩", "技能浏览器 — 悬浮球面板浏览共享技能库 + 失效台账", "loyalchiiina/dsh-skill-browser"));
|
|
934
|
+
rows.push(recRow("rec-lightbox", "lightbox", "🖼️", "照片显示器 — 聊天图片灯箱(放大/下载/浏览)", "loyalchiiina/dsh-chat-image-lightbox"));return React.createElement("div", { "data-dsb-slot": "1", style: { display: "flex", flexDirection: "column", gap: "8px", padding: "8px 0" } }, rows);
|
|
902
935
|
}
|
|
903
936
|
|
|
904
937
|
function registerSettings(ctx) {
|
|
@@ -967,7 +1000,9 @@ window.__ModuleLoader__.load({
|
|
|
967
1000
|
applyFontBallVisibility();
|
|
968
1001
|
applyBallVisibility();
|
|
969
1002
|
} catch (e) {}
|
|
970
|
-
try { console.log("[dsh-skill-browser] client mounted (v1.4.1 slot-only)"); } catch (e3) {}
|
|
1003
|
+
try { console.log("[dsh-skill-browser] client mounted (v1.4.1 slot-only)"); } catch (e3) {}
|
|
1004
|
+
setTimeout(applyRecBadges, 1200);
|
|
1005
|
+
setInterval(applyRecBadges, 5000);
|
|
971
1006
|
};
|
|
972
1007
|
|
|
973
1008
|
return module.exports;
|
package/package.json
CHANGED
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "dsh-skill-browser",
|
|
3
|
+
"version": "1.5.7",
|
|
4
|
+
"description": "DSH 技能浏览器:悬浮球面板浏览共享技能库(分类/中文简介/搜索/失效台账/全文查看),含 DSH 设置页悬浮球显隐开关与一键恢复默认位置按钮、技能库位置可配置(原生目录选择框)与技能失效台账自动登记(自动/人工分开显示);推荐插件位仅保留面板设置展开区一处。Skill library browser panel with categories, Chinese descriptions, configurable skill root with native directory chooser, one-click ball position reset and automatic skill-failure ledger.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "lib/index.js",
|
|
7
|
+
"sideEffects": false,
|
|
8
|
+
"engines": {
|
|
9
|
+
"node": "\u003e=18"
|
|
10
|
+
},
|
|
11
|
+
"exports": {
|
|
12
|
+
".": "./lib/index.js",
|
|
13
|
+
"./client": "./lib/client.js",
|
|
14
|
+
"./package.json": "./package.json"
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"lib/**/*.js",
|
|
18
|
+
"lib/**/*.ps1",
|
|
19
|
+
"cordis.patch.yml",
|
|
20
|
+
"README.md",
|
|
21
|
+
"LICENSE"
|
|
22
|
+
],
|
|
23
|
+
"license": "MIT",
|
|
24
|
+
"keywords": [
|
|
25
|
+
"dsh-plugin",
|
|
26
|
+
"deepseek-harness",
|
|
27
|
+
"skill",
|
|
28
|
+
"技能",
|
|
29
|
+
"skills-browser",
|
|
30
|
+
"skill-browser",
|
|
31
|
+
"fluent",
|
|
32
|
+
"cfd",
|
|
33
|
+
"分类",
|
|
34
|
+
"category",
|
|
35
|
+
"chinese",
|
|
36
|
+
"中文简介"
|
|
37
|
+
],
|
|
38
|
+
"dsh": {
|
|
39
|
+
"bundle": {
|
|
40
|
+
"patch": "./cordis.patch.yml"
|
|
41
|
+
},
|
|
42
|
+
"client": {
|
|
43
|
+
"inject": [
|
|
44
|
+
"@deepseek-ai/dsh-client-connection",
|
|
45
|
+
"@deepseek-ai/dsh-client-runtime",
|
|
46
|
+
"@deepseek-ai/dsh-client-ui-settings",
|
|
47
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
48
|
+
"@deepseek-ai/dsh-client-locale"
|
|
49
|
+
],
|
|
50
|
+
"platform": "web"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|