gameswu/dsh-notifacation-frame ↗★ 4
dsh-notifacation-frame
DSH notification framework: unified notification event management, per-item config cards on the Settings page, built-in notifiers, and a registration API for derived plugins.
安装
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:gameswu/dsh-notifacation-frame说明文档
阅读完整 README ↗2. 将包装入目标 profile(以 web 为例)——一步完成,无需手改任何配置:
配置
| 配置项 | 位置 | 默认 | 说明 |
|---|---|---|---|
| 各通知项开关 / 通道 / 音效 / 派生字段 | Settings → 通知 页卡片 | 见内置表 | 热生效,写入用户设置层 |
logFile | 组合行 config | '' | 通知日志文件('' = 仅控制台) |
historyLimit | 组合行 config | 100 | 内存历史环形缓冲长度 |
systemCooldownMs | 组合行 config | 5000 | 系统通知冷却(防刷屏) |
systemTimeoutMs | 组合行 config | 8000 | 系统通知气泡展示时长 |
webSocketPath | 组合行 config | /notification-frame/ws | host→client 推送路径 |
音效
每张通知卡片带音效选择:静音(默认)/ 叮(双音提示)/ 啵(短促提示)/
钟声(三音上行)/ 警报(双短警告)/ 自定义 URL(音频文件,如
https://…/sound.mp3)。内置预设由客户端 Web Audio API 实时合成,无资源文件;
卡片上的「试听」按钮即时预览,通知横幅出现时按该项配置播放。自动播放策略下
AudioContext 可能被浏览器挂起,首次手势后自动恢复;播放失败静默,不影响通知。
组合行 config.* 是框架级 base 层;各通知项的用户配置存在 settings 命名空间
dsh-notifacation-frame({ items: { [id]: { enabled, channels, options, sound, soundUrl } } }),
设置卡片经 Host 的 fenced JSON 路由 /notification-frame/api 读写(与
dsh-plugin-vscode-sidebar 的 /sidebar/api 同款通道:POST + {ok, value|error}
信封,信任栅栏与 /api 网关同源)。