dsh-split-workspace 0.11.1 → 0.14.0
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/CHANGELOG.md +98 -0
- package/README.md +157 -26
- package/THIRD-PARTY-NOTICES.md +17 -0
- package/lib/client.js +1220 -82
- package/lib/index.js +118 -20
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/native/system-window.ps1 +230 -0
- package/native/webview2/LICENSE.txt +27 -0
- package/native/webview2/Microsoft.Web.WebView2.Core.dll +0 -0
- package/native/webview2/Microsoft.Web.WebView2.WinForms.dll +0 -0
- package/native/webview2/NOTICE.txt +85 -0
- package/native/webview2/arm64/WebView2Loader.dll +0 -0
- package/native/webview2/x64/WebView2Loader.dll +0 -0
- package/package.json +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,104 @@
|
|
|
4
4
|
|
|
5
5
|
This file records public releases of `dsh-split-workspace`; each version ends with a one-line English summary.
|
|
6
6
|
|
|
7
|
+
## [0.14.0] - 2026-11-19
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Windows 也有真正的系统窗口了(PowerShell + WebView2)。** 右键会话 → 分屏插件 → **进入系统窗口** 以前只在 macOS 可用,Windows 上点击会提示“系统窗口仅支持 macOS 桌面版”。现在 Host 在 Windows 上启动 `native/system-window.ps1`,由 PowerShell + WinForms 建一个真正的 OS 窗口、内嵌 WebView2 控件加载 Host 的**本机认证 Web 客户端**;窗口可拖出 DSH 主窗口、单独缩放/最小化/关闭,不显示左侧栏,右侧栏与对话区照常保留,菜单的「进入 / 退出系统窗口」状态与关窗同步逻辑和 macOS 完全一致。
|
|
12
|
+
- Windows 实现随包附带 WebView2 SDK(`Microsoft.Web.WebView2.Core.dll`、`Microsoft.Web.WebView2.WinForms.dll`、x64 / arm64 `WebView2Loader.dll`,BSD-3-Clause,约 1.1 MB),不需要本地编译;每个窗口使用独立的临时 WebView2 配置目录,关窗/退出 DSH 时连同 `msedgewebview2` 进程树一起结束。
|
|
13
|
+
- 缺少 Microsoft Edge WebView2 运行时时,菜单会给出明确提示(而不是笼统失败):Windows 11 自带、Windows 10 装过新版 Edge 即有。
|
|
14
|
+
- 平台判断收敛为 `nativeWindowSupported()`(macOS / Windows),Linux 与 Web 客户端仍提示改用「进入独立窗口」;Windows 会等待 Helper 启动窗口,如果进程在启动窗口内退出,会把原因(WebView2 缺失 / Helper 资源损坏)返回给客户端。
|
|
15
|
+
|
|
16
|
+
### Fixed
|
|
17
|
+
|
|
18
|
+
- **修复 macOS 系统窗口里弹层菜单跑到窗口左上角。** 模型选择器、权限 / 审查模式等下拉菜单在系统窗口里会出现在左上角、盖住标题栏。根因是 DSH 的 Menu 用 **CSS Anchor Positioning**(`position-anchor` + `anchor()`)把 portal 面板挂在触发按钮旁,而 macOS 系统窗口是 **WKWebView(WebKit)**,没有实现这两个特性:`anchor()` 声明被丢弃,菜单只剩 CSS 兜底的 `top: 12px; left: 12px`。Chromium 主窗口支持该特性,所以只在系统窗口复现。
|
|
19
|
+
- 修复:系统窗口模式检测到缺少锚点定位能力时安装轻量回落——按菜单自带的 `data-anchor-side` / `data-anchor-align`,以及模型选择器共享在触发按钮上的 `--dsh-model-anchor` 自定义属性,重新计算面板的 `top / bottom / left / right`;向上打开的菜单贴着按钮上沿、右对齐,并按可用空间限制最大高度。菜单关闭即停止跟随;引擎支持锚点定位时完全不生效。
|
|
20
|
+
- 验证:新增 `npm run check:anchor`,在真实 WKWebView 里跑两个场景(模型选择器菜单、stock Menu portal):修复前菜单位于 (12, 12),修复后分别落在触发按钮上方 8px / 4px 且右对齐。
|
|
21
|
+
|
|
22
|
+
### Changed
|
|
23
|
+
|
|
24
|
+
- `native/system-window.jxa` 保持 macOS 实现不变;Host 抽出 `systemWindowCommand()` 统一生成两个平台的 Helper 命令(Windows 用 base64 传递认证 URL,避免 PowerShell 参数解析)。
|
|
25
|
+
- README / 使用帮助 / 提示文案同步更新为「macOS / Windows」。
|
|
26
|
+
|
|
27
|
+
**English summary:** The native system window now works on Windows too: the Host starts `native/system-window.ps1`, a PowerShell + WinForms window hosting WebView2 (vendored SDK, about 1.1 MB, BSD-3-Clause) that loads the Host's authenticated web client with the same hash-marker mode and menu state sync as macOS. Each window gets its own temporary WebView2 profile, closing it ends the whole helper process tree, and a missing Microsoft Edge WebView2 Runtime is reported explicitly. Linux and the Web client still fall back to the independent window. The macOS system window also fixes dropdown menus (model selector, permission presets) landing in the window's top-left corner: WebKit drops CSS anchor positioning, so the plugin re-anchors those portaled panels next to the trigger they opened from, with height caps; `npm run check:anchor` verifies it in a real WKWebView.
|
|
28
|
+
|
|
29
|
+
## [0.13.2] - 2026-11-19
|
|
30
|
+
|
|
31
|
+
### Fixed
|
|
32
|
+
|
|
33
|
+
- **真正修复「分屏最小化后再恢复,窗格标题栏按钮点不动」。** 根因是桌面端原生窗口的拖动区:被分屏盖住的原生会话仍然挂在画布下面,它的标题栏(栈顶 0–76px)声明了 Electron 的 `-webkit-app-region: drag`。原生拖动区在 DOM 之前吞掉鼠标事件,所以画布看着正常、`elementFromPoint` 也指向按钮,但点击根本进不了页面(实测没有任何 pointerdown;同一位置在浏览器里正常,因此 Web 端无法复现)。
|
|
34
|
+
- 从「分屏视图」面板直接创建分屏时下面没有原生会话,按钮一直是好的;一旦最小化回到会话再恢复,原生会话挂载在画布下方,它的拖动区正好覆盖窗格标题栏(44–81px),按钮就全部失效。
|
|
35
|
+
- 修复:给窗格标题栏声明 `-webkit-app-region: no-drag`,把这块区域从原生拖动区里扣掉。桌面端实测:恢复分屏后点击标题栏的 ⤢/⧉/?/分屏/关闭 全部恢复响应,帮助卡片正常弹出。
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- **面板里「最小化分屏」不再卡住点击。** 原来在“分屏视图”面板里最小化会同步离开面板并挂载整棵原生会话视图(实测点击后约 580ms 才完成这一帧,期间界面冻结)。现在先隐藏画布、显示恢复胶囊和「正在返回会话」提示卡(点击后一两帧内可见),再把“切回原生会话”放到下一帧任务里执行;剩余的对话视图挂载成本仍在,但不再阻塞点击反馈。
|
|
40
|
+
- 面板最小化期间,「分屏视图」页不会再被“选中面板即恢复分屏”的逻辑撤销(内部加了 in-flight 标记)。
|
|
41
|
+
|
|
42
|
+
**English summary:** The real cause of dead pane-header buttons after restoring a minimized split was Electron's native window-drag region: the covered stock conversation stays mounted behind the overlay and its header declares `-webkit-app-region: drag` over the top ~76px of the column, so the compositor swallowed those clicks before they reached the DOM (no pointerdown at all; browsers ignore app-region, which is why the web build never reproduced it). The pane header now declares `-webkit-app-region: no-drag`, carving itself out of that region. Also, minimizing from the split-view panel no longer freezes the click: the canvas hides and a "returning to the conversation" card paints first, while the main-column switch (a full native conversation mount) runs in the next task.
|
|
43
|
+
|
|
44
|
+
## [0.13.1] - 2026-11-19
|
|
45
|
+
|
|
46
|
+
### Fixed
|
|
47
|
+
|
|
48
|
+
- **修复「分屏最小化 → 恢复分屏」后窗格内顶部按钮点不动的问题。** 恢复出来的画布如果残留了隐藏阶段的交互样式(暖缓存隐藏、窗口缩放冻结被最小化打断、被取消的窗格拖动),画面会正常绘制但整块区域对鼠标透明,窗格标题栏的 ⤢ / ⧉ / ? / 分屏 / 关闭 全部失效。现在:
|
|
49
|
+
- 暖缓存隐藏只使用 `visibility: hidden`(它本身就不参与命中测试),不再写 `pointer-events: none`,从源头消除「可见但点不到」的状态;
|
|
50
|
+
- 新增不变量样式:画布只要不是暖缓存隐藏,就强制可见且 `pointer-events: auto`;窗格标题栏及其按钮再单独声明 `pointer-events: auto`,即使祖先被误设为透明也能点;
|
|
51
|
+
- 画布每次显示后一帧做一次自检:清理残留的冻结 transform/尺寸、恢复为可交互、清掉被中断拖动遗留的 `data-dsv-source` 透明面板,并把修复次数记录到 `health().canvasRepairs`(正常应为 0)。
|
|
52
|
+
- `health()` 新增 `canvasRepairs`。
|
|
53
|
+
|
|
54
|
+
**English summary:** Fixed pane header buttons staying dead after restoring a minimized split: a canvas that is visible but left with hidden-phase interaction styles (warm hold, a window-resize freeze interrupted by minimize, a cancelled pane drag) now gets repaired. The warm hold only uses `visibility: hidden` (which already excludes hit-testing), a new invariant rule keeps every non-warm canvas visible and clickable, pane header buttons re-assert `pointer-events: auto`, and a one-frame self-check after each show clears leftover freeze/transform styles and interrupted-drag sources. Repairs are counted in `health().canvasRepairs` (0 in normal use).
|
|
55
|
+
|
|
56
|
+
## [0.13.0] - 2026-11-19
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- **最小化胶囊可放在边缘任意位置。** 最小化分屏后出现的「恢复分屏」胶囊现在可以拖到工作区任意位置,松手吸附到**最近的边缘**,沿边的位置保留拖动时的位置(不再只限四个角),并且位置会持久化,下次最小化仍在原处。
|
|
61
|
+
- `health()` 新增 `panelSelected`(当前主区是否选中「分屏视图」)与 `panelWarm`(画布是否处于暖缓存隐藏状态);`blockedReason` 在插件面板占用主区时返回 `panel`。
|
|
62
|
+
|
|
63
|
+
### Changed
|
|
64
|
+
|
|
65
|
+
- **切换「分屏视图」/普通会话 / 最小化 / 插件面板不再重建窗格。** 分屏画布改为单一常驻的覆盖层:选中「分屏视图」时主区页面本身是空的,画布覆盖同一列;隐藏时画布保留挂载 **20 秒**(暖缓存),期间来回切换几乎瞬时,不再重连会话、重建编辑器与对话视图。超过 20 秒才释放窗格树;隐藏期间保留布局,恢复是可见性切换而不是整棵树重排。
|
|
66
|
+
- 打开插件 / 技能 / 设置面板时分屏不再自动最小化成胶囊:画布暂时隐藏(窗格保持挂载),回到会话或「分屏视图」后自动恢复。点击其他会话仍会把分屏收成胶囊。
|
|
67
|
+
- **恢复分屏先显示画布**:原来会先同步切换被覆盖会话区的原生会话(`uiWorkspace.openSession`),这段原生切换可达数百毫秒,用户要等它完成才看到分屏;现在先恢复显示,再把被覆盖会话区的会话对齐延后 150ms、且当前已经是该会话时跳过。
|
|
68
|
+
- 暖缓存隐藏期间画布仍参与布局(这样恢复几乎零重排),因此最小化后的流式输出仍会产生布局开销,直到 20 秒窗口结束释放窗格树——这是「恢复瞬时」与「最小化省资源」之间的取舍。
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- 修复「分屏视图 ⇄ 非分屏会话」「最小化 ⇄ 恢复分屏」切换卡顿:不再在每次切换时卸载并重新挂载全部原生窗格。
|
|
73
|
+
|
|
74
|
+
**English summary:** The minimized split's restore chip can now be dragged anywhere and snaps to the nearest edge (any position along that edge, persisted), instead of only the four corners. The split canvas is now a single always-mounted overlay layer: selecting the Split view panel, switching to a plain conversation, minimizing, or opening a plugin panel only shows/hides it, with a 20-second warm hold that keeps the native pane tree mounted so those switches are near-instant; after the warm window the tree is dropped. Opening a plugin panel no longer minimizes the split into the chip (the canvas hides and reappears automatically), and restoring a minimized split shows the canvas first while the covered stock view's session alignment is deferred. `health()` gains `panelSelected` / `panelWarm`.
|
|
75
|
+
|
|
76
|
+
## [0.12.0] - 2026-11-19
|
|
77
|
+
|
|
78
|
+
### Added
|
|
79
|
+
|
|
80
|
+
- **左侧栏新增「分屏视图」面板入口(与「插件」同级,0.12.0)。** 左侧栏顶部的全局面板导航里多了一行 **分屏视图**,行首是插件的分屏图标;点击它把主区切换到分屏视图面板:
|
|
81
|
+
- 已有两个及以上窗格时,面板直接显示和「恢复分屏」相同的界面(窗格、分隔条、窗格工具栏)。
|
|
82
|
+
- 还没有分屏时,面板显示 **添加分屏** 多选框;勾选两个或更多会话并确定后,立即在同一面板里显示分屏界面。
|
|
83
|
+
- 从面板里「最小化分屏」回到会话界面,「退出分屏」清空窗格并返回会话;切到其他会话或插件面板时分屏布局保留,随时点回「分屏视图」继续。
|
|
84
|
+
- 设置页「操作」里新增 **打开分屏视图**;主面板行、底部按钮、右键菜单用的是同一枚绘制图标。
|
|
85
|
+
- **会话右键「分屏插件」菜单增加图标。** 一级菜单和 **加入分屏 / 进入浮窗 / 进入独立窗口 / 进入系统窗口** 四个二级条目都带上了对应的 SVG 图标(contextMenu.icon 内联图标槽)。
|
|
86
|
+
|
|
87
|
+
### Changed
|
|
88
|
+
|
|
89
|
+
- 左下角分屏按钮与底部菜单的入口图标统一为侧栏「分屏视图」所用的同一枚图标。
|
|
90
|
+
- 设置页的「操作」新增「打开分屏视图」,并把状态区与菜单行为保持一致。
|
|
91
|
+
|
|
92
|
+
### Fixed
|
|
93
|
+
|
|
94
|
+
- **修复 Windows 上「重启 DSH」菜单图标显示为乱码方框的问题。** 旧图标使用 U+23FB(POWER SYMBOL),Windows 默认 CJK 字体栈没有该字形,显示成方框/乱码。现在改为内嵌 SVG 绘制的重启(循环箭头)图标,不再依赖系统字体;新增的图标同样全部是 SVG。
|
|
95
|
+
- **优化窗口缩放卡顿(性能模式下同样卡)。** 拖动窗口边缘时,每个窗格的尺寸观察器会在每一帧提交新的窗格尺寸,触发整块窗格重渲染、composer 卡片重新测量与对齐行重算,窗格越多越卡;同时窗格容器还有 180ms 的宽高过渡在“追”窗口边缘。0.12.0 引入布局忙时(窗口缩放 / 拖动分隔条)的收敛机制:
|
|
96
|
+
- 缩放/拖动期间只保留浏览器自身的 CSS 重排;窗格尺寸、composer 几何、对齐行宽、浮窗钳制等 JS 测量与派生状态统一延迟到手势结束后执行一次。
|
|
97
|
+
- composer 测量副作用不再依赖窗格宽度,不再在每次宽度变化时重建 ResizeObserver。
|
|
98
|
+
- 缩放期间关闭窗格过渡/动画(html 上的 data-dsv-resizing 标记),去掉逐帧追赶窗口边缘的过渡成本。
|
|
99
|
+
- 分隔条拖动同样按“手势结束再测量”处理,拖动更顺滑。
|
|
100
|
+
- 新增 `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true|false)`(默认开启,持久化),可在不喜欢“拖动时文字轻微拉伸”时关闭。
|
|
101
|
+
- **性能模式下,窗口缩放期间冻结画布内部布局**:画布保持手势开始时的内部布局,用 CSS transform 跟随窗口边缘缩放到新尺寸(拖动时文字轻微拉伸),松手后一次性重排为真实尺寸——这样每个窗格里的原生对话不会每一帧重新测量滚动区域。普通模式保留逐帧重排与过渡动画。
|
|
102
|
+
|
|
103
|
+
**English summary:** Adds a **Split view** entry to the sidebar's global-panel navigation (next to **Plugins**) that opens the split workspace as a main panel — the same canvas when two or more panes exist, or an inline add-split picker that opens the split as soon as two conversations are confirmed. The footer button, sidebar row and session context-menu group now share one drawn icon; every session-menu row gets an icon; the Windows mojibake on the **Restart DSH** row is fixed by replacing the U+23FB power symbol with a drawn SVG; and window resizing is much smoother because pane measurement, composer geometry, dock alignment and float clamping are deferred to the end of the resize/divider gesture instead of running on every frame (with pane transitions cut while the layout is busy).
|
|
104
|
+
|
|
7
105
|
## [0.11.1] - 2026-11-18
|
|
8
106
|
|
|
9
107
|
### Fixed
|
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
**中文(默认)** · [English](#english)
|
|
4
4
|
|
|
5
|
-
把 DeepSeek Harness 的对话区拆成原生多窗格工作区——左右分屏、上下分屏、田字 2×2 或自动网格,窗口放得下多少会话就开多少。每个窗格都是真实会话,拥有自己的输入框、流式输出、停止、队列、待办、附件、`/` 命令、`ask_user_question`、审批与视图页,桌面端(`dsh-app://`)同样可用。还可以把任意会话变成可拖动、可缩放的**浮窗**,在分屏与浮窗两种模式之间来回切换;或把它放进**应用内独立窗口**(关闭 / 最小化 / 最大化 /
|
|
5
|
+
把 DeepSeek Harness 的对话区拆成原生多窗格工作区——左右分屏、上下分屏、田字 2×2 或自动网格,窗口放得下多少会话就开多少。每个窗格都是真实会话,拥有自己的输入框、流式输出、停止、队列、待办、附件、`/` 命令、`ask_user_question`、审批与视图页,桌面端(`dsh-app://`)同样可用。还可以把任意会话变成可拖动、可缩放的**浮窗**,在分屏与浮窗两种模式之间来回切换;或把它放进**应用内独立窗口**(关闭 / 最小化 / 最大化 / 全屏),桌面版还可以把它放进**真正的系统窗口**(macOS 用系统 WebView、Windows 用 WebView2,独立于 DSH 主窗口,不经过浏览器);并支持从侧边栏菜单和**系统设置**两个入口操作。版本历史见 [CHANGELOG.md](CHANGELOG.md)。
|
|
6
6
|
|
|
7
7
|
## 快速开始
|
|
8
8
|
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
| 桌面端 DSH Desktop(`dsh-app://`) | 日常使用,支持完整桌面能力,推荐 | `desktop` profile,由桌面端管理 |
|
|
15
15
|
|
|
16
16
|
- 支持 DSH 0.2.0 / 0.2.1,当前针对 0.2.1-rc.2 构建。
|
|
17
|
-
- 包内 `lib/client.js`
|
|
17
|
+
- 包内 `lib/client.js` 已预构建,无 Node 原生模块、无安装脚本,客户端的 macOS / Windows / Linux 行为一致;Windows 的「系统窗口」随包附带 WebView2 SDK(约 1.1 MB,BSD-3-Clause),无需本地编译,但需要机器已安装 Microsoft Edge WebView2 运行时(Windows 11 自带,Windows 10 装过新版 Edge 即有)。
|
|
18
18
|
- 插件本身运行时不联网。
|
|
19
19
|
|
|
20
20
|
### Web:在线安装
|
|
@@ -68,6 +68,8 @@ dsh --profile web
|
|
|
68
68
|
- 分屏入口:点击侧边栏底部(设置旁)的分屏图标,或把侧边栏里的会话拖到对话区。
|
|
69
69
|
- 打开浏览器/桌面端控制台执行 `window.__dshSplitWorkspace.health()`,可看到版本、窗格数和几何状态。
|
|
70
70
|
- 如果看不到分屏入口:确认插件已启用且没有报错;如果侧边栏底部的 footer 没有渲染,插件会在对话区左下角显示兜底的分屏按钮。
|
|
71
|
+
- 恢复分屏后窗格标题栏的按钮点不动:0.13.1 及更早版本在桌面端会把被覆盖会话的原生窗口拖动区留在画布上方,点击被 Electron 原生层吞掉(浏览器里不会出现,所以 Web 端测不出来)。0.13.2 给窗格标题栏声明 `-webkit-app-region: no-drag` 修复。
|
|
72
|
+
- 恢复分屏后窗格标题栏的按钮点不动:0.13.1 及更早版本在桌面端会把被覆盖会话的原生窗口拖动区留在画布上方,点击被 Electron 原生层吞掉(浏览器里不会出现,所以 Web 端测不出来)。0.13.2 给窗格标题栏声明 `-webkit-app-region: no-drag` 修复。
|
|
71
73
|
|
|
72
74
|
### 开始分屏
|
|
73
75
|
|
|
@@ -82,6 +84,15 @@ dsh --profile web
|
|
|
82
84
|
- 右键会话 → **分屏插件**:一级菜单集中了会话的分屏与窗口操作,二级菜单包括 **加入分屏 / 退出分屏**(同一个开关,按当前状态显示)、**进入浮窗 / 退出浮窗**、**进入独立窗口 / 退出独立窗口**、**进入系统窗口 / 退出系统窗口**。每个条目都按当前状态显示“进入”或“退出”;窗口关闭(包括点窗口自身的关闭按钮)后,菜单会自动回到“进入”状态。
|
|
83
85
|
- **关闭窗格(标题栏 ✕)或退出分屏时,只要剩余会话少于两个就整体退出分屏**:窗格树和所有会话的分屏状态会一起清空,不会留下「菜单里显示分屏中、却没有被选中」的残留状态。只剩一个窗格的分屏不成立,所以不保留隐藏的单窗格树。
|
|
84
86
|
|
|
87
|
+
## 分屏视图菜单(左侧栏,0.12.0)
|
|
88
|
+
|
|
89
|
+
- 左侧栏顶部的面板导航新增 **分屏视图** 一行,和 **插件** 同级;行首是插件的分屏图标。左下角分屏按钮、会话右键 **分屏插件** 一级菜单也用同一个图标。
|
|
90
|
+
- 点击 **分屏视图**,主区切换到 **分屏视图面板**:已经有两个及以上窗格时,直接显示与“恢复分屏”相同的界面(窗格、分隔条、窗格工具栏都在这里);还没有分屏时,页面里是 **添加分屏** 多选框,勾选两个或更多会话并确定后立即显示分屏界面。
|
|
91
|
+
- 在面板里点左下角菜单的 **最小化分屏** 会回到会话界面;**退出分屏** 会清空窗格并返回会话。切到左侧栏的某个会话或插件面板时布局会保留,随时点回 **分屏视图** 继续。
|
|
92
|
+
- **切换不再重建窗格(0.13.0)**:画布始终挂载在覆盖层里,只是在「分屏视图」、普通会话、最小化和插件面板之间显示/隐藏。隐藏后的 **20 秒内**窗格保持挂载(暖缓存),所以在「分屏视图 ⇄ 会话」「最小化 ⇄ 恢复分屏」之间来回切换时几乎瞬时,不会重新挂载每次都要重连会话和编辑器的原生对话;超过 20 秒才释放窗格树(对长时间最小化省资源)。隐藏期间画布的布局仍保留,因此恢复是可见性切换而不是整棵树重排。
|
|
93
|
+
- **最小化胶囊(0.13.0)**:最小化后出现的「恢复分屏」胶囊可以拖到工作区任意位置,松手吸附到**最近的边缘**——沿边的位置随你放,不再只限四个角;位置会记住,下次最小化仍在原处。
|
|
94
|
+
- 左下角按钮菜单里的 **重启 DSH** 图标改为绘制的 SVG(旧版使用 U+23FB 电源符号,Windows 默认字体缺这个字形,会显示成乱码方框);菜单、侧栏、右键菜单里的图标全部是内嵌 SVG,不依赖系统字体。
|
|
95
|
+
|
|
85
96
|
## 使用帮助(界面指引)
|
|
86
97
|
|
|
87
98
|
插件内的 **分屏帮助**(菜单里的「分屏帮助」、窗格标题栏的 `?`,或设置页的「分屏帮助」)现在已经带三张界面指引截图,点击缩略图可以查看大图:
|
|
@@ -116,16 +127,18 @@ dsh --profile web
|
|
|
116
127
|
|
|
117
128
|
- **进入独立窗口**(0.11.0 起收在「分屏插件」二级菜单;早期版本为「在独立窗口打开」):在 DSH 应用内部打开一个只显示该会话的窗口,提供 **关闭 / 最小化 / 最大化-还原 / 全屏**;双击标题栏切换最大化,最小化后收成左下角的恢复胶囊。该会话已经在这个窗口里时,菜单显示 **退出独立窗口**;关闭窗口后菜单回到「进入独立窗口」。
|
|
118
129
|
- 打开时该会话会从分屏 / 浮窗 / 待分屏中移出,避免同一会话同时被两个输入框编辑;关闭独立窗口不会删除会话,它仍在侧栏里,可随时重新加入分屏。
|
|
119
|
-
- **为什么不是 Electron 原生窗口?** DSH Desktop 的 Electron 主进程只保留一个应用窗口,主窗口的 `setWindowOpenHandler` 拒绝用 `window.open` 创建第二个原生窗口(http/https 只交给系统浏览器);插件的 Host 进程是 Node 子进程,没有 Electron `BrowserWindow` API。所以 0.10.0 把这一层做成**应用内独立窗口**(不再打开浏览器、没有地址栏,窗口控制由插件自己绘制);macOS
|
|
130
|
+
- **为什么不是 Electron 原生窗口?** DSH Desktop 的 Electron 主进程只保留一个应用窗口,主窗口的 `setWindowOpenHandler` 拒绝用 `window.open` 创建第二个原生窗口(http/https 只交给系统浏览器);插件的 Host 进程是 Node 子进程,没有 Electron `BrowserWindow` API。所以 0.10.0 把这一层做成**应用内独立窗口**(不再打开浏览器、没有地址栏,窗口控制由插件自己绘制);macOS / Windows 上另见下一节的「系统窗口」,分别用系统 WebView 与 WebView2 实现真正的独立窗口。
|
|
120
131
|
- 限制:它仍在 DSH 主窗口内部(不是操作系统级第二窗口),不能拖到 DSH 窗口之外。
|
|
121
132
|
|
|
122
|
-
##
|
|
133
|
+
## 系统窗口(原生独立窗口,0.11.0 macOS / 0.14.0 Windows)
|
|
123
134
|
|
|
124
|
-
- 右键会话 → **分屏插件** → **进入系统窗口**:在 macOS 上打开一个**真正的操作系统窗口**。它不是 DSH 主窗口里的一层浮层,可以拖到主窗口之外、单独缩放和关闭,不会打开浏览器,也没有地址栏。该会话的系统窗口已经打开时,菜单显示 **退出系统窗口**;在窗口里点关闭(或从菜单退出)后,菜单会自动回到「进入系统窗口」。
|
|
135
|
+
- 右键会话 → **分屏插件** → **进入系统窗口**:在 macOS 或 Windows 上打开一个**真正的操作系统窗口**。它不是 DSH 主窗口里的一层浮层,可以拖到主窗口之外、单独缩放和关闭,不会打开浏览器,也没有地址栏。该会话的系统窗口已经打开时,菜单显示 **退出系统窗口**;在窗口里点关闭(或从菜单退出)后,菜单会自动回到「进入系统窗口」。
|
|
125
136
|
- 窗口内容仍然是这个会话的真实客户端:**左侧栏不显示**(会话占满窗口),**右侧栏、对话头部、输入框、视图页等都照常保留**,右上角的「打开右侧边栏」依然可用。
|
|
126
|
-
-
|
|
127
|
-
-
|
|
128
|
-
-
|
|
137
|
+
- **实现方式(macOS)**:DSH 没有向插件开放 Electron `BrowserWindow`,所以插件 Host 用系统自带的 AppKit `NSWindow` + `WKWebView`(`osascript` 运行 `native/system-window.jxa`)打开窗口,并让这个 WebView 加载 Host 的**本机认证 Web 客户端**。认证 URL 由 Host 在进程内生成,只传给本机 Helper,**不会返回给渲染层**;哈希标记让同一份客户端代码在窗口内切换成「系统窗口模式」。
|
|
138
|
+
- **实现方式(Windows)**:Host 用 `powershell.exe` 启动 `native/system-window.ps1`,由 PowerShell + WinForms 建窗口、内嵌 WebView2 控件加载同一份认证 Web 客户端。`native/webview2/` 随包附带 WebView2 SDK(`Microsoft.Web.WebView2.Core.dll`、`Microsoft.Web.WebView2.WinForms.dll` 与 x64/arm64 的 `WebView2Loader.dll`,BSD-3-Clause),每个窗口使用独立的临时 WebView2 配置目录;关窗或退出 DSH 时连同 `msedgewebview2` 进程树一起结束。
|
|
139
|
+
- **平台**:macOS 与 Windows。Linux(或 Web 客户端)上点击会提示改用「进入独立窗口」,不会退回浏览器。Windows 缺少 **Microsoft Edge WebView2 运行时**时会提示先安装再试。窗口标题跟随会话标题;关闭窗口即结束 Helper 进程,退出 DSH 时也会一并关闭这些窗口。
|
|
140
|
+
- macOS 的 Helper 是辅助型进程,不占 Dock 图标,因此**没有最小化按钮**(避免最小化后无法从 Dock 恢复);提供关闭、缩放和标题栏拖动。Windows 使用系统标题栏,最小化 / 最大化 / 关闭都可用。
|
|
141
|
+
- **菜单定位**:DSH 的弹层菜单用 CSS Anchor Positioning(`position-anchor` + `anchor()`)把自己挂在触发按钮旁边;Chromium(主窗口)支持,但 macOS 的 WKWebView 不支持,菜单会退到窗口左上角、盖住标题栏。系统窗口模式下插件会检测这一能力缺失,并按菜单自带的 `data-anchor-side` / `data-anchor-align`(以及模型选择器的锚点自定义属性)在触发按钮旁重新定位:向上打开的菜单贴着按钮上沿、右对齐,并限制最大高度。
|
|
129
142
|
- **注意**:系统窗口是独立的 Web 客户端,所以桌面端专属能力(如原生文件拖拽、系统目录选择器)在窗口内的行为以 Web 客户端为准;会话数据与主窗口共享同一个 Host,输入、流式输出和右侧栏功能正常。
|
|
130
143
|
|
|
131
144
|

|
|
@@ -136,7 +149,7 @@ dsh --profile web
|
|
|
136
149
|
|
|
137
150
|
- **状态**:插件版本、窗格数、待分屏数、浮窗数、当前独立窗口。
|
|
138
151
|
- **性能模式**:开关(默认开启),影响动画、后台观察器和拖动缩略图。
|
|
139
|
-
-
|
|
152
|
+
- **操作**:打开分屏视图、添加分屏、退出分屏、最小化分屏、重置分屏、刷新界面、重启 DSH(桌面版)、帮助。
|
|
140
153
|
|
|
141
154
|
设置页里的“添加分屏”会先关闭设置面板再打开多选弹框,避免弹框被设置面板遮挡;其余操作就地执行并实时刷新状态。
|
|
142
155
|
|
|
@@ -150,6 +163,10 @@ dsh --profile web
|
|
|
150
163
|
- 拖动会话/窗格时**完全不渲染缩略图预览**(不克隆对话 DOM,也没有逐帧移动的预览窗口);拖入目标、布局预览和放置反馈仍然保留。
|
|
151
164
|
- 真实会话、输入、停止、审批、分屏 / 浮窗 / 独立窗口功能全部保留。
|
|
152
165
|
|
|
166
|
+
- **0.12.0:窗口缩放不再逐帧测量。** 拖动窗口边缘缩放时,每个窗格的尺寸观察器过去会在每一帧提交新的窗格尺寸(并重建 composer 测量、重算对齐行宽),窗格越多越卡。现在缩放窗口 / 拖动分隔条期间只保留浏览器自身的 CSS 重排,所有 JS 测量与派生状态(窗格窄/短判定、composer 卡片几何、对齐行宽、浮窗钳制)统一等待手势结束后执行一次;缩放期间同时关闭窗格过渡,避免 180ms 的宽度过渡“追着”窗口边缘跑。性能模式下更进一步:**窗口缩放时画布保持手势开始时的内部布局,用 CSS transform 跟随窗口边缘缩放到新尺寸**,这样每个窗格里的原生对话不会在每一帧重新测量滚动区域,松手后再一次性重排到真实尺寸(拖动过程中文字会有轻微拉伸,松手即恢复清晰)。性能模式同样受益。
|
|
167
|
+
|
|
168
|
+
开发机实测(Chromium 无头、性能模式、2 窗格、连续拖动窗口 40 步):冻结开启 vs 关闭,整段手势的主线程任务时长中位数 **2.1s vs 3.2s**,长任务 **1 个 vs 17 个**,阻塞时间 **9ms vs 461ms**,平均帧间隔 **25.7ms vs 59.1ms**;4 窗格时长任务 **6 个 vs 38 个**、阻塞时间 **85ms vs 989ms**。面板模式(`分屏视图`)因为不再有被遮住的原生会话,剩余开销更低。
|
|
169
|
+
|
|
153
170
|
**仍然可能卡的原因**:每个窗格都是一个完整的原生对话视图,N 个会话同时流式输出就是 N 份 React/DOM 渲染与滚动更新,这是 DSH 客户端本身的主要成本,插件无法消除(除非上游支持离屏暂停/虚拟化)。在 Windows + 低单核性能的机器上,建议同时保持 2–3 个活动窗格、少开浮窗、把不用的分屏最小化;输入框可切到紧凑 TUI 模式;如果装了 `dsh-prompt-history`,它的 TOC 同步在性能模式下会被暂停。
|
|
154
171
|
|
|
155
172
|
诊断入口:`window.__dshSplitWorkspace.health()` 查看 `performance`、`panes`、`geometry`、`active`;用 DevTools Performance 对比开启性能模式前后的长任务。
|
|
@@ -161,6 +178,8 @@ DSH 0.2.x(含 Desktop 0.2.2-rc.3)带 HMR:新安装的插件会被热加载
|
|
|
161
178
|
- 插件管理器明确提示 `restart-required`(Host 半边、被链接包的宿主模块发生变化,或包目录被移动);
|
|
162
179
|
- 安装后侧边栏底部几秒内没有出现分屏图标(少数没有 HMR 的旧版 DSH)。
|
|
163
180
|
|
|
181
|
+
**0.12.0 / 0.13.0 的新面板、图标、切换暖缓存和缩放优化都在客户端 bundle 里**,重建 `lib/client.js` 后同样由 HMR 热替换,不需要重启 DSH。
|
|
182
|
+
|
|
164
183
|
**0.11.1 修复:重建客户端 bundle 后不再需要重启。** 之前每次重建 `lib/client.js` 后分屏按钮、右键菜单和「设置 → 分屏工作区」都会消失,必须刷新页面或重启 DSH 才回来——原因是插件工厂重复定义只读诊断接口 `__test` 时抛出 `Cannot redefine property`,整次加载被中断(DSH 会把它记为“本页面的插件未能完成同步”)。现在每次 bundle 执行都会创建一个新的公开对象,所以**热替换重建后的 bundle、在设置 → 插件里禁用后再启用、以及从 0.11.0 热升级到 0.11.1,都在同一个页面内就地生效**,不需要刷新或重启。
|
|
165
184
|
|
|
166
185
|
DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart App and Host`)。从本插件的 0.9.0 起:
|
|
@@ -174,6 +193,8 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
174
193
|
|
|
175
194
|
## 功能
|
|
176
195
|
|
|
196
|
+
- **切换零重建 + 手势暖缓存(0.13.0)**:分屏画布常驻,切换「分屏视图 / 普通会话 / 最小化 / 插件面板」不再卸载重挂原生窗格;最小化胶囊可拖到任意位置并吸附最近边缘。
|
|
197
|
+
- **左侧栏「分屏视图」面板(0.12.0)**:左侧栏顶部与「插件」同级的面板入口,点击在主区打开分屏视图;已有分屏时直接显示窗格界面,没有分屏时显示添加分屏多选框,选满两个会话立即分屏。
|
|
177
198
|
- **侧边栏分屏菜单**:底部分屏按钮弹出「添加分屏 / 退出分屏 / 最小化分屏 / 性能模式 / 刷新界面 / 重启 DSH / 分屏帮助 / 重置分屏」,其中退出和最小化与顶部工具栏完全一致,「分屏帮助」直接打开带截图的帮助卡片。
|
|
178
199
|
- **多选添加分屏**:弹框可搜索、可多选;已分屏时默认勾选当前窗格,可取消或追加,按最终勾选结果分屏。
|
|
179
200
|
- **会话右键集成**:原生右键菜单新增「分屏插件」二级菜单,其中「加入分屏 / 退出分屏」按状态显示为同一个开关;未分屏时先进入待分屏,满两个才分屏,退出到只剩一个自动退出分屏。
|
|
@@ -204,7 +225,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
204
225
|
- 没有固定窗格上限:窗口能显示多少会话就能加多少(窗格变窄时标题栏会自动紧凑)。
|
|
205
226
|
- 存在分屏时,共享的原生侧边栏跟随聚焦窗格;点击会话即载入该窗格,或把会话拖到分屏区域新增/替换窗格。
|
|
206
227
|
- 窗格树在刷新和重启后保留(包括手工拖出的堆叠或 L 形布局);增删窗格会重新适配自动网格,重启不会。
|
|
207
|
-
-
|
|
228
|
+
- **最小化**(工具栏或底部菜单)会隐藏分屏、显示原生单会话视图,同时保留窗格树;「恢复分屏」胶囊可以恢复(可拖到任意位置、吸附最近边缘,位置会记住)。点击其他会话会把分屏收成胶囊;打开插件/技能/设置面板时画布只是暂时隐藏(窗格保持挂载),回到会话或「分屏视图」后自动恢复,不再需要点恢复胶囊。
|
|
208
229
|
- 每个窗格只有一个标题:标题由窗格标题栏负责;原生标题栏保留视图页和操作,不重复面包屑。关闭按钮是红底描边的 **✕**,不是低对比度圆点。
|
|
209
230
|
- 如果安装了 `dsh-prompt-history`,它的可拖动 **会话目录 (☰)** 握把会在每个活动窗格的左边缘垂直居中显示一次。每次分屏调整(新增、关闭、重排、拖动分隔条、最大化或右侧栏推挤)都会把受影响的握把重新放回窗格左边缘与垂直中心;没有变化的窗格保留手动拖动的位置。隐藏的原生会话和非窗格视图里的副本会被隐藏,握把不再堆叠。
|
|
210
231
|
- 分屏工具栏的右侧栏按钮有**两种状态**:面板关闭时是右箭头(点击打开),打开时是高亮的左箭头(点击收起)。修复监听器会在分屏拆除后接管原生的打开/收起按钮,避免过期的 sidebar-right store 吞掉点击或隐藏入口。
|
|
@@ -216,7 +237,7 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
216
237
|
|
|
217
238
|
## 命令
|
|
218
239
|
|
|
219
|
-
- `window.__dshSplitWorkspace.health()
|
|
240
|
+
- `window.__dshSplitWorkspace.health()`:版本、宿主、窗格、几何、持久化树、崩溃保护;`panelWarm` 表示画布正处在暖缓存隐藏中,`canvasRepairs` 记录画布显示后自检修复交互样式的次数(正常为 0)。
|
|
220
241
|
- `window.__dshSplitWorkspace.split(sessionId)`:把会话加为窗格。
|
|
221
242
|
- `window.__dshSplitWorkspace.addToSplit(sessionId)` / `removeFromSplit(sessionId)`:加入 / 退出分屏(未分屏时先进入待分屏)。
|
|
222
243
|
- `window.__dshSplitWorkspace.float(sessionId)`:把会话变成浮窗(自动从分屏/待分屏移出)。
|
|
@@ -224,12 +245,13 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
224
245
|
- `window.__dshSplitWorkspace.closeFloat(sessionId)`:关闭浮窗(不放回分屏)。
|
|
225
246
|
- `window.__dshSplitWorkspace.floats()`:当前浮窗的会话 id 列表(按创建顺序)。
|
|
226
247
|
- `window.__dshSplitWorkspace.openSystemWindow(sessionId)`:在应用内独立窗口打开该会话(`openIndependentWindow` 是同一功能的别名)。
|
|
227
|
-
- `window.__dshSplitWorkspace.openNativeWindow(sessionId)
|
|
248
|
+
- `window.__dshSplitWorkspace.openNativeWindow(sessionId)`:在原生系统窗口(macOS / Windows)打开该会话;Linux 或非桌面版会提示改用独立窗口。
|
|
228
249
|
- `window.__dshSplitWorkspace.closeNativeWindow(sessionId)`:关闭该会话的系统窗口。
|
|
229
250
|
- `window.__dshSplitWorkspace.nativeWindows()`:当前已打开系统窗口的会话 id 列表。
|
|
230
251
|
- `window.__dshSplitWorkspace.appWindow()`:当前独立窗口状态(`{ id, minimized, maximized }` 或 `null`)。
|
|
231
252
|
- `window.__dshSplitWorkspace.setPerformanceMode(true/false)`:开关性能模式(持久化)。
|
|
232
253
|
- `window.__dshSplitWorkspace.performanceMode()`:当前是否处于性能模式。
|
|
254
|
+
- `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true|false)`:性能模式下窗口缩放时是否冻结画布内部布局、用 CSS 缩放跟随窗口边缘(默认开启)。
|
|
233
255
|
- `window.__dshSplitWorkspace.reloadClient()`:刷新页面。
|
|
234
256
|
- `window.__dshSplitWorkspace.restartApp()`:退出并重新打开 DSH 桌面版(需要完整重启时使用)。
|
|
235
257
|
- `window.__dshSplitWorkspace.pending()`:当前待分屏的会话 id。
|
|
@@ -258,15 +280,18 @@ DSH **生产版没有内置的“重启”菜单项**(开发版才有 `Restart
|
|
|
258
280
|
| `09-pane-renderers` | 原生/降级对话与输入框渲染器 |
|
|
259
281
|
| `10-pane-frame` | 窗格标题栏、关闭/浮窗按钮、composer 测量 |
|
|
260
282
|
| `11-canvas-navigation` | 画布/分隔条、会话选择器、键盘导航、公共 API 前置 |
|
|
261
|
-
| `12-chrome` |
|
|
283
|
+
| `12-chrome` | 安全模式/帮助/提示、「分屏视图」主面板、窗口缩放冻结、更新通知、座位 |
|
|
262
284
|
| `13-drag-bridge` | 未激活时的拖入分屏桥 |
|
|
263
285
|
| `14-launcher` | 底部菜单、多选添加分屏弹框、会话菜单集成 |
|
|
264
286
|
| `15-float-window` | 浮窗组件与图层 |
|
|
265
287
|
| `16-standalone` | 应用内独立窗口组件、窗口层与恢复胶囊,以及系统窗口的模式切换与请求 |
|
|
266
288
|
| `17-api-apply` | `window.__dshSplitWorkspace` API、`apply()` 与导出 |
|
|
267
289
|
| `native/system-window.jxa` | macOS 系统窗口 Helper(AppKit `NSWindow` + `WKWebView`,由 Host 通过 `osascript` 启动) |
|
|
290
|
+
| `native/system-window.ps1` | Windows 系统窗口 Helper(PowerShell + WinForms 宿主 WebView2,由 Host 通过 `powershell.exe` 启动) |
|
|
291
|
+
| `native/webview2/` | 随包附带的 WebView2 SDK 二进制(BSD-3-Clause,约 1.1 MB,含 x64 / arm64 loader) |
|
|
268
292
|
|
|
269
293
|
- `npm run build`:重新生成 `lib/client.js`;`npm test` 会先跑 `build:check`,源码/产物不一致会失败。
|
|
294
|
+
- `npm run check:anchor`:在真实 WKWebView 里验证系统窗口的菜单锚点回落(macOS 专用;CI 在 Ubuntu 上不跑)。
|
|
270
295
|
- 为什么不用打包器:DSH 客户端只加载一个 `<plugin>/client.js`,片段共享同一个 module-loader 闭包,按顺序拼接即可;这样发布包保持零依赖、无构建依赖。
|
|
271
296
|
- 修改代码时改 `src/client/` 对应片段,然后 `npm run build`;`lib/client.js` 顶部有一行 GENERATED 标记。
|
|
272
297
|
|
|
@@ -292,7 +317,8 @@ will land:
|
|
|
292
317
|
- 没有窗格数量上限;持久化树会校验(会话唯一、深度),损坏的树会被丢弃,而不是恢复一个坏掉的工作区。
|
|
293
318
|
- 「浮窗」是应用内窗口,不是 Electron 原生第二窗口:DSH Desktop 主窗口禁用了 `window.open`,Web 客户端也没有会话深链;浮窗复用真实会话组件、可拖动缩放,但仍在 DSH 主窗口内渲染(详见上面的「为什么浮窗不是系统级独立窗口?」)。
|
|
294
319
|
- 浮窗和分屏窗格互斥;同一会话不会同时以两种形态渲染,避免共享编辑器冲突。
|
|
295
|
-
- 「独立窗口」是应用内窗口:它不打开浏览器、没有地址栏,但不能移出 DSH
|
|
320
|
+
- 「独立窗口」是应用内窗口:它不打开浏览器、没有地址栏,但不能移出 DSH 主窗口。桌面版(macOS / Windows)另提供「进入系统窗口」(系统 WebView / WebView2,真正的独立窗口);DSH 本身仍未向插件开放 Electron `BrowserWindow`。独立窗口内的会话同样互斥于分屏和浮窗。
|
|
321
|
+
- 「系统窗口」是独立的 Web 客户端:需要 DSH 桌面版 + macOS,或 Windows + Microsoft Edge WebView2 运行时;它不共享主窗口的桌面专属能力(原生文件拖拽、系统目录选择器)。
|
|
296
322
|
- 持久化递归深度上限为 32 层,是为了手改数据时的栈安全,不是窗格上限。
|
|
297
323
|
- 隐藏的原生会话仍在遮罩下流式运行;窗格重新挂载原生输入框,所以每个窗格自己的输入框拥有该会话的编辑器。
|
|
298
324
|
- 窗格重命名拒绝空会话(原生重命名对话框同样如此)。
|
|
@@ -310,8 +336,9 @@ MIT。见 `THIRD-PARTY-NOTICES.md`。
|
|
|
310
336
|
as you need, side by side, stacked, or in a 2×2 / automatic grid.** Any
|
|
311
337
|
conversation can also become a movable, resizable **floating window**, switch
|
|
312
338
|
between the two modes at any time, move into an **in-app independent window**
|
|
313
|
-
(close / minimize / maximize / fullscreen), or —
|
|
314
|
-
**native OS window** (system WebView
|
|
339
|
+
(close / minimize / maximize / fullscreen), or — in DSH Desktop on macOS or
|
|
340
|
+
Windows — open a real **native OS window** (system WebView on macOS, WebView2 on
|
|
341
|
+
Windows; no browser, no left sidebar) for one
|
|
315
342
|
conversation. The session menu's **Split plugin** submenu holds the
|
|
316
343
|
`Join split / Leave split` toggle together with all three window surfaces,
|
|
317
344
|
each showing **Exit …** while that surface is open.
|
|
@@ -331,7 +358,8 @@ attachments, `/` commands, `ask_user_question`, approvals and view tabs.
|
|
|
331
358
|
**Search terms / 搜索关键词**:split screen, split view, split pane, multi-pane,
|
|
332
359
|
multi-session, multi-window, tiled workspace, unlimited panes, DSH Desktop,
|
|
333
360
|
分屏, 分屏插件, 多窗格, 多窗口, 多会话, 左右分屏, 上下分屏, 并排, 田字布局,
|
|
334
|
-
系统窗口, 原生窗口, macOS system window,
|
|
361
|
+
系统窗口, 原生窗口, macOS system window, Windows system window, WebView2,
|
|
362
|
+
native window.
|
|
335
363
|
|
|
336
364
|
The pane engine is derived from
|
|
337
365
|
[dsh-split-screen](https://github.com/YEYEYEYESHIFU/dsh-split-screen) 1.7.0
|
|
@@ -348,7 +376,7 @@ layout, the unlimited pane count, rename/copy/maximize and the compact toolbar.
|
|
|
348
376
|
| DSH Desktop (`dsh-app://`) | Daily use with full desktop features (recommended) | `desktop`, managed by the app |
|
|
349
377
|
|
|
350
378
|
- DSH 0.2.0 / 0.2.1 are supported; this build targets 0.2.1-rc.2.
|
|
351
|
-
- The package ships a prebuilt `lib/client.js
|
|
379
|
+
- The package ships a prebuilt `lib/client.js` with no Node native modules and no install scripts; the client behaves the same on macOS / Windows / Linux. The Windows system window ships the WebView2 SDK (about 1.1 MB, BSD-3-Clause) and only needs the Microsoft Edge WebView2 Runtime (built into Windows 11, present on Windows 10 with a current Edge).
|
|
352
380
|
- The plugin itself makes no network requests at runtime.
|
|
353
381
|
|
|
354
382
|
**Web: online install**
|
|
@@ -399,6 +427,7 @@ dsh --profile web
|
|
|
399
427
|
- Entry points: the split icon in the sidebar footer (beside Settings), or drag a conversation from the sidebar onto the conversation column.
|
|
400
428
|
- Run `window.__dshSplitWorkspace.health()` in the browser/desktop console to see the version, pane count and geometry.
|
|
401
429
|
- If the split entry is missing: make sure the plugin is enabled and has no error. When the stock sidebar footer does not render this plugin's action, the plugin shows a fallback split button at the conversation area's bottom-left corner.
|
|
430
|
+
- Pane header buttons dead after restoring a minimized split: 0.13.1 and earlier left the covered conversation's native window-drag region above the canvas on Desktop, so Electron swallowed those clicks before the DOM (browsers ignore app-region, which is why the web build could not reproduce it). 0.13.2 declares `-webkit-app-region: no-drag` on the pane header.
|
|
402
431
|
|
|
403
432
|
**Start splitting**
|
|
404
433
|
|
|
@@ -413,6 +442,37 @@ dsh --profile web
|
|
|
413
442
|
- Right-click any conversation (or its row `⋯` button) → **Enter floating window** to detach it into a movable window. Drag its title bar to move it, drag any edge to resize, use **⇲ Dock to split** to put it back into a split, or **✕** to close the float. A conversation is never hosted in both modes: entering a float removes it from the split / pending split first.
|
|
414
443
|
- Right-click a conversation → **Open in independent window** to open it alone in an in-app window with close / minimize / maximize-restore / fullscreen controls — no browser is opened.
|
|
415
444
|
|
|
445
|
+
### Split view entry in the sidebar (0.12.0)
|
|
446
|
+
|
|
447
|
+
- The sidebar's global-panel navigation now has a **Split view** row next to
|
|
448
|
+
**Plugins**, with the plugin's split glyph. The bottom-left split button and
|
|
449
|
+
the session right-click **Split plugin** group use the same glyph.
|
|
450
|
+
- Clicking **Split view** switches the main column to the **Split view panel**:
|
|
451
|
+
with two or more panes it shows the same canvas you get from “Restore split”
|
|
452
|
+
(panes, dividers and the layout toolbar); with fewer panes it shows the
|
|
453
|
+
**Add split** multi-select page, and confirming two or more conversations
|
|
454
|
+
opens the split right there.
|
|
455
|
+
- **Minimize split** from the footer menu now returns to the conversation
|
|
456
|
+
view, and **Exit split** clears the panes and returns as well. Switching to a
|
|
457
|
+
conversation or another plugin panel in the sidebar keeps the layout; click
|
|
458
|
+
**Split view** again to continue.
|
|
459
|
+
- **Switching no longer re-creates the panes (0.13.0)**: the canvas always stays
|
|
460
|
+
mounted in the overlay layer and is only shown/hidden between the Split view
|
|
461
|
+
panel, a plain conversation, the minimized state and plugin panels. While
|
|
462
|
+
hidden it is kept mounted for **20 seconds** (warm hold), so Split view ⇄
|
|
463
|
+
conversation and minimize ⇄ restore are near-instant instead of re-attaching
|
|
464
|
+
every native conversation (session retain + editor guards) each time. After
|
|
465
|
+
the warm window the pane tree is dropped to free resources; the hidden canvas
|
|
466
|
+
also stays in layout, so showing it again is a visibility flip rather than a
|
|
467
|
+
full re-layout of N conversations.
|
|
468
|
+
- **Minimize chip (0.13.0)**: the restore chip shown while the split is
|
|
469
|
+
minimized can be dragged anywhere in the workspace and snaps to the **nearest
|
|
470
|
+
edge** on release — the position along that edge is kept, so it is no longer
|
|
471
|
+
limited to the four corners. The position persists across minimize cycles.
|
|
472
|
+
- The **Restart DSH** row now uses a drawn SVG instead of the U+23FB power
|
|
473
|
+
symbol (missing from the default Windows CJK font stack, where it rendered as
|
|
474
|
+
a mojibake box). Every new icon is inline SVG, so no system font is involved.
|
|
475
|
+
|
|
416
476
|
### Usage help (screenshots)
|
|
417
477
|
|
|
418
478
|
The in-app **Split help** card now carries three annotated screenshots — the
|
|
@@ -486,13 +546,45 @@ logic stays unchanged.
|
|
|
486
546
|
multi-window support, this layer can become a real system window without
|
|
487
547
|
changing the conversation-switching logic.
|
|
488
548
|
|
|
549
|
+
### System window (native OS window, macOS + Windows)
|
|
550
|
+
|
|
551
|
+
- Right-click a conversation → **Split plugin** → **Enter system window** opens a
|
|
552
|
+
**real OS window**: movable outside the DSH main window, resizable and closable
|
|
553
|
+
on its own, with no browser and no address bar. While it is open the menu shows
|
|
554
|
+
**Exit system window**, and closing the window itself flips the menu back.
|
|
555
|
+
- The window shows the real conversation client: **no left sidebar** (the
|
|
556
|
+
conversation fills the window) while the **right sidebar**, header, composer and
|
|
557
|
+
view tabs stay available.
|
|
558
|
+
- **macOS** uses an AppKit `NSWindow` + `WKWebView` helper
|
|
559
|
+
(`native/system-window.jxa`, started with `osascript`); **Windows** uses a
|
|
560
|
+
WinForms window hosting WebView2 (`native/system-window.ps1`, started with
|
|
561
|
+
`powershell.exe`). Both load the Host's **locally authenticated web client**:
|
|
562
|
+
the URL is minted inside the Host and never returned to the renderer, and a hash
|
|
563
|
+
marker turns the same client into the single-conversation system-window mode.
|
|
564
|
+
- **Platforms**: macOS and Windows. Linux (or the Web client) is told to use the
|
|
565
|
+
independent window instead, and a missing Microsoft Edge WebView2 Runtime is
|
|
566
|
+
reported explicitly on Windows. The helper ships with the package (about 1.1 MB)
|
|
567
|
+
and needs no local build; each window gets its own temporary WebView2 profile,
|
|
568
|
+
and closing it ends the whole helper process tree.
|
|
569
|
+
- **Menu placement**: the stock DSH menus portal themselves next to their trigger
|
|
570
|
+
with CSS Anchor Positioning (`position-anchor` + `anchor()`). Chromium supports
|
|
571
|
+
it, WebKit/WKWebView does not, so dropdowns would otherwise fall back to the
|
|
572
|
+
window's top-left corner. In the system window the plugin detects that gap and
|
|
573
|
+
re-anchors those panels next to the trigger they opened from, using the
|
|
574
|
+
`data-anchor-side` / `data-anchor-align` attributes and the model selector's
|
|
575
|
+
anchor custom property; upward menus sit above the trigger, right-aligned and
|
|
576
|
+
height-capped.
|
|
577
|
+
- Desktop-only capabilities (native file drag, system directory picker) follow the
|
|
578
|
+
Web client inside the window; conversations share the same Host, so input,
|
|
579
|
+
streaming and the right sidebar work normally.
|
|
580
|
+
|
|
489
581
|
### Settings entry
|
|
490
582
|
|
|
491
583
|
Besides the sidebar-footer split button, the plugin registers a **Settings → Split workspace** page (`settings.section`) so the controls remain reachable when the footer entry is hidden. The page shows:
|
|
492
584
|
|
|
493
585
|
- **Status**: plugin version, pane count, pending split, floating windows, and the current independent window.
|
|
494
586
|
- **Performance mode**: the persisted switch (on by default) for animations, background observers and the drag preview.
|
|
495
|
-
- **Actions**: add split, exit split, minimize split, reset split, refresh interface, restart DSH (Desktop), help.
|
|
587
|
+
- **Actions**: open split view, add split, exit split, minimize split, reset split, refresh interface, restart DSH (Desktop), help.
|
|
496
588
|
|
|
497
589
|
“Add split” closes the Settings panel before opening the multi-select dialog so the dialog is never hidden behind it; the other actions run in place and refresh the status live.
|
|
498
590
|
|
|
@@ -520,6 +612,28 @@ turns off:
|
|
|
520
612
|
Real conversations, composers, approval flows, split/float/system-window
|
|
521
613
|
features all stay available.
|
|
522
614
|
|
|
615
|
+
- **0.12.0: window resizing no longer measures every frame.** While dragging
|
|
616
|
+
the window edge, each pane's size observer used to commit a new pane box on
|
|
617
|
+
every frame (re-rendering the pane and re-running the composer measurement and
|
|
618
|
+
dock alignment); more panes meant more jank. Now the browser's own CSS reflow
|
|
619
|
+
runs alone during the gesture, and all JS measurement and derived state (slim
|
|
620
|
+
header / short-pane decision, composer-card geometry, dock row width, float
|
|
621
|
+
clamping) runs once when the resize or divider drag settles. Pane transitions
|
|
622
|
+
are also cut while resizing, so a 180 ms width transition cannot chase the live
|
|
623
|
+
window edge. In performance mode, the canvas additionally keeps its gesture-start inner
|
|
624
|
+
layout during a window resize and follows the live window edge through a CSS
|
|
625
|
+
transform, so the stock conversation views inside the panes do not re-measure
|
|
626
|
+
their scrollers on every frame; at settle it relayouts once at the real size
|
|
627
|
+
(text is slightly scaled during the drag and crisps up immediately after).
|
|
628
|
+
Performance mode benefits too.
|
|
629
|
+
|
|
630
|
+
Measured on a dev machine (headless Chromium, performance mode, 2 panes, one
|
|
631
|
+
continuous 40-step window drag): freeze ON vs OFF — median main-thread task time
|
|
632
|
+
across the gesture **2.1 s vs 3.2 s**, long tasks **1 vs 17**, total blocking time
|
|
633
|
+
**9 ms vs 461 ms**, average frame interval **25.7 ms vs 59.1 ms**; with 4 panes,
|
|
634
|
+
long tasks **6 vs 38** and blocking **85 ms vs 989 ms**. The panel entry has less
|
|
635
|
+
left to do because no covered stock conversation stays mounted.
|
|
636
|
+
|
|
523
637
|
**What can still lag**: every pane is a full native conversation view, so N panes
|
|
524
638
|
streaming at once means N independent React/DOM render and scroll pipelines —
|
|
525
639
|
the dominant upstream cost, which a renderer plugin cannot remove (that would
|
|
@@ -540,6 +654,8 @@ installs/updates therefore need **no restart**. A restart is only needed when:
|
|
|
540
654
|
- the footer split icon still has not appeared a few seconds after install (some
|
|
541
655
|
older DSH builds without HMR).
|
|
542
656
|
|
|
657
|
+
**The 0.12.0 / 0.13.0 panel, icons, warm-switch and resize work all live in the client bundle**, so a rebuilt `lib/client.js` is hot-swapped by HMR as well — no DSH restart.
|
|
658
|
+
|
|
543
659
|
**Fixed in 0.11.1: rebuilding the client bundle no longer needs a restart.** A
|
|
544
660
|
rebuild of `lib/client.js` used to make the footer button, the session menus and
|
|
545
661
|
**Settings → Split workspace** disappear until the page was reloaded, because the
|
|
@@ -575,6 +691,8 @@ Since dsh-split-workspace 0.9.0:
|
|
|
575
691
|
|
|
576
692
|
### Features
|
|
577
693
|
|
|
694
|
+
- **No-rebuild switching + warm hold (0.13.0)** — the split canvas stays mounted, so Split view / plain conversation / minimized / plugin panels no longer tear down and re-create the native panes; the minimize chip drags anywhere and snaps to the nearest edge.
|
|
695
|
+
- **Split view sidebar entry (0.12.0)** — a global-panel row next to **Plugins** opens the split workspace in the main column: the pane canvas when a split exists, or the add-split multi-select page that opens the split as soon as two conversations are confirmed.
|
|
578
696
|
- **Sidebar split menu** — the footer button opens Add / Exit / Minimize / Reset; Exit and Minimize are the same actions as the split toolbar.
|
|
579
697
|
- **Multi-select add** — searchable dialog; pre-selects current panes, lets you uncheck or extend, and rebuilds the split from the final selection.
|
|
580
698
|
- **Session-menu integration** — the stock right-click menu gains Add to split / Leave split. Outside split mode the first pick waits in a pending split until a second conversation is added; removing down to one pane exits the split.
|
|
@@ -628,11 +746,13 @@ Since dsh-split-workspace 0.9.0:
|
|
|
628
746
|
- The pane tree persists across reloads and reopens with the layout you left
|
|
629
747
|
(including a hand-made stacked or L-shaped arrangement). Adding or closing a
|
|
630
748
|
pane re-fits the automatic grid; restarting does not.
|
|
631
|
-
- **Minimize** (toolbar) hides the split and shows the stock
|
|
632
|
-
view while keeping the pane tree. A "restore split" chip brings
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
the
|
|
749
|
+
- **Minimize** (toolbar or footer menu) hides the split and shows the stock
|
|
750
|
+
single-session view while keeping the pane tree. A "restore split" chip brings
|
|
751
|
+
it back (drag it anywhere — it snaps to the nearest edge and remembers its
|
|
752
|
+
position). Clicking another conversation tucks the split into the chip;
|
|
753
|
+
opening a plugin/skills/settings panel only hides the canvas temporarily (the
|
|
754
|
+
panes stay mounted) and it reappears when you return to a conversation or the
|
|
755
|
+
Split view panel, so no restore chip is needed there.
|
|
636
756
|
- One title per pane: the pane header owns the title; the stock header keeps its
|
|
637
757
|
view tabs and actions without repeating the breadcrumb. The close control is
|
|
638
758
|
a drawn **✕** in a red-tinted button, not a low-contrast dot.
|
|
@@ -666,7 +786,7 @@ architecture the upstream plugin uses.
|
|
|
666
786
|
|
|
667
787
|
### Commands
|
|
668
788
|
|
|
669
|
-
- `window.__dshSplitWorkspace.health()` — version, host, panes, geometry,
|
|
789
|
+
- `window.__dshSplitWorkspace.health()` — version, host, panes, geometry, `panelWarm` (canvas hidden in the warm hold) and `canvasRepairs` (interactivity self-checks that had to repair a canvas after showing it; 0 in normal use),
|
|
670
790
|
persisted tree, crash guard.
|
|
671
791
|
- `window.__dshSplitWorkspace.split(sessionId)` — add a session as a pane.
|
|
672
792
|
- `window.__dshSplitWorkspace.addToSplit(sessionId)` /
|
|
@@ -687,6 +807,9 @@ architecture the upstream plugin uses.
|
|
|
687
807
|
(`{ id, minimized, maximized }` or `null`).
|
|
688
808
|
- `window.__dshSplitWorkspace.setPerformanceMode(true/false)` /
|
|
689
809
|
`performanceMode()` — toggle/inspect the persisted performance mode.
|
|
810
|
+
- `window.__dshSplitWorkspace.resizeFreeze()` / `setResizeFreeze(true/false)` —
|
|
811
|
+
whether performance mode freezes the canvas layout during a live window
|
|
812
|
+
resize and follows the window edge with a CSS transform (on by default).
|
|
690
813
|
- `window.__dshSplitWorkspace.reloadClient()` — reload the page.
|
|
691
814
|
- `window.__dshSplitWorkspace.restartApp()` — close and reopen DSH Desktop
|
|
692
815
|
(for the rare changes that need a full restart).
|
|
@@ -723,7 +846,7 @@ architecture the upstream plugin uses.
|
|
|
723
846
|
| `09-pane-renderers` | native/fallback transcript + composer renderers |
|
|
724
847
|
| `10-pane-frame` | pane header, close/dock buttons, composer measurement |
|
|
725
848
|
| `11-canvas-navigation` | canvas/dividers, pickers, keyboard navigation, early API |
|
|
726
|
-
| `12-chrome` | safe mode/help/tips,
|
|
849
|
+
| `12-chrome` | safe mode/help/tips, the split-view main panel, live-resize canvas freeze, update notice, seat |
|
|
727
850
|
| `13-drag-bridge` | inactive drag-to-split bridge |
|
|
728
851
|
| `14-launcher` | footer menu, multi-select add dialog, session menu integration |
|
|
729
852
|
| `15-float-window` | floating window components/layer |
|
|
@@ -732,9 +855,14 @@ architecture the upstream plugin uses.
|
|
|
732
855
|
|
|
733
856
|
- `npm run build` regenerates `lib/client.js`; `npm test` runs `build:check` first
|
|
734
857
|
and fails when the source and artifact disagree.
|
|
858
|
+
- `npm run check:anchor` verifies the system window's menu anchoring fallback in a
|
|
859
|
+
real WKWebView (macOS only; CI runs on Ubuntu).
|
|
735
860
|
- No bundler: the DSH client loads exactly one `<plugin>/client.js`, the sections
|
|
736
861
|
share one module-loader closure, and ordered concatenation keeps the published
|
|
737
862
|
package dependency-free.
|
|
863
|
+
- `native/` holds the platform helpers: `system-window.jxa` (macOS AppKit),
|
|
864
|
+
`system-window.ps1` (Windows PowerShell + WinForms + WebView2) and the vendored
|
|
865
|
+
`webview2/` SDK binaries (BSD-3-Clause; see `THIRD-PARTY-NOTICES.md`).
|
|
738
866
|
- Edit the matching `src/client/` section and run `npm run build`; the generated
|
|
739
867
|
file starts with a GENERATED marker.
|
|
740
868
|
|
|
@@ -758,6 +886,9 @@ architecture the upstream plugin uses.
|
|
|
758
886
|
has no Electron `BrowserWindow` API. It opens no browser and has no address
|
|
759
887
|
bar, but it cannot leave the DSH main window; a conversation in it is likewise
|
|
760
888
|
detached from split and float.
|
|
889
|
+
- The **system window** is a second OS-level web client: it needs DSH Desktop on
|
|
890
|
+
macOS, or Windows with the Microsoft Edge WebView2 Runtime, and it does not
|
|
891
|
+
carry desktop-only integrations such as native file drag.
|
|
761
892
|
- The persisted recursion depth is capped at 32 levels as a stack-safety guard
|
|
762
893
|
for hand-edited payloads, not as a pane limit.
|
|
763
894
|
- The hidden stock conversation still streams under the overlay; panes re-host
|
package/THIRD-PARTY-NOTICES.md
CHANGED
|
@@ -20,3 +20,20 @@ It has been adapted and extended for the DeepSeek Harness Desktop shell:
|
|
|
20
20
|
|
|
21
21
|
The upstream MIT license is reproduced in `LICENSE`; the upstream copyright
|
|
22
22
|
notice is retained here.
|
|
23
|
+
|
|
24
|
+
## Microsoft Edge WebView2 SDK
|
|
25
|
+
|
|
26
|
+
The Windows system window ships the **Microsoft WebView2 SDK 1.0.4314.35**
|
|
27
|
+
binaries in `native/webview2/`:
|
|
28
|
+
|
|
29
|
+
- `Microsoft.Web.WebView2.Core.dll`
|
|
30
|
+
- `Microsoft.Web.WebView2.WinForms.dll`
|
|
31
|
+
- `x64/WebView2Loader.dll`, `arm64/WebView2Loader.dll`
|
|
32
|
+
|
|
33
|
+
- Package: https://www.nuget.org/packages/Microsoft.Web.WebView2
|
|
34
|
+
- License: BSD-3-Clause, Copyright (C) Microsoft Corporation.
|
|
35
|
+
|
|
36
|
+
The complete upstream `LICENSE.txt` and `NOTICE.txt` are shipped alongside the
|
|
37
|
+
binaries in `native/webview2/`. The WebView2 **Runtime** itself is not
|
|
38
|
+
redistributed: it is installed with Microsoft Edge (built into Windows 11 and
|
|
39
|
+
present on Windows 10 with a current Edge).
|