dsh-skill-browser 1.5.6 → 1.5.8

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.
Files changed (2) hide show
  1. package/lib/client.js +54 -10
  2. 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) {}
@@ -881,6 +913,15 @@ window.__ModuleLoader__.load({
881
913
  }));
882
914
  rows.push(React.createElement("div", { key: "hint", style: { fontSize: "12px", color: "#8b93a8" } },
883
915
  "悬浮球可拖动;清单面板始终居中;本分区就在 DSH 设置中,随时可改悬浮球显隐"));
916
+ // ── 安装与更新须知(v1.5.7:24h 供应链政策 + 推荐清单说明)──
917
+ rows.push(React.createElement("div", { key: "notice-block", style: { marginTop: "12px", padding: "10px 12px", background: "rgba(255,255,255,.03)", border: "1px solid rgba(255,255,255,.06)", borderRadius: "10px", fontSize: "12px", color: "#9aa1b5", lineHeight: "1.7" } },
918
+ React.createElement("div", { style: { fontWeight: "600", color: "#cfd4dc", marginBottom: "4px" } }, "📌 安装与更新须知"),
919
+ React.createElement("div", null, "1. 本分区由「技能浏览器」提供;若同时安装了字体插件,两个悬浮球的显隐都在这里控制。"),
920
+ React.createElement("div", null, "2. 推荐插件列表实时显示「已安装 / 未安装」状态:绿色「已安装」= 可直接使用;红色「未安装」= 点击 ⭐ Star 前往仓库,或到插件市场搜索安装。"),
921
+ React.createElement("div", { style: { color: "#e0b0b0" } }, "3. 【重要】安装或更新插件时,若报错含 minimumReleaseAge 或 ERR_PNPM_MINIMUM_RELEASE_AGE_VIOLATION:这不是插件坏了,是 DSH 对刚发布 npm 包的 24 小时安全观察期(防止刚发布的投毒包)。"),
922
+ React.createElement("div", { style: { color: "#e0b0b0" } }, "4. 遇到 24h 报错的处理:等一天再安装/更新即可自动通过,插件本体没有任何问题。插件作者连发多版时窗口期会顺延一天。"),
923
+ React.createElement("div", null, "5. 悬浮球可拖动换位置;拖到屏幕外找不到时,点上方 🎯 按钮一键复位(检测到字体插件时双球一起归位)。")
924
+ ));
884
925
  // ── 一键恢复默认位置(v1.5.3 用户要求):悬浮球被拖出屏幕外卡住时,
885
926
  // 点此按钮立即回到默认右下角 (right:26px bottom:118px) 46px 常规大小,
886
927
  // 并顺带恢复显示、解除收起小圆点状态。无需重启。──
@@ -890,15 +931,16 @@ window.__ModuleLoader__.load({
890
931
  background: "rgba(255,210,122,.12)", border: "1px solid rgba(255,210,122,.35)",
891
932
  borderRadius: "6px", padding: "6px 12px", color: "#ffd27a" }
892
933
  }, isFontEnhancerInstalled() ? "🎯 一键恢复悬浮球默认位置(右下角,双球)" : "🎯 一键恢复悬浮球默认位置(右下角)"));
893
- // ── 推荐插件(v1.5.6:字体分区让位后,推荐位回归本分区)──
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
- rows.push(React.createElement("div", { key: "rec-lightbox", style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
896
- React.createElement("span", null, "🖼️ 照片显示器 聊天图片灯箱(放大/下载/浏览)"),
897
- React.createElement("a", { href: "https://github.com/loyalchiiina/dsh-chat-image-lightbox", 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")));
898
- rows.push(React.createElement("div", { key: "rec-font", style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
899
- React.createElement("span", null, "🔤 字体插件 — 区域自定义字体/颜色/字号"),
900
- React.createElement("a", { href: "https://github.com/loyalchiiina/dsh-font-enhancer", 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")));
901
- return React.createElement("div", { "data-dsb-slot": "1", style: { display: "flex", flexDirection: "column", gap: "8px", padding: "8px 0" } }, rows);
934
+ // ── 推荐插件(v1.5.7 统一三条清单:字体/技能/照片,探测式安装徽标)──
935
+ 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" } }, "推荐插件"));
936
+ function recRow(key, recId, icon, text, repo) {
937
+ return React.createElement("div", { key: key, "data-rec-id": recId, style: { display: "flex", alignItems: "center", justifyContent: "space-between", fontSize: "13px", padding: "3px 0" } },
938
+ React.createElement("span", null, icon + " " + text),
939
+ 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"));
940
+ }
941
+ rows.push(recRow("rec-font", "font", "🔤", "字体插件 区域自定义字体/颜色/字号", "loyalchiiina/dsh-font-enhancer"));
942
+ rows.push(recRow("rec-skillbrowser", "skillbrowser", "🧩", "技能浏览器 悬浮球面板浏览共享技能库 + 失效台账", "loyalchiiina/dsh-skill-browser"));
943
+ 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
944
  }
903
945
 
904
946
  function registerSettings(ctx) {
@@ -967,7 +1009,9 @@ window.__ModuleLoader__.load({
967
1009
  applyFontBallVisibility();
968
1010
  applyBallVisibility();
969
1011
  } catch (e) {}
970
- try { console.log("[dsh-skill-browser] client mounted (v1.4.1 slot-only)"); } catch (e3) {}
1012
+ try { console.log("[dsh-skill-browser] client mounted (v1.4.1 slot-only)"); } catch (e3) {}
1013
+ setTimeout(applyRecBadges, 1200);
1014
+ setInterval(applyRecBadges, 5000);
971
1015
  };
972
1016
 
973
1017
  return module.exports;
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "name": "dsh-skill-browser",
3
- "version": "1.5.6",
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": ">=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
- }
1
+ {
2
+ "name": "dsh-skill-browser",
3
+ "version": "1.5.8",
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
+ }