@morehao/dsh-skills-console 0.3.2 → 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 +17 -19
- package/lib/routes.js +6 -3
- package/package.json +1 -1
package/client.js
CHANGED
|
@@ -99,7 +99,6 @@ var DICT = {
|
|
|
99
99
|
"view.agent": "按 Agent",
|
|
100
100
|
autoLink: "自动接入",
|
|
101
101
|
"settings.title": "插件设置",
|
|
102
|
-
"version.label": "当前版本",
|
|
103
102
|
"placement.label": "侧边栏入口",
|
|
104
103
|
"placement.effect": "切换后立即生效",
|
|
105
104
|
"placement.on": "已开启",
|
|
@@ -287,7 +286,6 @@ var DICT = {
|
|
|
287
286
|
"view.agent": "By agent",
|
|
288
287
|
"autoLink": "Auto-link",
|
|
289
288
|
"settings.title": "Plugin settings",
|
|
290
|
-
"version.label": "Version",
|
|
291
289
|
"placement.label": "Sidebar entry",
|
|
292
290
|
"placement.effect": "Applies immediately",
|
|
293
291
|
"placement.on": "on",
|
|
@@ -835,13 +833,12 @@ var CSS = `
|
|
|
835
833
|
.dshsc-head-actions { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-left: auto; }
|
|
836
834
|
.dshsc-title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
|
|
837
835
|
|
|
838
|
-
/*
|
|
839
|
-
.dshsc-id { display: inline-flex; align-items: center;
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
.dshsc-
|
|
844
|
-
.dshsc-ver { flex: none; font-size: 11px; line-height: 1; color: var(--dsw-alias-label-tertiary); font-variant-numeric: tabular-nums; }
|
|
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);
|
|
839
|
+
font-family: var(--ds-font-family-code, ui-monospace, SFMono-Regular, Menlo, monospace);
|
|
840
|
+
font-size: 11px; line-height: 1; white-space: nowrap; }
|
|
841
|
+
.dshsc-spec { min-width: 0; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
|
|
845
842
|
|
|
846
843
|
/* 插件级工具(设置 / GitHub):跟在身份胶囊后面,用细线分组;鬼影按钮不和业务按钮抢权重 */
|
|
847
844
|
.dshsc-tools { display: inline-flex; align-items: center; gap: 2px; flex: none; margin-left: 2px;
|
|
@@ -1737,6 +1734,11 @@ function useSkillReader(row) {
|
|
|
1737
1734
|
}
|
|
1738
1735
|
|
|
1739
1736
|
// client/views/header.js
|
|
1737
|
+
function installSpec(plugin) {
|
|
1738
|
+
const name = plugin?.fullName || plugin?.name;
|
|
1739
|
+
if (!name) return null;
|
|
1740
|
+
return plugin.version ? `${name}@${plugin.version}` : name;
|
|
1741
|
+
}
|
|
1740
1742
|
function Header({
|
|
1741
1743
|
t,
|
|
1742
1744
|
page,
|
|
@@ -1757,6 +1759,7 @@ function Header({
|
|
|
1757
1759
|
onAddSkill,
|
|
1758
1760
|
onAddSubscription
|
|
1759
1761
|
}) {
|
|
1762
|
+
const spec = installSpec(plugin);
|
|
1760
1763
|
const headTools = h(
|
|
1761
1764
|
"div",
|
|
1762
1765
|
{ className: "dshsc-tools" },
|
|
@@ -1828,17 +1831,12 @@ function Header({
|
|
|
1828
1831
|
"div",
|
|
1829
1832
|
{ className: "dshsc-title-row" },
|
|
1830
1833
|
h("h2", { className: "dshsc-title" }, page ? t("page.title") : t("section.title")),
|
|
1831
|
-
//
|
|
1832
|
-
|
|
1834
|
+
// 身份:按「安装时输入的包名」显示,点一下整段复制(Host 从 package.json 注入)
|
|
1835
|
+
// 身份:按「安装时输入的包名」显示,只读展示(Host 从 package.json 注入)
|
|
1836
|
+
spec ? h(
|
|
1833
1837
|
"span",
|
|
1834
|
-
{ className: "dshsc-id" },
|
|
1835
|
-
h("span", { className: "dshsc-
|
|
1836
|
-
plugin.version ? h("span", { className: "dshsc-idsep" }, "|") : null,
|
|
1837
|
-
plugin.version ? h(
|
|
1838
|
-
"span",
|
|
1839
|
-
{ className: "dshsc-ver", title: `${t("version.label")} v${plugin.version}` },
|
|
1840
|
-
`v${plugin.version}`
|
|
1841
|
-
) : null
|
|
1838
|
+
{ className: "dshsc-id", title: spec },
|
|
1839
|
+
h("span", { className: "dshsc-spec" }, spec)
|
|
1842
1840
|
) : null,
|
|
1843
1841
|
headTools
|
|
1844
1842
|
),
|
package/lib/routes.js
CHANGED
|
@@ -6,8 +6,10 @@ export const ROUTE_PREFIX = '/api/morehao/skills-console';
|
|
|
6
6
|
const MAX_BODY = 256 * 1024;
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
9
|
+
* 插件身份:包名 + 版本,随 /state 下发。
|
|
10
|
+
* - `name`:去掉 scope 的短名(兼容老前端);
|
|
11
|
+
* - `fullName`:带 scope 的真实包名,页头据此拼成可复制的安装标识 `@scope/name@version`。
|
|
12
|
+
* 从 package.json 读一次 —— 前端别硬编码版本,否则两处漂移。
|
|
11
13
|
*/
|
|
12
14
|
export const PLUGIN_INFO = (() => {
|
|
13
15
|
try {
|
|
@@ -15,11 +17,12 @@ export const PLUGIN_INFO = (() => {
|
|
|
15
17
|
const name = String(pkg.name || 'dsh-skills-console');
|
|
16
18
|
return {
|
|
17
19
|
name: name.includes('/') ? name.slice(name.lastIndexOf('/') + 1) : name,
|
|
20
|
+
fullName: name,
|
|
18
21
|
version: pkg.version || null,
|
|
19
22
|
repository: pkg.repository?.url || null,
|
|
20
23
|
};
|
|
21
24
|
} catch {
|
|
22
|
-
return { name: 'dsh-skills-console', version: null, repository: null };
|
|
25
|
+
return { name: 'dsh-skills-console', fullName: 'dsh-skills-console', version: null, repository: null };
|
|
23
26
|
}
|
|
24
27
|
})();
|
|
25
28
|
|
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>",
|