dsh-notify-win:为 DeepSeek Harness 增加 Windows 原生通知

前言

DeepSeek Harness(DSH)里的任务可能运行较久,也可能在后台等待批准、等待回答。如果你习惯用浏览器里的 web profile 使用 DSH,任务结束后再切回窗口查看会比较低效。

下面介绍 dsh-notify-win。它是 DSH 的 Windows 通知插件,在任务完成、上下文压缩完成、或需要你输入时,使用 Windows 原生 toast 和任务栏闪烁提醒。

插件定位

dsh-notify-win 是一句定位:Native Windows toast + taskbar flash for DeepSeek Harness when a task finishes or your input is needed。

仓库维护者为 Andyqwe44,许可证为 MIT。源码地址:

https://github.com/Andyqwe44/dsh-notify-win

核心能力

dsh-notify-win 主要覆盖三类提醒:

1、任务完成:root agent 变为 idle 时触发。
2、上下文压缩完成:session/eventcompaction/end 时触发。
3、需要你输入:approval / ask_user_question 时触发。

它提供的具体行为包括:

  • Windows 10/11 系统风格原生 toast,显示在右下角。
  • 当 DSH 在后台时,使用 FlashWindowEx 触发任务栏闪烁。
  • Click-to-focus:点击 toast 后打开 DSH,并切换到对应 session。
  • 单选问题 toast:原生下拉框最多 5 个选项,另附自定义答案文本输入,以及 Cancel / Send。
  • 超时闪烁 fallback:如果交互式 toast 被系统超时关闭,仍会触发任务栏闪烁。
  • DeepSeek Harness logo 的 hero banner,并适配深浅色主题。
  • Fire-and-forget:不注册 service、tool 或 settings namespace。

通知会按 session 去重。dedupMs 默认为 1500 ms

安装与验证

先确认环境里有 pnpm。如果没有,可以先执行:

corepack enable

安装插件:

dsh plugin --profile web add dsh-notify-win

安装后检查配置,确认已经加入 DSH 的 web profile:

dsh --profile web --dump-config

在输出里找类似下面的标识:

# == dsh-notify-win
- id: dsh-notify-win

测试通知

重启 DSH:

dsh web

完成任意任务后,应该看到首次通知。首次通知会自注册 branded toast identity。

如果 toast header 仍然显示 DeepSeekHarness,并且没有图标,重启一次 Explorer:

Stop-Process -Name explorer -Force; Start-Process explorer

禁用插件

如果需要临时关闭通知,在 cordis.patch.yml 中设置:

- id: dsh-notify-win
  disabled: true

安装或禁用变更后需要重启。web profile 默认禁用 HMR。

运行环境

已核实的运行要求如下:

  • Windows 10/11。
  • PowerShell 7,或 Windows PowerShell 5.1;如果只有 5.1,会自动作为 fallback 使用。
  • 交互式问题 toast 需要 .NET 10 Desktop Runtime (x64)
  • done / compact 类 toast 不需要 .NET 10 Desktop Runtime (x64)

限制与注意事项

这些限制来自插件行为本身:

  • 原生 toast 文本较紧凑,约 4 行显示空间,长内容会被截断。
  • 原生选择下拉框在指针移动到 popup 上时可能收起;如果随后被系统超时关闭,任务栏闪烁仍会提醒。
  • FlashWindowEx 使用系统 warm-pulse highlight,不能自定义颜色。
  • Windows 不会闪烁前台窗口;任务栏按钮只在 DSH 位于后台时闪烁。
  • 取消正在运行的 turn 也会进入 idle,因此取消后的任务仍会触发 done toast。
  • 通知按 session 在 dedupMs 窗口内去重,默认 1500 ms
  • 插件不注册 service、tool 或 settings namespace。

安全建议

dsh-notify-win 会由 DSH 拉起相关进程,并以当前 DSH 进程权限运行。安装前建议先查看源码、许可证和实际触发行为,再决定是否加入自己的 web profile。

结尾

dsh-notify-win 的价值比较集中:在 Windows 10/11 上,让 DSH 的任务完成、上下文压缩完成和等待输入这三类状态更及时地被注意到。它不改变 DSH 的主流程,只作为一条通知链路加入。

源码与 issue 入口在 GitHub:

https://github.com/Andyqwe44/dsh-notify-win
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye