gameswu/dsh-notifacation-frame4

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.

包名
dsh-notifacation-frame
版本
0.1.1
许可证
MIT
最近更新
2026年8月16日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:gameswu/dsh-notifacation-frame

2. 将包装入目标 profile(以 web 为例)——一步完成,无需手改任何配置:

配置

配置项位置默认说明
各通知项开关 / 通道 / 音效 / 派生字段Settings → 通知 页卡片见内置表热生效,写入用户设置层
logFile组合行 config''通知日志文件('' = 仅控制台)
historyLimit组合行 config100内存历史环形缓冲长度
systemCooldownMs组合行 config5000系统通知冷却(防刷屏)
systemTimeoutMs组合行 config8000系统通知气泡展示时长
webSocketPath组合行 config/notification-frame/wshost→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 网关同源)。