dsh-chat-embed 0.6.2 → 0.6.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -315,6 +315,7 @@ plugin_manager { "action": "install_bundle", "target": "<本仓库克隆路径>"
315
315
 
316
316
  | 版本 | 变化 |
317
317
  | --- | --- |
318
+ | `0.6.3` | 自检报告改为一次性:关闭设置菜单即清除,重新打开不再显示上次的报告 |
318
319
  | `0.6.2` | 修复设置菜单被长路径撑宽:菜单加 `max-width`、报告文本 `overflow-wrap:anywhere`、补丁命令单独占一行(便于整条复制) |
319
320
  | `0.6.1` | 探针找出桌面版自带的 Node 运行时,自检报告与「复制补丁说明」直接给出可执行命令(含 `--resources`,支持自定义安装目录);无需用户另装 Node |
320
321
  | `0.6.0` | 补丁可观测性:四态检测(未打 / 已开启 / **升级后失效** / 未检测)、未开启时的风险提示、菜单内「检查补丁配置」自检(Host 只读探针 `GET /dsh-chat-embed/patch-check`)、agent 工具 `dsh_chat_embed_patch_check`;Host 半侧改为读取真实 `app.asar`(`original-fs`,绕过 Electron 的 asar 目录拦截) |
package/client.js CHANGED
@@ -103,7 +103,7 @@ window.__ModuleLoader__.load({
103
103
  let openRightTabImpl = () => {}
104
104
 
105
105
  /** Build identity, surfaced in the panel so a packaged app can be diagnosed. */
106
- const BUILD = '0.6.2'
106
+ const BUILD = '0.6.3'
107
107
 
108
108
  /** Where a re-applied instance finds the one it must take over from. */
109
109
  const INSTANCE_KEY = '__DSH_CHAT_EMBED_INSTANCE__'
@@ -2566,6 +2566,15 @@ window.__ModuleLoader__.load({
2566
2566
  return lines.join('\n')
2567
2567
  }
2568
2568
 
2569
+ /**
2570
+ * Drop the one-shot self-check answer. Closing the settings menu calls this:
2571
+ * a report belongs to the click that asked for it, not to the panel state.
2572
+ */
2573
+ function resetPatchCheck() {
2574
+ patchCheck.report = ''
2575
+ patchCheck.running = false
2576
+ }
2577
+
2569
2578
  /** @returns {{ state: string, detail: string, seats: any[] }} */
2570
2579
  function rightSidebarStatus() {
2571
2580
  return { state: rightTypeState.state, detail: rightTypeState.detail, seats: rightSeatAttempts.slice() }
@@ -3211,6 +3220,17 @@ window.__ModuleLoader__.load({
3211
3220
  // Auto-hiding tab bar: hidden until the pointer reaches the top hot zone.
3212
3221
  const [barOpen, setBarOpen] = React.useState(false)
3213
3222
  const [menuOpen, setMenuOpen] = React.useState(false)
3223
+
3224
+ /**
3225
+ * Close the settings menu.
3226
+ *
3227
+ * The self-check report is a one-shot answer to a click, not a setting:
3228
+ * it is dropped with the menu so reopening never replays a stale report.
3229
+ */
3230
+ const closeMenu = () => {
3231
+ setMenuOpen(false)
3232
+ resetPatchCheck()
3233
+ }
3214
3234
  const [copyState, setCopyState] = React.useState('')
3215
3235
  const barTimerRef = React.useRef(0)
3216
3236
  const cancelBarTimer = () => {
@@ -3397,7 +3417,8 @@ window.__ModuleLoader__.load({
3397
3417
  title: t('settings'),
3398
3418
  'aria-expanded': menuOpen ? 'true' : 'false',
3399
3419
  onClick: () => {
3400
- setMenuOpen((value) => !value)
3420
+ if (menuOpen) closeMenu()
3421
+ else setMenuOpen(true)
3401
3422
  openBar()
3402
3423
  },
3403
3424
  },
@@ -3408,9 +3429,7 @@ window.__ModuleLoader__.load({
3408
3429
  menuOpen
3409
3430
  ? h('div', {
3410
3431
  className: 'dce-menu-scrim',
3411
- onPointerDown: () => {
3412
- setMenuOpen(false)
3413
- },
3432
+ onPointerDown: closeMenu,
3414
3433
  })
3415
3434
  : null,
3416
3435
  menuOpen
@@ -3491,7 +3510,7 @@ window.__ModuleLoader__.load({
3491
3510
  className: 'dce-menu-item',
3492
3511
  'aria-label': t('diagTitle'),
3493
3512
  onClick: () => {
3494
- setMenuOpen(false)
3513
+ closeMenu()
3495
3514
  record.diagOpen = !record.diagOpen
3496
3515
  notify()
3497
3516
  },
@@ -3763,6 +3782,7 @@ window.__ModuleLoader__.load({
3763
3782
  formatPatchReport,
3764
3783
  runPatchCheck,
3765
3784
  patchCheck,
3785
+ resetPatchCheck,
3766
3786
  setLogging,
3767
3787
  clearLog,
3768
3788
  readLogEntries,
@@ -3,7 +3,7 @@
3
3
  本文记录 `client.js` 里每一条**反直觉**的实现决策、支撑它的证据,以及升级桌面壳时必须重新验证的清单。
4
4
 
5
5
  目标运行环境:**`@deepseek-ai/dsh-desktop 0.2.2-rc.1`(Electron / Chromium)**。
6
- 当前实现:**v0.6.2**(`client.js` 约 3912 行,82 项契约测试)。
6
+ 当前实现:**v0.6.3**(`client.js` 约 3912 行,83 项契约测试)。
7
7
 
8
8
  > **架构一句话**:聊天页直接渲染在**席位的布局盒**里(`.dce-panel.dce-inline`,`width/height:100%`),几何完全交给 CSS;席位只有两个 —— 中央主面板(`main`)和右栏聊天 tab —— 二者互斥,**哪边点哪边接管**,切换时 guest 重建一次并回到上次会话。
9
9
 
@@ -5,13 +5,13 @@
5
5
  ## 版本与提交约定
6
6
 
7
7
  - 同时改 `package.json` 的 `version` 与 `client.js` 的 `BUILD`,两者必须一致;
8
- - 门禁必须绿:`npm run check`(`verify-bundle` + 82 项契约测试);
8
+ - 门禁必须绿:`npm run check`(`verify-bundle` + 83 项契约测试);
9
9
  - 代码注释/提交信息英文,文档中文。
10
10
 
11
11
  ## 发版步骤
12
12
 
13
13
  ```powershell
14
- npm run check # 门禁:verify-bundle + 82 项测试(prepublishOnly 也会跑)
14
+ npm run check # 门禁:verify-bundle + 83 项测试(prepublishOnly 也会跑)
15
15
  npm run pack:dist # 产出 dist\dsh-chat-embed-<版本>.tgz
16
16
  gh release create v0.5.0 dist\dsh-chat-embed-0.5.0.tgz --title "v0.5.0" --notes-file dist\release-notes.md
17
17
  ```
@@ -31,8 +31,8 @@ Get-FileHash $env:TEMP\check\dsh-chat-embed-0.5.0.tgz -Algorithm SHA256
31
31
  | --- | --- |
32
32
  | 仓库 | <https://github.com/poluce/dsh-chat-embed> |
33
33
  | Release | <https://github.com/poluce/dsh-chat-embed/releases> |
34
- | 分发包 | `dsh-chat-embed-0.6.2.tgz`(16 个文件,约 70 kB) |
35
- | npm | `dsh-chat-embed@0.6.2`(<https://www.npmjs.com/package/dsh-chat-embed>,维护者 `poluce_auto`) |
34
+ | 分发包 | `dsh-chat-embed-0.6.3.tgz`(16 个文件,约 70 kB) |
35
+ | npm | `dsh-chat-embed@0.6.3`(<https://www.npmjs.com/package/dsh-chat-embed>,维护者 `poluce_auto`) |
36
36
  | 商店图标 | `assets/icon-180.png`(180×180 PNG) |
37
37
  | 商店截图 | `assets/screenshots/` + 仓库根 `screenshots.json`(6 张) |
38
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-chat-embed",
3
- "version": "0.6.2",
3
+ "version": "0.6.3",
4
4
  "author": "poluce <fishsummer@126.com>",
5
5
  "description": "Multi-tab AI chat embed for the DeepSeek Harness desktop app: DeepSeek, 豆包, ChatGPT, MiniMax, Kimi, Gemini and Grok, each signed in separately.",
6
6
  "type": "module",