lishLRF/DSH-desktop-pet--packages-dsh-plugin ↗★ 1
dsh-desktop-pet
DSH plugin: a desktop pet that mirrors DSH work state in real time and shows task-completion bubbles, with a companion Electron pet window.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:lishLRF/DSH-desktop-pet#0e9e9a740ff633d2124d340b1759d861686612e0&path:packages/dsh-plugin说明文档
阅读完整 README ↗dsh-desktop-pet(DSH 插件)
DSH 桌面宠物的插件半边:Host 状态机 + HTTP/WebSocket 桥 + Client 设置卡片。
组成
- Host 半边(
src/index.ts)- 订阅 DSH 事件(
agent/status、tools/execute、subagent/*、workflow/*、goal/changed、approval/request、agent/error、agent/turn-stopping),派生 9 个状态。 - 经
webServer注册GET/POST /desktop-pet/config、GET /desktop-pet/health、WS /desktop-pet/ws。 - 配置持久化到
~/.dsh/desktop-pet/config.json。
- 订阅 DSH 事件(
- Client 半边(
src/client/*)- 注册
settings.plugin.item卡片(「设置 → 插件 → 插件配置 → 桌面宠物」)。 - 通过同源 fetch 读写
/desktop-pet/config。
- 注册
构建
pnpm build # lib/index.js(host)+ lib/client.js(browser)
pnpm typecheck
pnpm test
Host 半边对 DSH monorepo 无运行时依赖(ws 为唯一运行时依赖);Client bundle 将 react /
react/jsx-runtime 作为 external,其余全部内联。
安装
见仓库根 README.md 的「安装与部署」。