@morehao/dsh-skills-console 0.3.3 → 0.3.4
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/client.js +10 -46
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -99,9 +99,6 @@ var DICT = {
|
|
|
99
99
|
"view.agent": "按 Agent",
|
|
100
100
|
autoLink: "自动接入",
|
|
101
101
|
"settings.title": "插件设置",
|
|
102
|
-
"id.copy": "复制安装标识",
|
|
103
|
-
"id.copied": "已复制安装标识",
|
|
104
|
-
"id.copyFailed": "复制失败,请重试",
|
|
105
102
|
"placement.label": "侧边栏入口",
|
|
106
103
|
"placement.effect": "切换后立即生效",
|
|
107
104
|
"placement.on": "已开启",
|
|
@@ -289,9 +286,6 @@ var DICT = {
|
|
|
289
286
|
"view.agent": "By agent",
|
|
290
287
|
"autoLink": "Auto-link",
|
|
291
288
|
"settings.title": "Plugin settings",
|
|
292
|
-
"id.copy": "Copy install specifier",
|
|
293
|
-
"id.copied": "Install specifier copied",
|
|
294
|
-
"id.copyFailed": "Copy failed, please retry",
|
|
295
289
|
"placement.label": "Sidebar entry",
|
|
296
290
|
"placement.effect": "Applies immediately",
|
|
297
291
|
"placement.on": "on",
|
|
@@ -452,17 +446,6 @@ var DICT = {
|
|
|
452
446
|
"viewer.info.none": "None"
|
|
453
447
|
}
|
|
454
448
|
};
|
|
455
|
-
async function copyText(text) {
|
|
456
|
-
const value = String(text ?? "");
|
|
457
|
-
if (!value) return false;
|
|
458
|
-
try {
|
|
459
|
-
if (typeof navigator === "undefined" || !navigator.clipboard?.writeText) return false;
|
|
460
|
-
await navigator.clipboard.writeText(value);
|
|
461
|
-
return true;
|
|
462
|
-
} catch {
|
|
463
|
-
return false;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
449
|
function buildTranslate(locale) {
|
|
467
450
|
const active = () => {
|
|
468
451
|
try {
|
|
@@ -850,19 +833,12 @@ var CSS = `
|
|
|
850
833
|
.dshsc-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
|
|
851
834
|
.dshsc-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
|
|
852
835
|
|
|
853
|
-
/* 身份:按「安装时输入的包名」显示(@scope/name@version
|
|
854
|
-
.dshsc-id { display: inline-flex; align-items: center;
|
|
855
|
-
max-width: 100%; height: 22px; padding: 0
|
|
856
|
-
border-radius: 6px; background: var(--dsw-alias-bg-layer-1); color: var(--dsw-alias-label-tertiary);
|
|
836
|
+
/* 身份:按「安装时输入的包名」显示(@scope/name@version),等宽只读、不描边 */
|
|
837
|
+
.dshsc-id { display: inline-flex; align-items: center; box-sizing: border-box; min-width: 0;
|
|
838
|
+
max-width: 100%; height: 22px; padding: 0 2px; color: var(--dsw-alias-label-tertiary);
|
|
857
839
|
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
858
|
-
font-size: 11px; line-height: 1; white-space: nowrap;
|
|
859
|
-
transition: background .12s ease, border-color .12s ease, color .12s ease; }
|
|
860
|
-
.dshsc-id:hover { border-color: var(--dsw-alias-border-l2); background: var(--dsw-alias-bg-layer-2);
|
|
861
|
-
color: var(--dsw-alias-label-primary); }
|
|
862
|
-
.dshsc-id:focus-visible { outline: 2px solid var(--dsw-alias-brand-primary); outline-offset: 1px; }
|
|
840
|
+
font-size: 11px; line-height: 1; white-space: nowrap; }
|
|
863
841
|
.dshsc-spec { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
|
|
864
|
-
.dshsc-idcopy { display: inline-flex; flex: none; opacity: .5; transition: opacity .12s ease; }
|
|
865
|
-
.dshsc-id:hover .dshsc-idcopy, .dshsc-id:focus-visible .dshsc-idcopy { opacity: 1; }
|
|
866
842
|
|
|
867
843
|
/* 插件级工具(设置 / GitHub):跟在身份胶囊后面,用细线分组;鬼影按钮不和业务按钮抢权重 */
|
|
868
844
|
.dshsc-tools { display: inline-flex; align-items: center; gap: 2px; flex: none; margin-left: 2px;
|
|
@@ -1781,14 +1757,9 @@ function Header({
|
|
|
1781
1757
|
onChangePlacement,
|
|
1782
1758
|
onOpenAutoLink,
|
|
1783
1759
|
onAddSkill,
|
|
1784
|
-
onAddSubscription
|
|
1785
|
-
onToast
|
|
1760
|
+
onAddSubscription
|
|
1786
1761
|
}) {
|
|
1787
1762
|
const spec = installSpec(plugin);
|
|
1788
|
-
async function copySpec() {
|
|
1789
|
-
const ok = await copyText(spec);
|
|
1790
|
-
onToast?.(ok ? { kind: "ok", text: t("id.copied") } : { kind: "err", text: t("id.copyFailed") });
|
|
1791
|
-
}
|
|
1792
1763
|
const headTools = h(
|
|
1793
1764
|
"div",
|
|
1794
1765
|
{ className: "dshsc-tools" },
|
|
@@ -1861,17 +1832,11 @@ function Header({
|
|
|
1861
1832
|
{ className: "dshsc-title-row" },
|
|
1862
1833
|
h("h2", { className: "dshsc-title" }, page ? t("page.title") : t("section.title")),
|
|
1863
1834
|
// 身份:按「安装时输入的包名」显示,点一下整段复制(Host 从 package.json 注入)
|
|
1835
|
+
// 身份:按「安装时输入的包名」显示,只读展示(Host 从 package.json 注入)
|
|
1864
1836
|
spec ? h(
|
|
1865
|
-
"
|
|
1866
|
-
{
|
|
1867
|
-
|
|
1868
|
-
className: "dshsc-id",
|
|
1869
|
-
title: `${t("id.copy")}:${spec}`,
|
|
1870
|
-
"aria-label": `${t("id.copy")}:${spec}`,
|
|
1871
|
-
onClick: () => void copySpec()
|
|
1872
|
-
},
|
|
1873
|
-
h("span", { className: "dshsc-spec" }, spec),
|
|
1874
|
-
h("span", { className: "dshsc-idcopy", "aria-hidden": "true" }, h(CopyIcon, { size: 11 }))
|
|
1837
|
+
"span",
|
|
1838
|
+
{ className: "dshsc-id", title: spec },
|
|
1839
|
+
h("span", { className: "dshsc-spec" }, spec)
|
|
1875
1840
|
) : null,
|
|
1876
1841
|
headTools
|
|
1877
1842
|
),
|
|
@@ -3999,8 +3964,7 @@ function Section({ t, page = false, pickDirectory, onPlacementChange }) {
|
|
|
3999
3964
|
onChangePlacement: (next) => void changePlacement(next),
|
|
4000
3965
|
onOpenAutoLink: () => setModal({ type: "autolink" }),
|
|
4001
3966
|
onAddSkill: actions.requestAddSkill,
|
|
4002
|
-
onAddSubscription: actions.requestAddSubscription
|
|
4003
|
-
onToast: (next) => setToast(next)
|
|
3967
|
+
onAddSubscription: actions.requestAddSubscription
|
|
4004
3968
|
}),
|
|
4005
3969
|
error ? h("div", { className: "dshsc-banner err" }, `${error} · `, h("button", { className: "dshsc-btn ghost", onClick: () => void reload() }, t("action.retry"))) : null,
|
|
4006
3970
|
data?.readOnly ? h("div", { className: "dshsc-banner warn" }, t("banner.readonly")) : null,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@morehao/dsh-skills-console",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.4",
|
|
4
4
|
"description": "统一管理本地技能的安装、更新、删除与接入,让同一份技能在多个 Agent 间复用。A skill manager for DeepSeek Harness: install, update, remove, link and toggle agent skills.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "morehao <morehao@qq.com>",
|