Files
session-notify/LICENSE
T
pyh 6b83a6ac19 feat: 会话通知插件 v1.0.1(系统通知 + 应用内轻弹窗)
会话完成、需要工具授权、需要回答时提醒:
- 窗口不在前台走系统通知(Windows / macOS / Linux 同一条渲染进程通知通道,无平台分支),点击回到 DSH 并跳到该会话;
- 窗口在前台走应用内轻弹窗(右上角、6 秒自动消失、可悬停暂停、Esc 关闭、点「查看」跳转);
- 正在看的那个会话完成时不打扰。

触发与去重:只对「运行中 → 空闲」的转变提醒,同一会话同一轮只报一次,同一待处理请求只报一次;
子智能体会话与空白会话跳过;打开应用时已在运行的会话只建基线不补发;
多个会话同时完成有 1.5 秒节流,完成提醒前有 400ms 确认窗口(那一轮又跑起来就不报)。

设置 → 通用 → 会话通知:权限状态、请求权限、测试通知、完成/授权/提问三个开关,
以及观察器自身的健康状态(收不到会话状态时直接显示,不会静默失效)。

实现形态遵循 DSH 插件规范:dsh.manifestVersion 1、dsh.bundle.patch 声明宿主行、
dsh.client 声明 platform: web 的浏览器半;宿主半为空壳,不注册任何服务与路由。
会话状态只通过 slot 的标准 props(useSessions / useSessionStatus)读取,
只往 settings.general.item 与 shell.overlay 注册,样式只用主题 token,不 import 客户端包。

修复:观察器原先挂在 sidebar.panellist,而该 slot 的宿主会把每个条目的 id 当作一个
左侧面板按钮(label 取 options.label ?? options.id,条目作为图标内联渲染),
导致左侧多出一行空面板并挤坏侧边栏;现改挂通用浮层 shell.overlay。
2026-09-30 15:43:36 +08:00

22 lines
1.0 KiB
Plaintext

MIT License
Copyright (c) 2026 pyh
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.