dsh-chat-embed 0.6.1 → 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 +2 -0
- package/client.js +35 -9
- package/docs/architecture.md +1 -1
- package/docs/publishing.md +4 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -315,6 +315,8 @@ plugin_manager { "action": "install_bundle", "target": "<本仓库克隆路径>"
|
|
|
315
315
|
|
|
316
316
|
| 版本 | 变化 |
|
|
317
317
|
| --- | --- |
|
|
318
|
+
| `0.6.3` | 自检报告改为一次性:关闭设置菜单即清除,重新打开不再显示上次的报告 |
|
|
319
|
+
| `0.6.2` | 修复设置菜单被长路径撑宽:菜单加 `max-width`、报告文本 `overflow-wrap:anywhere`、补丁命令单独占一行(便于整条复制) |
|
|
318
320
|
| `0.6.1` | 探针找出桌面版自带的 Node 运行时,自检报告与「复制补丁说明」直接给出可执行命令(含 `--resources`,支持自定义安装目录);无需用户另装 Node |
|
|
319
321
|
| `0.6.0` | 补丁可观测性:四态检测(未打 / 已开启 / **升级后失效** / 未检测)、未开启时的风险提示、菜单内「检查补丁配置」自检(Host 只读探针 `GET /dsh-chat-embed/patch-check`)、agent 工具 `dsh_chat_embed_patch_check`;Host 半侧改为读取真实 `app.asar`(`original-fs`,绕过 Electron 的 asar 目录拦截) |
|
|
320
322
|
| `0.5.4` | 语言切换即时生效:翻译器改为 locale 绑定的单一来源,监听 `locale/change` 重渲染(不再依赖未注入的 `props.t`);补语言切换测试 |
|
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.
|
|
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__'
|
|
@@ -2552,14 +2552,29 @@ window.__ModuleLoader__.load({
|
|
|
2552
2552
|
row('补丁点', probe.patchSite === true ? '存在' : probe.patchSite === false ? '不存在(壳版本不匹配)' : '未知')
|
|
2553
2553
|
row('已打补丁', probe.patched === true ? '是' : probe.patched === false ? '否' : '未知')
|
|
2554
2554
|
row('node', probe.node)
|
|
2555
|
-
row('补丁命令', probe.patchCommand)
|
|
2556
2555
|
if (probe.nodeBinary === undefined) {
|
|
2557
2556
|
lines.push('(没有找到可用的 Node 运行时,需要先安装 Node.js 22 或更新)')
|
|
2558
2557
|
}
|
|
2559
2558
|
row('说明', probe.detail)
|
|
2559
|
+
// The command is long and path-heavy: give it its own indented block so a
|
|
2560
|
+
// copy takes the command alone and the menu wraps instead of stretching.
|
|
2561
|
+
if (typeof probe.patchCommand === 'string' && probe.patchCommand !== '') {
|
|
2562
|
+
lines.push('')
|
|
2563
|
+
lines.push('补丁命令:')
|
|
2564
|
+
lines.push(probe.patchCommand)
|
|
2565
|
+
}
|
|
2560
2566
|
return lines.join('\n')
|
|
2561
2567
|
}
|
|
2562
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
|
+
|
|
2563
2578
|
/** @returns {{ state: string, detail: string, seats: any[] }} */
|
|
2564
2579
|
function rightSidebarStatus() {
|
|
2565
2580
|
return { state: rightTypeState.state, detail: rightTypeState.detail, seats: rightSeatAttempts.slice() }
|
|
@@ -2775,14 +2790,14 @@ window.__ModuleLoader__.load({
|
|
|
2775
2790
|
'.dce-card-detail{font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11px;color:var(--dsw-alias-label-tertiary,#9aa0a6);word-break:break-all}',
|
|
2776
2791
|
'.dce-card-actions{display:flex;gap:8px;justify-content:flex-end}',
|
|
2777
2792
|
'.dce-menu-scrim{position:absolute;inset:0;z-index:5}',
|
|
2778
|
-
'.dce-menu{position:absolute;top:34px;right:6px;z-index:6;min-width:196px;box-sizing:border-box;padding:6px;border:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24));border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 12px 32px rgba(0,0,0,.18);display:flex;flex-direction:column;gap:1px}',
|
|
2793
|
+
'.dce-menu{position:absolute;top:34px;right:6px;z-index:6;min-width:196px;max-width:min(420px,calc(100% - 12px));box-sizing:border-box;padding:6px;border:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24));border-radius:10px;background:var(--dsw-alias-bg-layer-2,#fff);box-shadow:0 12px 32px rgba(0,0,0,.18);display:flex;flex-direction:column;gap:1px}',
|
|
2779
2794
|
'.dce-menu-title{font-size:11px;color:var(--dsw-alias-label-tertiary,#9aa0a6);padding:6px 8px 4px;letter-spacing:.04em}',
|
|
2780
2795
|
'.dce-menu-row{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:5px 8px;border-radius:6px;font-size:13px;color:var(--dsw-alias-label-primary,#1f2329)}',
|
|
2781
2796
|
'.dce-menu-row:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(127,127,127,.12))}',
|
|
2782
2797
|
'.dce-menu-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}',
|
|
2783
2798
|
'.dce-menu-value{flex:0 0 auto;font-size:12px;color:var(--dsw-alias-label-tertiary,#9aa0a6)}',
|
|
2784
2799
|
'.dce-menu-sep{margin:5px 0 3px;border-top:1px solid var(--dsw-alias-border-l1,rgba(127,127,127,.24))}',
|
|
2785
|
-
'.dce-menu-note{margin:4px 8px 6px;font-size:11.5px;line-height:1.5;color:var(--dsw-alias-label-tertiary,#9aa0a6);white-space:pre-wrap;word-break:break-word}',
|
|
2800
|
+
'.dce-menu-note{margin:4px 8px 6px;font-size:11.5px;line-height:1.5;color:var(--dsw-alias-label-tertiary,#9aa0a6);white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;max-width:100%;box-sizing:border-box}',
|
|
2786
2801
|
'.dce-menu-note[data-persist-risk="true"]{color:var(--dsw-alias-label-warning,#c98b16)}',
|
|
2787
2802
|
'.dce-menu-note[data-patch-report="true"]{max-height:180px;overflow:auto;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}',
|
|
2788
2803
|
'.dce-menu-item{display:flex;align-items:center;justify-content:flex-start;gap:8px;width:100%;box-sizing:border-box;padding:6px 8px;border:0;border-radius:6px;background:transparent;color:inherit;font-size:13px;text-align:left;cursor:pointer}',
|
|
@@ -3205,6 +3220,17 @@ window.__ModuleLoader__.load({
|
|
|
3205
3220
|
// Auto-hiding tab bar: hidden until the pointer reaches the top hot zone.
|
|
3206
3221
|
const [barOpen, setBarOpen] = React.useState(false)
|
|
3207
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
|
+
}
|
|
3208
3234
|
const [copyState, setCopyState] = React.useState('')
|
|
3209
3235
|
const barTimerRef = React.useRef(0)
|
|
3210
3236
|
const cancelBarTimer = () => {
|
|
@@ -3391,7 +3417,8 @@ window.__ModuleLoader__.load({
|
|
|
3391
3417
|
title: t('settings'),
|
|
3392
3418
|
'aria-expanded': menuOpen ? 'true' : 'false',
|
|
3393
3419
|
onClick: () => {
|
|
3394
|
-
|
|
3420
|
+
if (menuOpen) closeMenu()
|
|
3421
|
+
else setMenuOpen(true)
|
|
3395
3422
|
openBar()
|
|
3396
3423
|
},
|
|
3397
3424
|
},
|
|
@@ -3402,9 +3429,7 @@ window.__ModuleLoader__.load({
|
|
|
3402
3429
|
menuOpen
|
|
3403
3430
|
? h('div', {
|
|
3404
3431
|
className: 'dce-menu-scrim',
|
|
3405
|
-
onPointerDown:
|
|
3406
|
-
setMenuOpen(false)
|
|
3407
|
-
},
|
|
3432
|
+
onPointerDown: closeMenu,
|
|
3408
3433
|
})
|
|
3409
3434
|
: null,
|
|
3410
3435
|
menuOpen
|
|
@@ -3485,7 +3510,7 @@ window.__ModuleLoader__.load({
|
|
|
3485
3510
|
className: 'dce-menu-item',
|
|
3486
3511
|
'aria-label': t('diagTitle'),
|
|
3487
3512
|
onClick: () => {
|
|
3488
|
-
|
|
3513
|
+
closeMenu()
|
|
3489
3514
|
record.diagOpen = !record.diagOpen
|
|
3490
3515
|
notify()
|
|
3491
3516
|
},
|
|
@@ -3757,6 +3782,7 @@ window.__ModuleLoader__.load({
|
|
|
3757
3782
|
formatPatchReport,
|
|
3758
3783
|
runPatchCheck,
|
|
3759
3784
|
patchCheck,
|
|
3785
|
+
resetPatchCheck,
|
|
3760
3786
|
setLogging,
|
|
3761
3787
|
clearLog,
|
|
3762
3788
|
readLogEntries,
|
package/docs/architecture.md
CHANGED
|
@@ -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.
|
|
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
|
|
package/docs/publishing.md
CHANGED
|
@@ -5,13 +5,13 @@
|
|
|
5
5
|
## 版本与提交约定
|
|
6
6
|
|
|
7
7
|
- 同时改 `package.json` 的 `version` 与 `client.js` 的 `BUILD`,两者必须一致;
|
|
8
|
-
- 门禁必须绿:`npm run check`(`verify-bundle` +
|
|
8
|
+
- 门禁必须绿:`npm run check`(`verify-bundle` + 83 项契约测试);
|
|
9
9
|
- 代码注释/提交信息英文,文档中文。
|
|
10
10
|
|
|
11
11
|
## 发版步骤
|
|
12
12
|
|
|
13
13
|
```powershell
|
|
14
|
-
npm run check # 门禁:verify-bundle +
|
|
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.
|
|
35
|
-
| npm | `dsh-chat-embed@0.6.
|
|
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.
|
|
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",
|