@weibaohui/skills-management 0.1.2 → 0.1.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/README.md +1 -1
- package/client/bundle.js +36 -39
- package/client/index.js +36 -39
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @weibaohui/skills-management
|
|
2
2
|
|
|
3
|
-
[](https://github.com/topics/dsh-plugin)
|
|
4
4
|
[](https://www.npmjs.com/package/@weibaohui/skills-management)
|
|
5
5
|
|
|
6
6
|
**技能市场插件**:一个页面管理本机所有 coding agent 的技能,还能浏览安装 6600+ 的 ntd 技能市场。
|
package/client/bundle.js
CHANGED
|
@@ -81,10 +81,10 @@ window.__ModuleLoader__.load({
|
|
|
81
81
|
const ZH = {
|
|
82
82
|
title: '技能市场',
|
|
83
83
|
close: '关闭',
|
|
84
|
-
tabExecutors: '
|
|
84
|
+
tabExecutors: '已安装',
|
|
85
85
|
tabMarket: '市场',
|
|
86
86
|
tabSources: '来源',
|
|
87
|
-
cardsHint: '
|
|
87
|
+
cardsHint: '选择一个智能体工具浏览它的技能,或一次查看全部',
|
|
88
88
|
marketCardsHint: '选择一个来源仓库浏览其技能,或一次查看全部',
|
|
89
89
|
marketLoading: '正在加载市场目录…',
|
|
90
90
|
marketSettings: '市场设置',
|
|
@@ -132,16 +132,16 @@ window.__ModuleLoader__.load({
|
|
|
132
132
|
showMore: '显示更多(剩余 {n})',
|
|
133
133
|
browseAll: '浏览全部技能',
|
|
134
134
|
refresh: '刷新',
|
|
135
|
-
backCards: '←
|
|
136
|
-
backExecutors: '←
|
|
135
|
+
backCards: '← 智能体工具卡片',
|
|
136
|
+
backExecutors: '← 已安装',
|
|
137
137
|
backAll: '← 全部技能',
|
|
138
138
|
searchAll: '搜索全部技能…',
|
|
139
139
|
filterWithin: '在 {label} 内筛选…',
|
|
140
|
-
pickSource: '
|
|
141
|
-
loadingCatalogs: '
|
|
140
|
+
pickSource: '全部智能体工具',
|
|
141
|
+
loadingCatalogs: '正在加载全部智能体工具目录…',
|
|
142
142
|
scanning: '正在扫描 {label}…',
|
|
143
143
|
skillsSuffix: '个技能',
|
|
144
|
-
noExecutors: '
|
|
144
|
+
noExecutors: '本机未发现任何智能体工具目录',
|
|
145
145
|
dirMissingTitle: '{label}:目录不存在',
|
|
146
146
|
dirMissingHint: '预期位置 {dir}',
|
|
147
147
|
notFoundGroup: '本机不存在的来源({n})',
|
|
@@ -188,10 +188,10 @@ window.__ModuleLoader__.load({
|
|
|
188
188
|
const EN = {
|
|
189
189
|
title: 'Skills Market',
|
|
190
190
|
close: 'Close',
|
|
191
|
-
tabExecutors: '
|
|
191
|
+
tabExecutors: 'Installed',
|
|
192
192
|
tabMarket: 'Market',
|
|
193
193
|
tabSources: 'Sources',
|
|
194
|
-
cardsHint: 'Pick an
|
|
194
|
+
cardsHint: 'Pick an agent tool to browse its skills, or view everything at once',
|
|
195
195
|
marketCardsHint: 'Pick a source repo to browse its skills, or view everything at once',
|
|
196
196
|
marketLoading: 'Loading market catalog…',
|
|
197
197
|
marketSettings: 'Market Settings',
|
|
@@ -239,16 +239,16 @@ window.__ModuleLoader__.load({
|
|
|
239
239
|
showMore: 'Show more ({n} left)',
|
|
240
240
|
browseAll: 'Browse all skills',
|
|
241
241
|
refresh: 'Refresh',
|
|
242
|
-
backCards: '←
|
|
243
|
-
backExecutors: '←
|
|
242
|
+
backCards: '← Agent tool cards',
|
|
243
|
+
backExecutors: '← Installed',
|
|
244
244
|
backAll: '← All skills',
|
|
245
245
|
searchAll: 'Search all skills…',
|
|
246
246
|
filterWithin: 'Filter within {label}…',
|
|
247
|
-
pickSource: 'All
|
|
248
|
-
loadingCatalogs: 'Loading all
|
|
247
|
+
pickSource: 'All agent tools',
|
|
248
|
+
loadingCatalogs: 'Loading all agent tool catalogs…',
|
|
249
249
|
scanning: 'Scanning {label}…',
|
|
250
250
|
skillsSuffix: 'skills',
|
|
251
|
-
noExecutors: 'No
|
|
251
|
+
noExecutors: 'No agent tool directories found on this machine',
|
|
252
252
|
dirMissingTitle: '{label}: directory not found',
|
|
253
253
|
dirMissingHint: 'Expected skills at {dir}',
|
|
254
254
|
notFoundGroup: 'Not found on this machine ({n})',
|
|
@@ -427,6 +427,10 @@ window.__ModuleLoader__.load({
|
|
|
427
427
|
.sk-input:focus{border-color:var(--dsw-alias-state-business-primary)}
|
|
428
428
|
.sk-input::placeholder{color:var(--dsw-alias-label-tertiary)}
|
|
429
429
|
.sk-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:40;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);border-radius:999px;padding:8px 18px;font-size:13px;box-shadow:var(--dsw-shadow-lv2)}
|
|
430
|
+
.sk-menu{position:absolute;top:100%;left:0;margin-top:4px;min-width:220px;max-height:340px;overflow:auto;background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;box-shadow:var(--dsw-shadow-lv2,var(--dsw-shadow-lv1));z-index:2147483600;padding:4px}
|
|
431
|
+
.sk-menu-item{padding:8px 12px;border-radius:8px;cursor:pointer;color:var(--dsw-alias-label-primary);font-size:13px;white-space:nowrap}
|
|
432
|
+
.sk-menu-item:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
433
|
+
.sk-menu-item.on{color:var(--dsw-alias-state-business-primary);font-weight:500}
|
|
430
434
|
.sk-tabpill{background:transparent;border:none;color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family)}
|
|
431
435
|
</style>`
|
|
432
436
|
|
|
@@ -457,37 +461,30 @@ window.__ModuleLoader__.load({
|
|
|
457
461
|
(name[0] || '?').toUpperCase())
|
|
458
462
|
}
|
|
459
463
|
|
|
460
|
-
/** Executor dropdown
|
|
464
|
+
/** Executor dropdown: self-contained popover (host primitives expose no Menu). */
|
|
461
465
|
function SourceFilter({ rows, value, onChange, t }) {
|
|
462
466
|
const [open, setOpen] = useState(false)
|
|
463
|
-
const
|
|
467
|
+
const items = [
|
|
468
|
+
{ id: 'all', label: `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})` },
|
|
469
|
+
...rows.map(x => ({ id: x.key, label: `${x.label} (${x.skillCount})` })),
|
|
470
|
+
]
|
|
464
471
|
const current = value === 'all' ? null : rows.find(r => r.key === value)
|
|
465
472
|
const label = value === 'all'
|
|
466
473
|
? `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})`
|
|
467
474
|
: `${current ? current.label : value} (${current ? current.skillCount : 0})`
|
|
468
|
-
return h('span', {
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
align: 'start',
|
|
482
|
-
items: [
|
|
483
|
-
{ id: 'all', label: `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})` },
|
|
484
|
-
...rows.map(x => ({ id: x.key, label: `${x.label} (${x.skillCount})` })),
|
|
485
|
-
],
|
|
486
|
-
selectedId: value,
|
|
487
|
-
onSelect: (id) => { onChange(id); setOpen(false) },
|
|
488
|
-
onClose: () => setOpen(false),
|
|
489
|
-
})
|
|
490
|
-
: null)
|
|
475
|
+
return h('span', { style: { position: 'relative', display: 'inline-flex' } },
|
|
476
|
+
h(P.Button, { variant: 'outline', size: 'sm',
|
|
477
|
+
onClick: () => setOpen(o => !o), title: label },
|
|
478
|
+
label,
|
|
479
|
+
P.IconChevronDownOutline14 ? h(P.IconChevronDownOutline14, { size: 12 }) : ' ▾'),
|
|
480
|
+
open && h('div', { className: 'sk-menu' },
|
|
481
|
+
items.map(item => h('div', {
|
|
482
|
+
key: item.id,
|
|
483
|
+
className: 'sk-menu-item' + (item.id === value ? ' on' : ''),
|
|
484
|
+
role: 'button', tabIndex: 0,
|
|
485
|
+
onClick: () => { onChange(item.id); setOpen(false) },
|
|
486
|
+
onKeyDown: e => { if (e.key === 'Enter' || e.key === ' ') { onChange(item.id); setOpen(false) } },
|
|
487
|
+
}, item.label))))
|
|
491
488
|
}
|
|
492
489
|
|
|
493
490
|
// ── Skill / executor cards ───────────────────────────────────────────────
|
package/client/index.js
CHANGED
|
@@ -71,10 +71,10 @@ const NS = 'skillsManagement'
|
|
|
71
71
|
const ZH = {
|
|
72
72
|
title: '技能市场',
|
|
73
73
|
close: '关闭',
|
|
74
|
-
tabExecutors: '
|
|
74
|
+
tabExecutors: '已安装',
|
|
75
75
|
tabMarket: '市场',
|
|
76
76
|
tabSources: '来源',
|
|
77
|
-
cardsHint: '
|
|
77
|
+
cardsHint: '选择一个智能体工具浏览它的技能,或一次查看全部',
|
|
78
78
|
marketCardsHint: '选择一个来源仓库浏览其技能,或一次查看全部',
|
|
79
79
|
marketLoading: '正在加载市场目录…',
|
|
80
80
|
marketSettings: '市场设置',
|
|
@@ -122,16 +122,16 @@ const ZH = {
|
|
|
122
122
|
showMore: '显示更多(剩余 {n})',
|
|
123
123
|
browseAll: '浏览全部技能',
|
|
124
124
|
refresh: '刷新',
|
|
125
|
-
backCards: '←
|
|
126
|
-
backExecutors: '←
|
|
125
|
+
backCards: '← 智能体工具卡片',
|
|
126
|
+
backExecutors: '← 已安装',
|
|
127
127
|
backAll: '← 全部技能',
|
|
128
128
|
searchAll: '搜索全部技能…',
|
|
129
129
|
filterWithin: '在 {label} 内筛选…',
|
|
130
|
-
pickSource: '
|
|
131
|
-
loadingCatalogs: '
|
|
130
|
+
pickSource: '全部智能体工具',
|
|
131
|
+
loadingCatalogs: '正在加载全部智能体工具目录…',
|
|
132
132
|
scanning: '正在扫描 {label}…',
|
|
133
133
|
skillsSuffix: '个技能',
|
|
134
|
-
noExecutors: '
|
|
134
|
+
noExecutors: '本机未发现任何智能体工具目录',
|
|
135
135
|
dirMissingTitle: '{label}:目录不存在',
|
|
136
136
|
dirMissingHint: '预期位置 {dir}',
|
|
137
137
|
notFoundGroup: '本机不存在的来源({n})',
|
|
@@ -178,10 +178,10 @@ const ZH = {
|
|
|
178
178
|
const EN = {
|
|
179
179
|
title: 'Skills Market',
|
|
180
180
|
close: 'Close',
|
|
181
|
-
tabExecutors: '
|
|
181
|
+
tabExecutors: 'Installed',
|
|
182
182
|
tabMarket: 'Market',
|
|
183
183
|
tabSources: 'Sources',
|
|
184
|
-
cardsHint: 'Pick an
|
|
184
|
+
cardsHint: 'Pick an agent tool to browse its skills, or view everything at once',
|
|
185
185
|
marketCardsHint: 'Pick a source repo to browse its skills, or view everything at once',
|
|
186
186
|
marketLoading: 'Loading market catalog…',
|
|
187
187
|
marketSettings: 'Market Settings',
|
|
@@ -229,16 +229,16 @@ const EN = {
|
|
|
229
229
|
showMore: 'Show more ({n} left)',
|
|
230
230
|
browseAll: 'Browse all skills',
|
|
231
231
|
refresh: 'Refresh',
|
|
232
|
-
backCards: '←
|
|
233
|
-
backExecutors: '←
|
|
232
|
+
backCards: '← Agent tool cards',
|
|
233
|
+
backExecutors: '← Installed',
|
|
234
234
|
backAll: '← All skills',
|
|
235
235
|
searchAll: 'Search all skills…',
|
|
236
236
|
filterWithin: 'Filter within {label}…',
|
|
237
|
-
pickSource: 'All
|
|
238
|
-
loadingCatalogs: 'Loading all
|
|
237
|
+
pickSource: 'All agent tools',
|
|
238
|
+
loadingCatalogs: 'Loading all agent tool catalogs…',
|
|
239
239
|
scanning: 'Scanning {label}…',
|
|
240
240
|
skillsSuffix: 'skills',
|
|
241
|
-
noExecutors: 'No
|
|
241
|
+
noExecutors: 'No agent tool directories found on this machine',
|
|
242
242
|
dirMissingTitle: '{label}: directory not found',
|
|
243
243
|
dirMissingHint: 'Expected skills at {dir}',
|
|
244
244
|
notFoundGroup: 'Not found on this machine ({n})',
|
|
@@ -417,6 +417,10 @@ const STYLE = `<style>
|
|
|
417
417
|
.sk-input:focus{border-color:var(--dsw-alias-state-business-primary)}
|
|
418
418
|
.sk-input::placeholder{color:var(--dsw-alias-label-tertiary)}
|
|
419
419
|
.sk-toast{position:fixed;left:50%;bottom:28px;transform:translateX(-50%);z-index:40;background:var(--dsw-alias-bg-layer-3);color:var(--dsw-alias-label-primary);border:1px solid var(--dsw-alias-border-l2);border-radius:999px;padding:8px 18px;font-size:13px;box-shadow:var(--dsw-shadow-lv2)}
|
|
420
|
+
.sk-menu{position:absolute;top:100%;left:0;margin-top:4px;min-width:220px;max-height:340px;overflow:auto;background:var(--dsw-alias-bg-layer-3);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;box-shadow:var(--dsw-shadow-lv2,var(--dsw-shadow-lv1));z-index:2147483600;padding:4px}
|
|
421
|
+
.sk-menu-item{padding:8px 12px;border-radius:8px;cursor:pointer;color:var(--dsw-alias-label-primary);font-size:13px;white-space:nowrap}
|
|
422
|
+
.sk-menu-item:hover{background:var(--dsw-alias-interactive-bg-hover)}
|
|
423
|
+
.sk-menu-item.on{color:var(--dsw-alias-state-business-primary);font-weight:500}
|
|
420
424
|
.sk-tabpill{background:transparent;border:none;color:var(--dsw-alias-label-secondary);font-family:var(--dsw-font-family)}
|
|
421
425
|
</style>`
|
|
422
426
|
|
|
@@ -447,37 +451,30 @@ function Avatar({ name, square, size }) {
|
|
|
447
451
|
(name[0] || '?').toUpperCase())
|
|
448
452
|
}
|
|
449
453
|
|
|
450
|
-
/** Executor dropdown
|
|
454
|
+
/** Executor dropdown: self-contained popover (host primitives expose no Menu). */
|
|
451
455
|
function SourceFilter({ rows, value, onChange, t }) {
|
|
452
456
|
const [open, setOpen] = useState(false)
|
|
453
|
-
const
|
|
457
|
+
const items = [
|
|
458
|
+
{ id: 'all', label: `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})` },
|
|
459
|
+
...rows.map(x => ({ id: x.key, label: `${x.label} (${x.skillCount})` })),
|
|
460
|
+
]
|
|
454
461
|
const current = value === 'all' ? null : rows.find(r => r.key === value)
|
|
455
462
|
const label = value === 'all'
|
|
456
463
|
? `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})`
|
|
457
464
|
: `${current ? current.label : value} (${current ? current.skillCount : 0})`
|
|
458
|
-
return h('span', {
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
align: 'start',
|
|
472
|
-
items: [
|
|
473
|
-
{ id: 'all', label: `${t('pickSource')} (${rows.reduce((a, r) => a + r.skillCount, 0)})` },
|
|
474
|
-
...rows.map(x => ({ id: x.key, label: `${x.label} (${x.skillCount})` })),
|
|
475
|
-
],
|
|
476
|
-
selectedId: value,
|
|
477
|
-
onSelect: (id) => { onChange(id); setOpen(false) },
|
|
478
|
-
onClose: () => setOpen(false),
|
|
479
|
-
})
|
|
480
|
-
: null)
|
|
465
|
+
return h('span', { style: { position: 'relative', display: 'inline-flex' } },
|
|
466
|
+
h(P.Button, { variant: 'outline', size: 'sm',
|
|
467
|
+
onClick: () => setOpen(o => !o), title: label },
|
|
468
|
+
label,
|
|
469
|
+
P.IconChevronDownOutline14 ? h(P.IconChevronDownOutline14, { size: 12 }) : ' ▾'),
|
|
470
|
+
open && h('div', { className: 'sk-menu' },
|
|
471
|
+
items.map(item => h('div', {
|
|
472
|
+
key: item.id,
|
|
473
|
+
className: 'sk-menu-item' + (item.id === value ? ' on' : ''),
|
|
474
|
+
role: 'button', tabIndex: 0,
|
|
475
|
+
onClick: () => { onChange(item.id); setOpen(false) },
|
|
476
|
+
onKeyDown: e => { if (e.key === 'Enter' || e.key === ' ') { onChange(item.id); setOpen(false) } },
|
|
477
|
+
}, item.label))))
|
|
481
478
|
}
|
|
482
479
|
|
|
483
480
|
// ── Skill / executor cards ───────────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weibaohui/skills-management",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.1.4",
|
|
4
|
+
"description": "dsh 插件 · 技能市场:一个页面管理本机所有 coding agent 的技能(Claude、ZCode、Codex 等十余个执行器),一键收编进 DSH 用户库供 skill 工具调用;内置 6600+ ntd 技能市场可浏览搜索安装,支持模型可见性治理与市场每日自动同步。",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"dsh",
|