dsh-skill-picker 0.5.23 → 0.5.24
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 -0
- package/lib/client.js +7 -27
- package/lib/client.js.map +2 -2
- package/package.json +1 -1
- package/src/client/index.jsx +20 -34
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-skill-picker",
|
|
3
3
|
"description": "DSH Web GUI skill picker: a button beside the composer opens a searchable list of installed skills; picking one inserts the official `/skill-name` gesture into the input box, so the skill loads with your message (WorkBuddy-style skill invocation for DeepSeek Harness).",
|
|
4
|
-
"version": "0.5.
|
|
4
|
+
"version": "0.5.24",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "lib/index.js",
|
|
7
7
|
"exports": {
|
package/src/client/index.jsx
CHANGED
|
@@ -409,26 +409,6 @@ const menuItemStyle = {
|
|
|
409
409
|
whiteSpace: 'nowrap',
|
|
410
410
|
}
|
|
411
411
|
|
|
412
|
-
/** Lightweight source badge shown only when the list came from the host scan fallback (official API unavailable). */
|
|
413
|
-
const sourceBadgeStyle = {
|
|
414
|
-
display: 'inline-flex',
|
|
415
|
-
alignItems: 'center',
|
|
416
|
-
alignSelf: 'flex-start',
|
|
417
|
-
margin: '0 8px 8px',
|
|
418
|
-
padding: '2px 8px',
|
|
419
|
-
border: '1px solid rgba(255, 193, 7, 0.35)',
|
|
420
|
-
borderRadius: '999px',
|
|
421
|
-
background: 'rgba(255, 193, 7, 0.1)',
|
|
422
|
-
color: '#d9a520',
|
|
423
|
-
fontSize: '11px',
|
|
424
|
-
lineHeight: '16px',
|
|
425
|
-
flex: 'none',
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
const sourceBadgeTextStyle = {
|
|
429
|
-
fontFamily: 'var(--ds-font-family-code, ui-monospace, monospace)',
|
|
430
|
-
}
|
|
431
|
-
|
|
432
412
|
/** The picker's bolt glyph: DeepSeek palette gradient + slim stroke. */
|
|
433
413
|
function BoltIcon() {
|
|
434
414
|
return (
|
|
@@ -670,6 +650,25 @@ function SkillPickerButton(props) {
|
|
|
670
650
|
}
|
|
671
651
|
}, [menu])
|
|
672
652
|
|
|
653
|
+
/**
|
|
654
|
+
* The panel used to show "本地扫描" / "/ 增强:运行时接管" as badges under the
|
|
655
|
+
* list. They are diagnostics for whoever is debugging, not something a user
|
|
656
|
+
* needs on screen — they occupied two rows and said nothing useful day to day
|
|
657
|
+
* (国豪's call, and he was right).
|
|
658
|
+
*
|
|
659
|
+
* They are not simply dropped: "the plugin is fine" and "the plugin is not
|
|
660
|
+
* running at all" look identical without them, which is the whole lesson
|
|
661
|
+
* behind issue #14. So they moved here (one console line per panel open) and
|
|
662
|
+
* into the ⚡ button's tooltip.
|
|
663
|
+
*/
|
|
664
|
+
useEffect(() => {
|
|
665
|
+
if (skills === undefined) return
|
|
666
|
+
console.info(
|
|
667
|
+
`[dsh-skill-picker] 技能列表 ${skills.length} 条,来源:${source === 'host' ? '本地扫描(官方 skills API 不可用)' : '官方 API'}`
|
|
668
|
+
+ `;/ 增强:${slashEnhancementMode() === 'runtime' ? '运行时接管,已生效' : '未生效(见 issue #14)'}`,
|
|
669
|
+
)
|
|
670
|
+
}, [skills, source])
|
|
671
|
+
|
|
673
672
|
const toggle = () => {
|
|
674
673
|
if (!open) {
|
|
675
674
|
// Pull first: a pin or a pick made on another client (desktop ↔ web ↔
|
|
@@ -782,7 +781,7 @@ function SkillPickerButton(props) {
|
|
|
782
781
|
<button
|
|
783
782
|
type="button"
|
|
784
783
|
onClick={toggle}
|
|
785
|
-
title=
|
|
784
|
+
title={`选择技能(插入 /技能名 到发送框)${source === 'host' ? ' · 列表来自本地扫描' : ''}${slashEnhancementMode() === 'runtime' ? ' · / 增强:运行时接管' : ''}`}
|
|
786
785
|
aria-label="选择技能"
|
|
787
786
|
style={{
|
|
788
787
|
...buttonStyle,
|
|
@@ -998,19 +997,6 @@ function SkillPickerButton(props) {
|
|
|
998
997
|
))}
|
|
999
998
|
</div>
|
|
1000
999
|
)}
|
|
1001
|
-
{source === 'host' && (
|
|
1002
|
-
<div style={sourceBadgeStyle} title="官方技能 API 不可用,列表来自本地目录扫描(与官方 / 补全同源)">
|
|
1003
|
-
<span style={sourceBadgeTextStyle}>本地扫描</span>
|
|
1004
|
-
</div>
|
|
1005
|
-
)}
|
|
1006
|
-
{slashEnhancementMode() === 'runtime' && (
|
|
1007
|
-
<div
|
|
1008
|
-
style={sourceBadgeStyle}
|
|
1009
|
-
title="`/` 菜单的模糊+拼音搜索由本插件在运行时接管官方技能源(不依赖改写任何文件,issue #14)"
|
|
1010
|
-
>
|
|
1011
|
-
<span style={sourceBadgeTextStyle}>/ 增强:运行时接管</span>
|
|
1012
|
-
</div>
|
|
1013
|
-
)}
|
|
1014
1000
|
<div style={{ margin: '0 10px 8px', fontSize: '11px', color: 'var(--dsw-alias-label-tertiary, #8a94a6)' }}>
|
|
1015
1001
|
右键技能 = 置顶 / 关闭 / 定位 / 卸载(手机长按)
|
|
1016
1002
|
</div>
|