会话完成、需要工具授权、需要回答时提醒: - 窗口不在前台走系统通知(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。
51 lines
1.2 KiB
JSON
51 lines
1.2 KiB
JSON
{
|
|
"name": "@dsh-plugin/session-notify",
|
|
"version": "1.0.1",
|
|
"private": true,
|
|
"type": "module",
|
|
"description": "会话完成、需要授权、需要回答时提醒你:窗口不在前台用系统通知,窗口在前台用应用内轻弹窗。",
|
|
"license": "MIT",
|
|
"repository": {
|
|
"type": "git",
|
|
"url": "git+https://gitea.iwake.top/dsh-plugin/session-notify.git"
|
|
},
|
|
"homepage": "https://gitea.iwake.top/dsh-plugin/session-notify",
|
|
"exports": {
|
|
".": "./index.js",
|
|
"./client": "./client.js",
|
|
"./package.json": "./package.json",
|
|
"./locale/*.json": "./locale/*.json"
|
|
},
|
|
"icon": "./icon.svg",
|
|
"meta": {
|
|
"title": "会话通知",
|
|
"description": "会话完成 / 需要授权 / 需要回答时提醒,支持系统通知与应用内轻弹窗。"
|
|
},
|
|
"files": [
|
|
"index.js",
|
|
"main.js",
|
|
"client.js",
|
|
"cordis.patch.yml",
|
|
"icon.svg",
|
|
"locale/*.json",
|
|
"README.md",
|
|
"LICENSE"
|
|
],
|
|
"engines": {
|
|
"node": ">=22"
|
|
},
|
|
"dsh": {
|
|
"manifestVersion": 1,
|
|
"bundle": {
|
|
"patch": "./cordis.patch.yml"
|
|
},
|
|
"client": {
|
|
"platform": "web",
|
|
"immediately": true,
|
|
"inject": [
|
|
"@deepseek-ai/dsh-client-ui-workspace"
|
|
]
|
|
}
|
|
}
|
|
}
|