dsh-client-ui-skill-fuzzy
No description
- Stars
- 1
- Language
- JavaScript
- Created
- Aug 18, 2026
- Updated
- Aug 18, 2026
Introduction
dsh-client-ui-skill-fuzzy
DeepSeek Harness 的 web 端技能引用插件:把聊天框 / 菜单里的 skill 候选从前缀过滤(startsWith)升级为 fzf 风格模糊匹配,行为与命令面板(/)完全一致——大小写不敏感、子序列匹配、前缀/边界加分排序。
作为 @deepseek-ai/dsh-client-ui-skill 的 drop-in 替代品,node half 为空、浏览器 half 复用其实现,仅替换候选过滤逻辑(fuzzyScore / boundaryBonus 提取自命令面板源码)。
效果示例
| 输入 | 内置(前缀) | 本插件(模糊) |
|---|---|---|
/rpa | 空 | yingdao-rpa → ecommerce-rpa-toolkit → karpathy-guidelines |
/ecrpa | 空 | ecommerce-rpa-toolkit |
/commit | commit-and-push-all | commit-and-push-all → conventional-commit → … |
目录结构
lib/
index.js # node half(无宿主行为)
client.js # 浏览器 half:candidates() 用 fuzzyScore 过滤
package.json
安装
方式 A:自动安装(推荐)
用 dsh 的插件命令(转发到 pnpm)安装到 web profile:
dsh plugin --profile web add "git+https://github.com/CnsMaple/dsh-client-ui-skill-fuzzy.git"
安装后确认依赖已登记:
cd ~/.dsh/profiles/web && pnpm ls dsh-client-ui-skill-fuzzy
后续更新版本:
dsh plugin --profile web up dsh-client-ui-skill-fuzzy
注意:
dsh plugin add只负责把包装进profiles/web/node_modules并在package.json登记依赖,不会自动修改 cordis.patch.yml,仍需完成下面的「公共步骤」。
若本机 pnpm 报 lockfile / peer 冲突(如既有
dsh-mobile依赖导致 ERESOLVE),可先提交 lockfile 变更或改用方式 B。
方式 B:手动安装
- 把本包放入
profiles/web/node_modules/dsh-client-ui-skill-fuzzy/(或用pnpm add的等价手动方式)。 - 在
profiles/web/package.json的 dependencies 中登记:
"dsh-client-ui-skill-fuzzy": "git+https://github.com/CnsMaple/dsh-client-ui-skill-fuzzy.git"
公共步骤(两种方式都要)
- 在
profiles/web/cordis.patch.yml:
# ===== 自定义 ui-skill:模糊候选 =====
- id: ui-skill
name: '@deepseek-ai/dsh-client-ui-skill'
disabled: true
- insert:
- id: ui-skill-fuzzy
name: dsh-client-ui-skill-fuzzy
- 重启
dsh --profile web,__DSH_BOOT__中应出现dsh-client-ui-skill-fuzzy且不再有内置@deepseek-ai/dsh-client-ui-skill;聊天框输入/ecrpa应命中 ecommerce-rpa-toolkit。
注意
- 与命令面板一致:输入含空格(如
/meegle b)不匹配;仅匹配技能名称,不匹配描述。 exports必须暴露./package.json子路径,否则dsh-client-modules的require.resolve('<pkg>/package.json')报ERR_PACKAGE_PATH_NOT_EXPORTED导致插件不进 boot。
License
MIT