Files
session-notify/package.json
T
pyh 24d1ff3ffa fix: 注册 locale 字典,修掉设置行显示翻译键的问题
设置行之前显示的是 settings.title / settings.description 这样的原始键:
插件只调用了 locale.bind(NS) 却没有调用 locale.register(NS, { zh, en }),
而 locale 服务在命名空间没有字典时会把 key 原样返回。

- apply 里用 ctx.effect 注册本包的 zh / en 字典(注册会打点 locale 修订号,
  已渲染的条目自动换上文案,不需要刷新页面);
- 单语言注册形式作为兼容兜底;
- 自带字典兜底同时生效:拿不到框架的 t、或 locale 服务没保存注册时,
  仍然渲染中文/英文文案而不是原始键;快照语言改为读 snapshot.active(真实字段名);
- 验证从 40 项增加到 44 项,新增:字典已注册且中英键集合一致、
  设置行与弹窗渲染出的字符串都不是原始键、无框架 t 时的本地兜底、
  locale 服务不保存注册时仍有文案。
2026-09-30 15:55:12 +08:00

51 lines
1.2 KiB
JSON

{
"name": "@dsh-plugin/session-notify",
"version": "1.0.2",
"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"
]
}
}
}