Chuyển đến nội dung chính

dsh-done

Đã xác minh

dsh-done · v0.1.0 · MIT · Giao diện web

Task completion celebration popup with sound for DeepSeek Harness · 任务完成后弹出庆祝弹窗并播放音效

Cài đặt

dsh plugin add dsh-done

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Thẻ

Tác giả

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.tslib/index.js
  • Client 打包:src/client/index.tsxlib/client.js

发布 / 分发

  • 发布到 npm,并给 GitHub 仓库打上 dsh-plugin topic,方便 DSH 用户发现。
  • 若要进入插件市场列表,请到对应的社区精选列表仓库提 PR。

工作原理

  • Hostsrc/index.ts):监听 agent/status,当状态为 idle 时记录完成时间戳;提供 celebration/check RPC。
  • Clientsrc/client/index.tsx):每 500 ms 轮询 celebration/check;检测到新完成时在 shell.overlay 弹出弹窗。

运行时适配(重要)

本插件作为静态 bundle(通过 {id, name} 经 Loader 加载)安装,因此使用 webServer 路由方案实现 Host↔Client 通信(harness/host bridge 仅存在于动态 Cordis 插件沙箱,静态包的 ctx 上不可用):

  • Hostsrc/index.ts):inject: ['webServer']ctx.effect(() => ctx.webServer.register({ kind: 'exact', path: '/dsh-done/check', handler })) 注册 HTTP 路由。
  • Clientsrc/client/index.tsx):每 500 ms fetch('/dsh-done/check?since=…') 轮询;检测到新完成时在 shell.overlay 弹出弹窗,同时在侧边栏注册 sidebar.footer.action(🎉 手动触发按钮)。

安装后重启 profile 使 host 路由生效;client bundle 由 dsh-client-modules 动态提供,刷新页面即可。

许可

MIT