dsh-plugin-client
Skill4 starsChanged 3 months agoMITView on GitHub
开发 DSH 插件的 client 半端(浏览器 UI)时使用:按已验证的 slot 与标准-kit 契约注册界面、双目标构建并包装客户端 bundle。
1 other project uses a version of this.
Adopted by
Most recently taken up by
- xun404/dsh-pihuo-pluginstheir own version, first seen Aug 15, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 1
- xun404/dsh-pihuo-plugins★ 2same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository18 other files it gives its agents.
- dsh-changelogSkill
- dsh-chinese-docsSkill
- dsh-code-reviewSkill
- dsh-debug-sessionSkill
- dsh-dependency-auditSkill
- dsh-doc-syncSkill
- dsh-git-commitSkill
- dsh-office-artifactsSkill
- dsh-plugin-devSkill
- dsh-plugin-i18nSkill
- dsh-plugin-publishSkill
- dsh-preset-authoringSkill
- dsh-pr-reviewSkill
- dsh-refactor-safeSkill
- dsh-skill-adapterSkill
- dsh-task-breakdownSkill
- dsh-test-firstSkill
- dsh-webapp-testingSkill
The file
Files
DSH 插件 client 半端(依据官方包实现与 dsh-voice-input 实战验证)
包结构
package.json:exports加"./client": "./lib/client/index.js";dsh.client声明{ "platform": "web", "inject": [...] }inject按需列出依赖的 client 插件:@deepseek-ai/dsh-client-runtime(slots)、@deepseek-ai/dsh-client-locale(i18n)、以及插槽声明方(如@deepseek-ai/dsh-client-ui-conversation、@deepseek-ai/dsh-client-ui-settings)- client 源码放
src/client/index.ts,导出export const inject = ['slots']与export function apply(ctx)
注册 UI(slots 契约)
ctx.slots.inject('conversation.input.right', () => ctx.slots.register({
name: 'conversation.input.right', // 插槽名(single/list/chain 由声明方定)
id: 'my-button',
order: 10,
locale: 'my.ns', // 可选:声明后组件收到 t()
}, MyComponent))- 组件自动收到「标准 kit」:全局
useSessions/useWorkspaces;会话级useSession、useInput(draft 快照)、inputActions(setDraft/submit/…);以及sessionId、useProjection、renderSlot、t - 常用插槽:
settings.plugins.tab(设置页标签)、conversation.input.left/right(输入条按钮区)、tool.call.toolview(工具调用视图,keyed 注册)、conversation.composer.dock
构建(tsup 双目标)
// tsup.config.ts:host 半端
{ entry: { 'host/index': 'src/host/index.ts' }, format: ['esm'], platform: 'node' }
// client 半端
{ entry: { 'client/index': 'src/client/index.ts' }, format: ['cjs'], platform: 'browser',
external: ['react', 'react-dom'] }- 构建后必须按官方 client-modules 协议包装:
window.__ModuleLoader__.load({ id: '<包名>', factory: (require) => { ...CJS... } })(react 由宿主加载器提供,不打进 bundle) - 自测:Node 里 mock
window.__ModuleLoader__执行 bundle,断言apply/inject导出与注册发生
安装与调试
file:协议是复制安装,改代码必须重装;link:协议建 Junction 指向本地目录,改源码即时生效(开发推荐)- 验证 client 已加载:刷新页面看 UI 是否出现;host 加健康路由
GET /<prefix>/health排查;页面 HTML 的 client 清单里应出现"id":"<包名>"与rev - 页面清单不更新 = 服务端未重启(rev 是启动时计算的);改 lib 后重启 dsh
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

