dsh-done
Verifieddsh-done · v0.1.0 · MIT · Web UI
Task completion celebration popup with sound for DeepSeek Harness · 任务完成后弹出庆祝弹窗并播放音效
Install
dsh plugin add dsh-done Confirm the layer applied with dsh --profile default --dump-config — see the install guide.
Source
Tags
Creators
Readme
dsh-done
面向 DeepSeek Harness 的任务完成庆祝弹窗插件。
当 agent 完成一个任务(状态从 running 变为 idle)时,页面会弹出庆祝弹窗(彩纸 + 音效),随后自动关闭。
功能
- 🎉 在
shell.overlay槽位弹出全屏庆祝弹窗 - 🎊 彩纸飘落 + 弹入动画
- 🔊 Web Audio 实时合成庆祝音效(上升音阶 C5-E5-G5-C6),无需外部音频文件
- ⏳ 约 3.2 秒后自动消失
- 🎲 每次完成随机显示不同的鼓励语
安装
dsh plugin --profile web add dsh-done
或从本地代码目录安装:
dsh plugin --profile web add /path/to/dsh-done
安装后请 重启 profile。
构建(给贡献者)
pnpm install
pnpm run build # tsc(host)+ tsdown(client 打包)
pnpm publish
- Host 入口:
src/index.ts→lib/index.js - Client 打包:
src/client/index.tsx→lib/client.js
发布 / 分发
- 发布到 npm,并给 GitHub 仓库打上
dsh-plugintopic,方便 DSH 用户发现。 - 若要进入插件市场列表,请到对应的社区精选列表仓库提 PR。
工作原理
- Host(
src/index.ts):监听agent/status,当状态为idle时记录完成时间戳;提供celebration/checkRPC。 - Client(
src/client/index.tsx):每 500 ms 轮询celebration/check;检测到新完成时在shell.overlay弹出弹窗。
运行时适配(重要)
本插件作为静态 bundle(通过 {id, name} 经 Loader 加载)安装,因此使用 webServer 路由方案实现 Host↔Client 通信(harness/host bridge 仅存在于动态 Cordis 插件沙箱,静态包的 ctx 上不可用):
- Host(
src/index.ts):inject: ['webServer'],ctx.effect(() => ctx.webServer.register({ kind: 'exact', path: '/dsh-done/check', handler }))注册 HTTP 路由。 - Client(
src/client/index.tsx):每 500 msfetch('/dsh-done/check?since=…')轮询;检测到新完成时在shell.overlay弹出弹窗,同时在侧边栏注册sidebar.footer.action(🎉 手动触发按钮)。
安装后重启 profile 使 host 路由生效;client bundle 由 dsh-client-modules 动态提供,刷新页面即可。
许可
MIT