跳到正文

dingyi222666/dsh-session-notification

70最近提交 2026年8月13日

dsh-session-notification DSH 插件

该插件在 dsh 设置面板中注册一个通知区域,让你控制四种会话事件(完成、失败、提问、权限请求)的通知行为。它可以播放内置或自定义音频,并在标签页未聚焦时发送浏览器级别的系统通知。

如何安装 dsh-session-notification DSH 插件

dsh plugin --profile web add @dingyi222666/dsh-session-notification

复制不会执行命令。安装 dsh-session-notification DSH 插件前请核对仓库和版本。

dsh-session-notification DSH 插件数据来源

dsh-session-notification DSH 插件快照日期:2026年8月16日

discovered

dsh-session-notification DSH 插件能做什么

  • 监听会话完成、失败、提问和权限请求四种事件
  • 为每种事件类型播放四种内置合成音之一(铃声、故障音、提示音、警报音)
  • 允许为每种事件类型上传自定义音频文件(mp3/ogg/wav,最大 1 MB)
  • 通过滑条控制主音量,并可全局开启/关闭声音
  • 在获得权限后显示浏览器(系统级)通知,包含事件详情和已完成会话的最后回复文本
  • 通过 settings.section 插槽在 dsh 网页 GUI 中注册通知设置区域

dsh-session-notification DSH 插件适合哪些场景

  • 长时间运行会话结束时收到提醒,无需一直盯着屏幕
  • 会话出错时立即收到警报
  • 代理提问或请求权限时及时通知,以便快速响应
  • 使用自定义音频区分不同事件类型
  • 启用浏览器通知,即使标签页在后台也能保持知情

dsh-session-notification DSH 插件适合谁

  • dsh 网页 GUI 用户,希望在不常看 UI 的情况下获知会话事件
  • 运行多个会话的用户,需要优先处理失败的或待处理的会话

dsh-session-notification DSH 插件的限制

  • 故障检测依赖会话快照,从未打开过的会话即使失败也可能错误地报告为完成
  • 浏览器通知需要用户授权,声音播放需要用户交互才能触发(受浏览器自动播放策略限制)
  • 自定义音频文件存储在浏览器 localStorage 中,不会跨浏览器或设备同步
  • 插件通过会话列表快照驱动,可能错过在两个快照之间开始并结束的运行(但实践中不太可能)

dsh-session-notification DSH 插件的仓库 README 摘录

以下文字摘自 dsh-session-notification DSH 插件的上游仓库 dingyi222666/dsh-session-notification 的 README,版权归原作者,仅作引用。

English | [中文](README.zh.md) A notification plugin for the dsh web GUI. When a session finishes, hits an error, asks you a question, or needs your permission, you get a heads-up: a sound plays, and when you step away from the tab a system notification keeps you in the loop. ## Screenshots | The settings panel with the **Notifications** entry in the sidebar and the section content | The sound picker for each kind (the official dropdown) | | --- | --- | | ![The Notifications settings section](screenshots/01-notifications-section.png) | ![The sound picker menu](screenshots/02-sound-menu-open.png) | ## Install ```sh # Install from npm (requires dsh >= 0.1.0-rc.6) dsh plugin --profile web add @dingyi222666/dsh-session-notification # Restart dsh web for it to take effect dsh web ``` Everything lives in this plugin — no harness (host) changes: - The settings section is registered through the client slot system (`settings.section`), exactly like official sections. - Preferences persist in the browser (localStorage) and sync across tabs; nothing requires the host's `WEB_SETTINGS_NAMESPACES` or any other host-package change. (The node half still reserves the `dsh-session-notification`

阅读完整 README仓库未声明许可,使用前请先与作者确认。

dsh-session-notification DSH 插件常见问题

如何安装 dsh-session-notification?

在终端中运行 `dsh plugin --profile web add @dingyi222666/dsh-session-notification`,然后重启 dsh web:`dsh web`。重启后插件即可生效。

浏览器通知没有显示,怎么办?

首先确保在通知设置区域中打开了“浏览器通知”主开关。如果是第一次使用,浏览器会请求权限,请点击“允许”。之后可以使用同一区域的“测试通知”按钮验证。同时检查系统通知设置是否阻止了 dsh。

我可以使用自己的声音文件代替内置音效吗?

可以。对于每种通知类型,在声音选择器中选择“自定义音频”,然后上传 mp3、ogg 或 wav 文件(最大 1 MB)。该文件将替换该类型的默认音效。之后可以移除自定义音频以恢复默认音效。

事件发生时没有声音,是什么原因?

请检查“声音”主开关是否打开,音量滑块是否不为零。此外,浏览器需要用户交互(点击)后才能播放音频——重新加载页面后,请先点击页面任意位置。每种通知类型也有自己的启用开关,确保你期望的类型已开启。

这个插件只适用于网页 GUI 吗?支持 dsh CLI 吗?

该插件专为 dsh 网页 GUI 设计。它在网页界面中注册了设置区域,并使用浏览器 API 播放声音和发送通知。它不会影响 CLI 的使用体验。