dsh-skill-picker 0.2.2 → 0.3.1

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/README.md +30 -19
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,11 +1,24 @@
1
1
  # dsh-skill-picker
2
2
 
3
+ [![npm version](https://img.shields.io/npm/v/dsh-skill-picker.svg)](https://www.npmjs.com/package/dsh-skill-picker)
4
+ [![license](https://img.shields.io/npm/l/dsh-skill-picker.svg)](https://github.com/a735624258/dsh-skill-picker/blob/main/LICENSE)
5
+
3
6
  > **技能记不住名字?官方 `/` 补全靠前缀记忆,装了几十个技能谁记得住?** 本插件让技能**看得见、翻得到、选得快**——点一下 ⚡,全部技能带描述排在你面前,搜索、点选、插入,随消息发出自动加载。
4
7
 
8
+ ## ⚡ 快速安装(npm)
9
+
10
+ ```sh
11
+ dsh plugin --profile web add dsh-skill-picker
12
+ ```
13
+
14
+ 一条命令从 npm 装好并注入 DSH web profile,重启 `dsh web`(或刷新页面)即生效。源码方式见下文 [安装](#安装)。
15
+
5
16
  DSH Web GUI 的技能选择器:在输入框(composer)工具行右侧加一个按钮,点开可以**搜索并点选已安装的技能**,选中后把官方 `/技能名` 手势插入发送框——随消息一起发出,DSH 原生机制就会自动加载该技能并执行。WorkBuddy 式"把技能写进发送框"的交互,DeepSeek Harness 复刻版。
6
17
 
7
18
  English: A skill picker for the DSH Web GUI — a button in the composer's right tool row opens a searchable list of installed skills; picking one inserts the official `/skill-name` gesture into the draft, so DSH's native user-invocation path loads the skill with your message.
8
19
 
20
+ 当前版本:**v0.3.1**(`/` 补全 + ⚡ 面板均支持**拼音搜索**)
21
+
9
22
  ## 为什么用它(vs 官方 `/` 补全)
10
23
 
11
24
  官方内置了 `/` 技能补全,但它是**记忆驱动**的——你得先记得技能名,打 `/` + 前缀才能过滤出来。技能一多就抓瞎:
@@ -14,6 +27,7 @@ English: A skill picker for the DSH Web GUI — a button in the composer's right
14
27
  |---|---|---|
15
28
  | 触发 | 输入框打 `/` | 输入框旁 ⚡ 按钮 |
16
29
  | 查找方式 | 前缀记忆驱动,**忘了名字就找不到** | 全列表浏览 + 关键字搜索,**忘了名字也能翻到** |
30
+ | 中文技能 | 只能打名字/前缀 | **拼音直搜**:`ji yi` / `jiyi` / `jy` 都能搜到「备份记忆」类中文技能(v0.3.0) |
17
31
  | 排序 | 固定 | **最近使用置顶、常用靠前** |
18
32
  | 描述可见 | 精简 | 完整描述一眼看全 |
19
33
 
@@ -23,13 +37,14 @@ English: A skill picker for the DSH Web GUI — a button in the composer's right
23
37
 
24
38
  - ⚡ 一键弹出全部技能(闪电图标,人人看得懂)
25
39
  - **`/` 直接补全**:输入斜杠即列出全部技能,**模糊搜索**(技能名+描述任意匹配)+ **常用排序**(v0.2.0)
26
- - 🔍 实时搜索(技能名 / 描述都搜)
40
+ - 🔤 **拼音搜索**:技能名和描述都生成拼音索引(全拼带空格 `ji yi` / 连打 `jiyi` / 首字母 `jy`),中文技能不用记字就能搜(v0.3.0)
41
+ - 🔍 实时搜索(技能名 / 描述 / 拼音都搜)
27
42
  - ⌨️ **键盘导航**:弹层内 ↑↓ 选择、Enter 插入、Esc 关闭,全程不碰鼠标(v0.2.2)
28
43
  - 🧠 **最近使用置顶、常用靠前**的智能排序(WorkBuddy 同款)
29
44
  - 📋 走官方宿主 skills API(与 DSH 内置 `/` 补全同一数据源,自动覆盖用户级+项目级技能)
30
45
  - 🧩 插入官方 `/技能名` 手势,加载/执行走 DSH 原生机制,**零 agent 侧改动**
31
46
  - 🎨 跟随 Web UI 主题(CSS 变量),浅色/深色自适应
32
- - 📦 纯 client + host 双半插件,无第三方运行时依赖
47
+ - 📦 纯 client + host 双半插件(拼音库已打包进 client bundle,无额外运行时安装)
33
48
 
34
49
  ## 安装
35
50
 
@@ -45,7 +60,7 @@ dsh plugin --profile web add "github:a735624258/dsh-skill-picker"
45
60
  dsh plugin --profile web add dsh-skill-picker
46
61
  ```
47
62
 
48
- > 注:已发布 npm(`npm view dsh-skill-picker` 可见 0.2.0+),方式三可直接安装;未发布时请用方式一或方式二。
63
+ > 注:已发布 npm(`npm view dsh-skill-picker` 可见 0.3.0),方式三可直接安装;未发布时请用方式一或方式二。
49
64
  > 若 `dsh` 命令因 PowerShell 执行策略被拒(`File ... cannot be loaded`),用:
50
65
  > `powershell -ExecutionPolicy Bypass -Command "dsh plugin --profile web add link:C:\path\to\dsh-skill-picker"`
51
66
 
@@ -54,11 +69,11 @@ dsh plugin --profile web add dsh-skill-picker
54
69
  ## 用法
55
70
 
56
71
  1. 打开任一会话,在输入框工具行右侧找到**⚡ 按钮**
57
- 2. 点击弹出技能列表(可输入关键字过滤)
72
+ 2. 点击弹出技能列表(可输入关键字或**拼音**过滤,如 `ji yi` 搜「记忆」)
58
73
  3. **↑↓** 选择、**Enter** 插入(或直接鼠标点选)→ 发送框自动出现 `/技能名 `
59
74
  4. 继续输入你的话并发送——DSH 会识别 `/技能名` 手势,自动加载该技能并按其指令执行
60
75
 
61
- 示例:点选 `duo-xuan-pi-gai` 后发送框变为 `/duo-xuan-pi-gai 帮我批改多选`,发送后技能自动加载。
76
+ 示例:点选 `duo-xuan-pi-gai` 后发送框变为 `/duo-xuan-pi-gai 帮我批改多选`,发送后技能自动加载。也可以在输入框直接打 `/duo xuan`、`/duoxuan` 靠拼音补全选到它。
62
77
 
63
78
  ## 原理
64
79
 
@@ -76,20 +91,16 @@ DSH 的 [dsh-tool-skill](https://github.com/deepseek-ai/deepseek-harness) 在 `a
76
91
  [DSH] agent/pre-step 识别手势 → 自动加载技能 → 执行
77
92
  ```
78
93
 
79
- - client 半:注册到官方 `conversation.input.right` 插槽(composer 工具行、发送按钮左侧的控件位),**技能列表优先走官方宿主 skills API**(`connection.api.skills.list`——与 DSH 内置 `/` 补全同源,会话作用域,自动含用户级/项目级技能),失败时回退到 host 扫描路由;插入文本走框架输入机的 `inputActions.setDraft`(单一路径,撤销/草稿持久化自动处理);最近/常用排序存 localStorage
80
-
81
- ## 与官方 `/` 补全的关系
82
-
83
- DSH 官方已内置技能补全:在输入框输入 `/` 会弹出技能菜单,按前缀过滤(如输入 `/sk` 列出 skill 开头的技能)。本插件不替代它,而是补上官方方案的盲区:
94
+ - client 半:注册到官方 `conversation.input.right` 插槽(composer 工具行、发送按钮左侧的控件位),**技能列表优先走官方宿主 skills API**(`connection.api.skills.list`——与 DSH 内置 `/` 补全同源,会话作用域,自动含用户级/项目级技能),失败时回退到 host 扫描路由;插入文本走框架输入机的 `inputActions.setDraft`(单一路径,撤销/草稿持久化自动处理);最近/常用排序 + 拼音索引(`pinyin-pro`)在 client 侧生成,按技能缓存
84
95
 
85
- | | 官方 `/` 补全 | dsh-skill-picker |
86
- |---|---|---|
87
- | 触发 | 输入框打 `/` | 输入框旁 ⚡ 按钮 |
88
- | 查找方式 | **前缀记忆驱动**——需要先记得技能名才能打出来 | **全列表浏览 + 关键字搜索**——忘了名字也能翻到 |
89
- | 排序 | 固定顺序 | 最近使用置顶、常用靠前(localStorage) |
90
- | 适合场景 | 记得名字的老手 | 技能多、记不全名字、想翻着选的人 |
96
+ ## 更新日志
91
97
 
92
- 一句话:**记得名字用官方,忘了名字用本插件**。两者互补,可同时使用。
98
+ - **v0.3.1**:README 顶部新增一键快速安装命令(`dsh plugin --profile web add dsh-skill-picker`)与 npm 版本/许可徽章
99
+ - **v0.3.0**:拼音搜索——`/` 补全与 ⚡ 面板的搜索目标加入技能名/描述的拼音全拼(带空格+连打)与首字母索引,中文技能可拼音直搜(如 `ji yi` →「备份记忆」)
100
+ - **v0.2.2**:⚡ 弹层键盘导航(↑↓ 选择、Enter 插入、Esc 关闭);按钮盒 28×28 → 24×24,闪电图标 16px(对应 issue #1、#4)
101
+ - **v0.2.1**:声明兼容 DSH 0.1.2-alpha 系列
102
+ - **v0.2.0**:注册为 `/` 补全候选源(fuzzysort 模糊匹配 + 最近/常用排序,排序规则与 ⚡ 面板统一)
103
+ - **v0.1.0**:初版——⚡ 按钮弹窗搜索点选技能
93
104
 
94
105
  ## 兼容性与注意事项
95
106
 
@@ -101,7 +112,7 @@ DSH 官方已内置技能补全:在输入框输入 `/` 会弹出技能菜单
101
112
  ## 开发
102
113
 
103
114
  ```sh
104
- # 安装依赖(提供 esbuild)
115
+ # 安装依赖(提供 esbuild / fuzzysort / pinyin-pro
105
116
  npm install
106
117
 
107
118
  # 构建(源码 src/ → 产物 lib/;client 半自动包 __ModuleLoader__ 握手)
@@ -141,7 +152,7 @@ dsh-skill-picker/
141
152
  ## 依赖
142
153
 
143
154
  - host:`@deepseek-ai/cordis`、`@deepseek-ai/dsh-host-webserver`、`@deepseek-ai/dsh-skill`、`@deepseek-ai/dsh-system-prompt`
144
- - client:`@deepseek-ai/dsh-client-runtime`、`@deepseek-ai/dsh-client-ui-slots`、`react`
155
+ - client:`@deepseek-ai/dsh-client-runtime`、`@deepseek-ai/dsh-client-ui-slots`、`react`、`pinyin-pro`(拼音索引,打包进 client bundle)
145
156
 
146
157
  ## License
147
158
 
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.2.2",
4
+ "version": "0.3.1",
5
5
  "type": "module",
6
6
  "main": "lib/index.js",
7
7
  "exports": {