dsh-eac-popup
DSH plugin: ???? agent ??/?????,EAC ????(??????)+?????5?+??????
- Stars
- 1
- Language
- JavaScript
- Created
- Aug 27, 2026
- Updated
- Aug 28, 2026
Introduction
dsh-eac-popup
当任意会话的 agent 向用户提问(ask_user_question)或请求审批时,自动把 DeepSeek Harness EAC 窗口弹到最上层、任务栏图标闪烁约 5 秒,并切换到提问的会话界面。
When any session's agent asks the user a question (ask_user_question) or requests approval, automatically brings the DeepSeek Harness EAC window to the front (preserving its previous size state), flashes the taskbar icon for ~5 seconds, and switches to the asking session's view.
✨ 功能特性 / Features
- 🔔 窗口置顶 — EAC 窗口弹到所有窗口最上层(仅当最小化时还原;最大化/普通窗口保持原状)
- 💡 任务栏闪烁 — 任务栏图标闪烁约 5 秒(
FlashWindowEx,10 次 × 500ms) - 🔀 自动切换会话 — 界面自动切到提问的会话(
sessions.open) - 🖱️ 通知点击跳转 — 点击 Windows 系统通知(会话完成等)→ EAC 置顶 + 自动切到对应会话(需配合 EAC 主进程补丁)
- 🌐 全会话覆盖 — Host 级挂载,任意会话触发均生效
- ♻️ 持久生效 — 随 web-desktop profile 加载,重启 EAC 后依然工作
🎯 触发条件 / Triggers
| 场景 | 事件 |
|---|---|
| 任一会话的 agent 调用提问工具 | tools/pre-execute + exec.name === 'ask_user_question' |
| 任一会话请求审批 | approval/request |
| EAC 主进程点击系统通知 | GET /dsh-eac-popup/activate?sessionId=<id>(由主进程补丁调用) |
弹窗+闪烁带 5 秒防抖(高频提问不刷屏);会话切换不入队去重,每条都生效。
通知点击跳转 / Notification-click jump
本插件提供 GET /dsh-eac-popup/activate?sessionId=xxx 端点:外部进程(如 EAC 的 Electron 主进程)在用户点击系统通知时调用它,即可让 EAC 置顶+闪烁并切到通知对应的会话。
需要配套的 EAC 主进程补丁(见仓库 patches/ 或 EAC 定制补丁流程):修改 main.js 的会话完成通知 click 回调,置顶窗口并调用该端点。
🖥️ 平台要求 / Requirements
- Windows(依赖
user32.dll:SetWindowPos/SetForegroundWindow/FlashWindowEx) - DeepSeek Harness EAC(web-desktop profile)
- 插件运行在 DSH Host 进程,无需额外依赖
📦 安装 / Install
方式一:EAC 插件市场(推荐)
在 EAC 设置 → 插件 中通过插件市场搜索 dsh-eac-popup 安装。
方式二:dsh 命令行
# 在你的任意工作目录执行(不要 cd 到 profile 目录)
dsh plugin --profile web-desktop add https://github.com/qiyeren/dsh-eac-popup
然后重启 EAC。
方式三:手动
- 把本仓库复制到
~/.dsh/plugins/dsh-eac-popup/ - 在
~/.dsh/profiles/web-desktop/cordis.patch.yml追加:
- insert:
- id: eac-popup
name: dsh-eac-popup
- 在 profile 的
package.jsondependencies 中加入:
"dsh-eac-popup": "file:C:/Users/<你的用户名>/.dsh/plugins/dsh-eac-popup"
- 重启 EAC。
🗑️ 卸载 / Uninstall
- 从
cordis.patch.yml移除eac-popup行 - 删除
~/.dsh/plugins/dsh-eac-popup/目录 - 重启 EAC
🔧 工作原理 / How it works
[HOST] tools/pre-execute / approval/request ──► 会话 ID 入队 + spawn PowerShell
│ /activate?sessionId=xxx(通知点击)│
▼ ▼
user32: 置顶(保状态) + FlashWindowEx 5s
│
[CLIENT] 每 500ms 轮询 /dsh-eac-popup/poll ◄───────┘
│
▼
sessions.open(会话ID) → 界面自动切换
- Host 端监听事件,把提问会话 ID 写入队列,同时 spawn PowerShell 完成窗口置顶+闪烁
/dsh-eac-popup/activate端点供 EAC 主进程在系统通知被点击时调用(置顶 + 切到通知对应会话)- Client 端(
__ModuleLoader__bundle)每 500ms 轮询取队列,调用sessions.open(id)切到对应会话 - 双通道轮询:优先
host.callRPC,无 harness 环境自动回退 HTTPfetch('/dsh-eac-popup/poll')
📁 文件结构 / Files
dsh-eac-popup/
├── index.mjs # Host 半端:事件监听 + PowerShell 窗口操作
├── lib/client.js # Client 半端:轮询 + sessions.open
├── cordis.patch.yml # 组合补丁(插件管理器自动应用)
├── package.json
└── README.md