Bundle
dsh-done-badge
Background task completion badge for DSH: native Windows taskbar counter while the window is away, auto-clears on return.
- Source
- SkuraSshly
- stars
- 1 stars
- License
- MIT
- Updated
- Updated 6 days ago
Readme
# dsh-done-badge DSH 任务完成角标插件(ChatGPT/Codex 风格):窗口最小化/离开期间,每完成一个**顶层任务**(一轮对话/任务完成),Windows 任务栏 DSH 图标右下角显示**红色数字角标**(1、2、3…实时累积);切回主界面后角标短暂保留 2 秒即消失清零。窗口内右上角 DOM 角标作为兜底(浏览器版/macOS 可用)。  **平台**:Windows(任务栏角标走 Windows 原生 `ITaskbarList3::SetOverlayIcon`);macOS 暂不支持原生角标,仅窗口内 DOM 角标。 ## 特性 - 离开期间任务完成 → 任务栏角标持续显示,数量实时累积; - **子代理会话不计入**:一个任务启动多个子代理只 +1; - 切回主界面 → 角标保留 2 秒让人看清,然后消失,不再冒出; - 串行更新队列:角标不会因 PowerShell 完成乱序而留下旧值; - 零依赖:只使用系统自带 PowerShell,无需安装任何运行时。 ## install ```sh # 本地源码安装(推荐开发用): dsh plugin --profile web add link:<无空格路径>/dsh-done-badge # 或 npm 发布后: dsh plugin --profile web add dsh-done-badge ``` 重启 dsh web / 桌面应用后生效。 ## usage 1. 发消息 → **最小化/切走** DSH; 2. 后台每完成一个任务,任务栏 DSH 图标出现**红色数字角标**(完成几个显示几,持续显示); 3. **切回主界面** → 角标保留约 2 秒后消失、计数清零。 ## how it works - **服务端**:监听 `session/event` 的 `turn/end`,**只统计顶层会话**(`header.parentSession` 存在即子代理,跳过);离开期间每完成一轮,经**串行队列**调用 `assets/badge.ps1`(PowerShell,零依赖)通过 `ITaskbarList3::SetOverlayIcon` 更新任务栏角标; - **客户端**:`blur`/`hidden` → 进入角标模式(服务端状态迁移,重复事件不重复清零);`focus`/`visible` → 2 秒后清除 + 清零; - **窗口定位**:按窗口标题 `Deepseek Harness Desktop` 枚举定位主窗口(最小化时 `MainWindowHandle` 会误选内部窗口,不能依赖); - **兜底**:窗口内右上角 DOM 红色数字角标(1.2s 轮询),浏览器版 / macOS 同样可用。 ## 诊断 任务栏角标未出现时,查看: ``` %TEMP%\dsh-done-badge-helper.log # 助手调用记录(含成功/失败/窗口句柄) %TEMP%\dsh-done-badge-events.log # 事件链日志(away/epoch/sid/isSub/count*,自动轮转 1MB) ``` ## files ``` lib/index.js # 服务端(事件监听 + 路由)+ 客户端(角标 UI) assets/badge.ps1 # Windows 任务栏角标助手(ITaskbarList3) cordis.patch.yml # bundle 挂载声明 ```
Install
dsh plugin --profile web add github:SkuraSshly/dsh-done-badge
Profile: web
With the hub plugin installed, ask your agent to install it by name — it resolves the same plan shown here.
dsh plugin --profile web add github:stvlynn/dsh.fish#path:packages/dsh-plugin-hub
install dsh-done-badge from the hub
- This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.