dsh-deep-ptc-mode 1.9.3 → 1.9.4

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 CHANGED
@@ -1,5 +1,14 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.9.4 — 2026-11-13
4
+
5
+ - 胶囊位置可选:自动 / 输入框下方 / 工具栏 / 隐藏。「自动」检测到 dsh-claude-style 时把胶囊放进输入框工具栏(`conversation.input.right`),不再单独占一行(#16,也补上 #12 的第 3 点)。隐藏后,右侧栏新建页签引导中会出现「深度 PTC」,页签内的按钮可打开面板。
6
+ - 侧边面板左边缘可拖动调整宽度,也可用方向键(Shift 加大步长)、Home/End 调整,双击恢复 280px。宽度按浏览器保存,并限制在 240–640px;停靠时对话区至少保留 540px。
7
+ - 固定在右下角的悬浮挂件(dsh-whale-widget)不再遮住面板底部按钮:面板正文按重叠高度留出空间。
8
+ - Capsule position: auto, below the composer, toolbar or hidden. Auto puts the capsule in the composer toolbar (`conversation.input.right`) beside dsh-claude-style instead of on its own row (#16; also #12 item 3). When the capsule is hidden, the Deep PTC tab appears on the sidebar's new-tab guide and opens the panel.
9
+ - The side panel's left edge resizes it by dragging, arrow keys (Shift for larger steps) or Home/End; a double click restores 280px. The width is remembered per browser and kept within 240–640px, leaving at least 540px for a docked conversation.
10
+ - A widget pinned to the bottom-right corner (dsh-whale-widget) no longer covers the panel's last controls.
11
+
3
12
  ## 1.9.3 — 2026-11-12
4
13
 
5
14
  - 侧边输出文件可点击,使用 DSH 原生文件资源接口按所属会话打开;兼容折叠列表、相对路径、Windows/UNC 路径及带中文和特殊字符的文件名,预览不可用时显示提示。
package/COMPATIBILITY.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # 插件协作与验证范围 / Plugin workflows and verification
2
2
 
3
- Deep PTC **1.9.3** · 核对日期:2026-11-12。接口验证使用 DSH Desktop 0.2.2-rc.2 的校验器与 SDK 渲染器、内嵌 Node 24.21.0。
3
+ Deep PTC **1.9.4** · 核对日期:2026-11-13(界面插件);插件协作部分核对于 2026-11-12。接口验证使用 DSH Desktop 0.2.2-rc.2 的校验器与 SDK 渲染器、内嵌 Node 24.21.0。
4
4
 
5
5
  ## 可以配合完成哪些工作
6
6
 
@@ -37,6 +37,33 @@ DSH Go 的连接资料是额外便利:按远端系统选择托管启动或连
37
37
 
38
38
  外观重叠时,可关闭 Deep PTC 额外界面特效,必要时收起对话侧边面板。关闭特效不修改其他插件的工具注册与执行方式。
39
39
 
40
+ ### 界面插件(关闭特效后)
41
+
42
+ 不为其他界面插件单独适配主题。目标是:关闭 Deep PTC 界面特效后,Deep PTC 的胶囊、侧边面板和按钮不变形、不错位。特效关闭时,`body[data-dpt-ui]` 不挂载,所有特效规则和指针、键盘监听都不生效。保留的只有 `.dpt-*` 命名空间内的胶囊、侧边面板(`position:fixed; z-index:20`)和 Skill 卡片。
43
+
44
+ 2026-11-13 按 GitHub `dsh-plugin` 话题的 star 数,选取主要功能为网页界面的前 10 个插件,对 npm/GitHub 发布包做静态核对(未安装、未执行):
45
+
46
+ | 插件 | 核对版本 | 关闭特效后的情况 |
47
+ | --- | --- | --- |
48
+ | DeepSeek-Balance-Whale-Widget | 0.4.2 | 鲸鱼固定在窗口右下角,层级高,会盖住侧边面板底部的按钮。**已处理**:面板正文按重叠高度留出底部空间 |
49
+ | dsh-wallpaper-engine | 1.4.2 | 只改背景与玻璃效果,不改 Deep PTC 控件;面板沿用宿主背景变量 |
50
+ | dsh-pet | 0.4.8 | 独立 Electron 窗口,不进入网页 DOM |
51
+ | DSH-better-sidebar | 0.32.1 | 底部工作台压缩对话列高度;面板按对话区实际尺寸测量,会跟随 |
52
+ | dsh-context | 0.84.1 | 使用右侧栏页签与 `conversation.input.overlay`,与 Deep PTC 控件无重叠 |
53
+ | dsh-deep-whale(皮肤管理器) | 0.1.9 | 通过宿主变量换肤;面板使用同一组变量 |
54
+ | dsh-genui | 0.16.0 | 在回复内渲染组件,并使用 `conversation.input.dock`(输入框上方) |
55
+ | dsh-startup-screen | 1.3.0 | 启动遮罩层级 2147483000,高于面板,仅在启动时出现 |
56
+ | dsh-ads | 0.1.4 | 弹窗层级高于面板,属该插件的设计 |
57
+ | dsh-synapse | 0.5.7 | 画布工作区层级 100/200,高于面板 |
58
+ | dsh-claude-style(议题 #16) | 0.21.0 | 输入框收成一行后,胶囊会单独占一行。**已处理**:胶囊移入工具栏槽位 `conversation.input.right`,见下 |
59
+
60
+ 胶囊位置在「设置 → 深度 PTC → 外观」中调整:
61
+
62
+ - **自动**(默认):检测到 dsh-claude-style 时放进工具栏,否则放在输入框下方。
63
+ - **输入框下方** / **工具栏** / **隐藏**:手动指定。
64
+
65
+ 选择「隐藏」时,右侧栏的新建页签引导会列出「深度 PTC」页签,可从页签里的按钮打开面板。dsh-cost-meter 同样占用 `composer.dock`,两者各占一行,不会重叠。
66
+
40
67
  本版没有为这些插件增加运行时依赖、轮询、固定常驻工具清单或每款插件专属提示词。只有用户选择 Deep PTC 的会话使用其适配逻辑;第三方自身的权限、沙箱和运行条件仍生效。
41
68
 
42
69
  ## 验证与来源
@@ -49,8 +76,10 @@ DSH Go 的连接资料是额外便利:按远端系统选择托管启动或连
49
76
 
50
77
  ## English
51
78
 
52
- Deep PTC 1.9.3 can use DrawAI for diagram editing and SVG delivery, guizang-design for design/writing skills and library tools, and Agentero for paper/note tools. dsh-ops supplies compatible execution environments, DSH Go can combine screen tools with SSH connection assistance, and dsh-context can inspect skills through the current Agent's service.
79
+ Deep PTC 1.9.4 can use DrawAI for diagram editing and SVG delivery, guizang-design for design/writing skills and library tools, and Agentero for paper/note tools. dsh-ops supplies compatible execution environments, DSH Go can combine screen tools with SSH connection assistance, and dsh-context can inspect skills through the current Agent's service.
53
80
 
54
81
  Twenty-six published DrawAI 0.4.6, guizang-design 0.1.4 and Agentero host 0.1.8 tool definitions passed isolated registration, host 0.2.2-rc.2 schema validation, Deep PTC discovery/selection and both host SDK renderers. Seven skill contents were readable. DrawAI read/edit/readback, SVG export and repeated stale-revision rejection followed by a fresh-revision write passed. The generic conflict-classification fix preserves unavailable-provider, defect and partial-effect handling. All 199 automated tests pass.
55
82
 
56
- The table distinguishes those checks from prior dsh-ops evidence, automated DSH Go rules and source-only context inspection. Browser visuals, design generation, external paper CLI workflows, real phone/SSH connections, PNG and video rendering were not validated end to end. Plugins retain their own setup and authorization requirements. No runtime dependencies, polling or vendor-specific resident tool lists were added.
83
+ With the Deep PTC visual effects off, the ten most-starred web UI plugins on the `dsh-plugin` topic (checked statically on 2026-11-13) leave the capsule, side panel and buttons intact. Two cases are handled: the bottom-right whale widget no longer covers the panel's last controls, and with dsh-claude-style the capsule joins the composer toolbar (`conversation.input.right`) instead of taking its own row (#16). The capsule position (auto, below the composer, toolbar, hidden) is a viewer setting. When the capsule is hidden, the Deep PTC sidebar tab provides the way back to the panel.
84
+
85
+ The table distinguishes those checks from prior dsh-ops evidence, automated DSH Go rules and source-only context inspection. Browser visuals, design generation, external paper CLI workflows, real phone/SSH connections, PNG and video rendering were not validated end to end. Plugins retain their own setup and authorization requirements. No runtime dependencies, polling or vendor-specific resident tool lists were added.
package/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Deep PTC mode
2
2
 
3
- [中文](README.zh.md) · MIT · **1.9.3**
3
+ [中文](README.zh.md) · MIT · **1.9.4**
4
4
 
5
5
  [Changelog](CHANGELOG.md) · [Test report](TEST_REPORT.md) · [Plugin workflows and verification](COMPATIBILITY.md)
6
6
 
7
7
  Deep PTC is a DeepSeek Harness agent mode with progress reports, clarifying questions, task-size planning, and interruptible background work. It builds on the installed official PTC preset with selectable shells, on-demand tools and skills, and a two-layer preset identity adapter for third-party plugins.
8
8
 
9
- The panel sits beside the conversation and shows the environment, subagents, jobs, output files, SSH connections and tool state. The capsule below the composer expands or collapses it. Deep PTC also has its own settings page. Visual effects are lightweight and start off when an appearance plugin is installed.
9
+ The panel sits beside the conversation and shows the environment, subagents, jobs, output files, SSH connections and tool state. The panel width can be dragged. The capsule expands or collapses it; it sits below the composer by default and can move into the toolbar or be hidden. Deep PTC also has its own settings page. Visual effects are lightweight and start off when an appearance plugin is installed.
10
10
 
11
11
  ## Five basic problems
12
12
 
@@ -74,7 +74,8 @@ The Deep PTC mode label, settings, and conversation UI switch between Chinese an
74
74
  - **Output files**: files this conversation wrote or delivered, newest first; click to open the file in DSH's native preview. Three positions are available, with overflow folded into one of them. The rule matches DSH's own deliverables card and also counts files written from `run_code`.
75
75
  - **SSH connections**: hosts this conversation reached, with their outcome, and the host aliases in `~/.ssh/config`.
76
76
  - **Tool state**: the "Reload all tool states" button and, when present, the failed external tools.
77
- - **The capsule under the composer** shows the environment, subagent count and tool notices, and toggles the independent side panel. Saved 1.9.0 sidebar tabs show a migration hint.
77
+ - **The capsule** shows the environment, subagent count and tool notices, and toggles the independent side panel. Its position is a setting (Settings → Deep PTC → Appearance): auto, below the composer, in the composer toolbar, or hidden. Auto uses the toolbar beside dsh-claude-style so a one-row composer stays one row. When hidden, open the panel from the Deep PTC tab on the right sidebar.
78
+ - **Panel width**: drag the panel's left edge, or focus it and use the arrow keys (Shift for larger steps) or Home/End; a double click restores 280px. The width is remembered, from 240 to 640px, and a docked panel leaves at least 540px for the conversation.
78
79
 
79
80
  Visual effects apply **only while the conversation on screen is a Deep PTC session**: calmer light and dark colours and fonts, a hairline on the focused composer, a blue gradient send button, soft blue user bubbles, pointer spotlight, click ripple, a magnetic send button; while running, a glowing composer, a send-button ring and sparks rising above the composer.
80
81
 
@@ -214,10 +215,10 @@ A prompt changes the model's working tendency, not the real token limit or billi
214
215
  Requires Node `>=24` and DSH `>=0.2.2-rc.1`. The installer rejects the current package on DSH `0.2.1-rc.5` based on its manifest. macOS/Zsh checks cover configuration, argv and tool mounting.
215
216
 
216
217
  ```js
217
- plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.3" })
218
+ plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.4" })
218
219
  // Or from a local checkout or archive:
219
220
  plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
220
- // Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.3.tgz"
221
+ // Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.4.tgz"
221
222
  ```
222
223
 
223
224
  Repository locator: `github:lishize20040802-rgb/dsh-deep-ptc-mode`. It installs content actually published there; a local upgrade does not publish to GitHub or npm.
package/README.zh.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # 深度 PTC 模式
2
2
 
3
- [English](README.md) · MIT · 当前版本 **1.9.3**
3
+ [English](README.md) · MIT · 当前版本 **1.9.4**
4
4
 
5
5
  [更新日志](CHANGELOG.md) · [测试报告](TEST_REPORT.md) · [插件协作与验证范围](COMPATIBILITY.md)
6
6
 
7
7
  深度 PTC 是 DeepSeek Harness 的 Agent 模式,支持进度汇报、澄清提问、按任务规模制定计划,以及可插话的后台任务。它以已安装的官方 PTC 预设为基础,提供可选执行环境、按需加载工具和 Skill,以及面向第三方插件的两层预设身份适配。
8
8
 
9
- 面板位于对话区侧边,包含执行环境、子代理、后台任务、输出文件、SSH 连接和工具状态。输入框下方保留小胶囊,用于展开和收起面板。设置里有独立的「深度 PTC」页。界面特效采用轻量渲染,检测到外观插件时默认关闭。
9
+ 面板位于对话区侧边,包含执行环境、子代理、后台任务、输出文件、SSH 连接和工具状态。面板宽度可拖动调整。小胶囊用于展开和收起面板,默认在输入框下方,也可放进工具栏或隐藏。设置里有独立的「深度 PTC」页。界面特效采用轻量渲染,检测到外观插件时默认关闭。
10
10
 
11
11
  ## 五个基本问题
12
12
 
@@ -74,7 +74,8 @@ Deep PTC 的模式名称、设置页和会话界面会随 DSH「设置 → 通
74
74
  - **输出文件**:本会话写入或交付的文件,最新的在前;点击通过 DSH 原生文件预览打开对应文件。最多三个位置,超出时折叠占一个位置。规则与 DSH 官方的交付卡片一致,并包括 `run_code` 里写入的文件。
75
75
  - **SSH 连接**:本会话连接过的主机(成功或失败)与 `~/.ssh/config` 中的主机别名。
76
76
  - **工具状态**:“重载所有工具状态”按钮,以及调用失败的外部工具(如有)。
77
- - **输入框下方的小胶囊**显示执行环境、子代理数和工具提醒,点击展开或收起独立的侧边面板。1.9.0 保存的旧侧栏页签会显示迁移提示。
77
+ - **小胶囊**显示执行环境、子代理数和工具提醒,点击展开或收起独立的侧边面板。位置可在「设置 → 深度 PTC → 外观」中选择:自动、输入框下方、工具栏或隐藏。「自动」在 dsh-claude-style 下放进输入框工具栏,紧凑的输入框保持单行。隐藏后,可从右侧栏的「深度 PTC」页签打开面板。
78
+ - **面板宽度**:拖动面板左边缘调整;也可以聚焦左边缘后用方向键(按住 Shift 步长更大)或 Home/End 调整,双击恢复 280px。宽度会被记住,范围 240–640px;停靠时对话区至少保留 540px。
78
79
 
79
80
  界面特效**只在当前显示的是深度 PTC 会话时生效**:更克制的明暗配色与字体、输入框聚焦细线、蓝色渐变发送键、淡蓝用户气泡、指针追光、点击涟漪、磁吸发送键;运行时输入框发光、发送键光环和输入框上方的光点。
80
81
 
@@ -218,10 +219,10 @@ Deep PTC 可以把其他插件提供的能力接进同一项任务:用 **DrawA
218
219
  本地目录或构建产物可通过插件管理器安装:
219
220
 
220
221
  ```js
221
- plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.3" })
222
+ plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.4" })
222
223
  // 也可从本地目录或安装包安装:
223
224
  plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
224
- // 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.3.tgz"
225
+ // 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.4.tgz"
225
226
  ```
226
227
 
227
228
  GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
package/TEST_REPORT.md CHANGED
@@ -1,4 +1,7 @@
1
- # 1.9.3 测试报告 / Test report
1
+ # 1.9.4 测试报告 / Test report
2
+
3
+ > 1.9.4 胶囊位置与面板宽度:205 项自动化测试及结构检查通过。新增覆盖:默认位置、dsh-claude-style 下胶囊移入工具栏且两处胶囊控制同一面板、隐藏后右侧栏引导出现并可打开面板、位置偏好持久化、左边缘拖动/方向键/双击调整宽度及上下限、右下角挂件留白。在本地 DSH 0.2.2-rc.1 测试 profile 中实测:拖动后面板由 280px 变为 482px,对话区边距同步,宽度被记住;用 claude-style 的页面标记模拟时,胶囊与模型选择器、发送按钮同处一行;窄屏浮动面板保留拖动边缘;客户端无本插件报错。未与 dsh-claude-style、dsh-whale-widget 实际同装运行;10 个界面插件为发布包静态核对,见 [协作说明](COMPATIBILITY.md)。
4
+ > Version 1.9.4 capsule position and panel width: 205 tests and structural checks pass, covering default placement, the toolbar capsule beside dsh-claude-style controlling the same panel, the sidebar guide entry when hidden, remembered placement, edge drag/keys/double-click resizing with bounds, and the corner-widget inset. In a local DSH 0.2.2-rc.1 test profile, dragging widened the panel from 280px to 482px with the conversation margin following and the width remembered; with dsh-claude-style's page marker simulated, the capsule shared the toolbar row with the model selector and send button; the floating panel kept its resize edge; no client errors from this plugin. dsh-claude-style and dsh-whale-widget were not installed alongside; the ten UI plugins were reviewed statically from their published packages.
2
5
 
3
6
  > 1.9.3 界面调整:201 项自动化测试及结构检查通过。输出文件按钮覆盖普通/折叠列表、所属会话、相对/Windows/UNC 路径、中文及特殊字符、旧版预览接口和打开失败后的恢复。另使用真实 DSH Desktop 0.2.2-rc.2 文件地址解析器确认四类路径可由当前面板的打开函数正确还原。子代理行保留状态指示与辅助阅读标签,可见内容仅为名称和同一行右侧的用时。未做整窗目视验收。
4
7
  > Version 1.9.3 UI changes: 201 tests and structural checks pass. Output-opening coverage includes folded entries, owning sessions, path encodings, the older viewer API and failure recovery. The actual DSH Desktop 0.2.2-rc.2 file-address parser correctly decodes four path cases generated by the current panel opener. Subagent rows retain indicators and accessible state labels, with only the name and right-aligned duration visible. No full-window visual review was performed.
package/lib/client.js CHANGED
@@ -226,6 +226,12 @@ window.__ModuleLoader__.load({ id: 'dsh-deep-ptc-mode', factory: require => {
226
226
  sideGuide: '执行环境、子代理、后台任务、输出文件与 SSH', sideOtherMode: '当前对话不是深度 PTC 模式。这里的执行环境用于之后新建的深度 PTC 会话。',
227
227
  capsuleOpen: '展开或收起侧边面板', panelClose: '收起侧边面板',
228
228
  panelMoved: '深度 PTC 面板已回到对话区侧边,请使用输入框下方的胶囊展开。',
229
+ panelMovedToolbar: '深度 PTC 面板在对话区侧边,请使用输入框工具栏里的胶囊展开。',
230
+ panelMovedHidden: '胶囊已隐藏。可以用下面的按钮打开深度 PTC 面板,或在「设置 → 深度 PTC → 外观」里重新显示胶囊。',
231
+ panelOpen: '打开深度 PTC 面板', panelResize: '拖动调整侧边面板宽度,双击恢复默认',
232
+ capsulePlacement: '胶囊位置', placementAuto: '自动', placementDock: '输入框下方', placementToolbar: '工具栏', placementHidden: '隐藏',
233
+ placementHint: '「自动」在检测到 dsh-claude-style 等紧凑输入框时放进工具栏,否则放在输入框下方。隐藏后可从右侧栏「深度 PTC」页签打开面板。',
234
+ placementAutoNow: '「自动」当前放在:{place}。',
229
235
  outputsTitle: '输出文件', outputsEmpty: '本会话暂无输出文件。', outputsMore: '另有 {count} 个文件',
230
236
  outputPresented: '已交付', outputTurn: '第 {turn} 轮',
231
237
  outputOpenFailed: '无法打开文件,请检查文件是否仍存在,以及宿主文件预览是否可用。',
@@ -253,6 +259,12 @@ window.__ModuleLoader__.load({ id: 'dsh-deep-ptc-mode', factory: require => {
253
259
  sideGuide: 'Environment, subagents, background jobs, output files and SSH', sideOtherMode: 'This conversation is not in Deep PTC mode. The environment here applies to new Deep PTC sessions.',
254
260
  capsuleOpen: 'Expand or collapse the side panel', panelClose: 'Collapse the side panel',
255
261
  panelMoved: 'The Deep PTC panel is beside the conversation. Use the capsule below the composer to expand it.',
262
+ panelMovedToolbar: 'The Deep PTC panel is beside the conversation. Use the capsule in the composer toolbar to expand it.',
263
+ panelMovedHidden: 'The capsule is hidden. Open the Deep PTC panel with the button below, or show the capsule again in Settings → Deep PTC → Appearance.',
264
+ panelOpen: 'Open the Deep PTC panel', panelResize: 'Drag to resize the side panel; double-click to reset',
265
+ capsulePlacement: 'Capsule position', placementAuto: 'Auto', placementDock: 'Below composer', placementToolbar: 'Toolbar', placementHidden: 'Hidden',
266
+ placementHint: 'Auto puts the capsule in the toolbar when a compact composer such as dsh-claude-style is present, and below the composer otherwise. When hidden, open the panel from the Deep PTC tab in the right sidebar.',
267
+ placementAutoNow: 'Auto currently uses: {place}.',
256
268
  outputsTitle: 'Output files', outputsEmpty: 'No output files in this conversation.', outputsMore: '{count} more files',
257
269
  outputPresented: 'Delivered', outputTurn: 'Turn {turn}',
258
270
  outputOpenFailed: 'Could not open the file. Check that it still exists and the host file preview is available.',
@@ -386,11 +398,18 @@ ${ON} .dpt-capsule[data-state="running"] .dpt-agent-dot,${ON} .dpt-agent[data-st
386
398
  .dpt-capsule:hover,.dpt-capsule[aria-expanded="true"]{color:var(--dsw-alias-label-primary,#101828);border-color:color-mix(in srgb,var(--dpt-accent) 40%,transparent)}
387
399
  .dpt-capsule .dpt-agent-dot{margin-top:0}
388
400
  .dpt-capsule-row>.dpt-panel{align-self:stretch}
401
+ .dpt-capsule-row:not([data-placement="dock"]){display:none}
402
+ .dpt-capsule[data-compact]{height:28px;max-width:200px;padding:0 10px;gap:6px;flex:none}
389
403
  .dpt-sidecar{position:fixed;z-index:20;display:flex;flex-direction:column;box-sizing:border-box;background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-primary,#101828);border-left:1px solid var(--dpt-line);overflow:hidden}
390
404
  .dpt-sidecar[data-floating]{border:1px solid var(--dpt-line);border-radius:12px;box-shadow:0 4px 20px #0002}
391
405
  .dpt-sidecar-head{display:flex;align-items:center;justify-content:space-between;padding:10px 14px;border-bottom:1px solid var(--dpt-line);font-size:13px}
392
406
  .dpt-sidecar-head h3{margin:0;font:inherit;font-weight:600}
393
407
  .dpt-sidecar .dpt-panel{flex:1;height:auto;overflow:hidden}
408
+ .dpt-sidecar .dpt-side-body{padding-bottom:var(--dpt-inset-bottom,0px)}
409
+ .dpt-resize{position:absolute;left:0;top:0;bottom:0;z-index:1;width:6px;cursor:col-resize;touch-action:none;-webkit-app-region:no-drag;outline:none}
410
+ .dpt-resize::after{content:"";position:absolute;left:0;top:0;bottom:0;width:2px;background:transparent;transition:background-color 120ms}
411
+ .dpt-resize:hover::after,.dpt-resize:focus-visible::after,.dpt-resize[data-active]::after{background:color-mix(in srgb,var(--dpt-accent,#3370ff) 55%,transparent)}
412
+ body[data-dpt-resizing],body[data-dpt-resizing] *{cursor:col-resize!important;user-select:none!important}
394
413
  [data-conversation-region="chat"][data-dpt-panel-open]{margin-right:var(--dpt-panel-width,280px)!important}
395
414
  .dpt-tab-title{display:inline-flex;align-items:center;gap:6px}
396
415
  .dpt-tab-title::before,.dpt-panel-mark::before{content:"";width:8px;height:8px;border-radius:50%;background:linear-gradient(135deg,var(--dpt-brand-light,#7fb0ff),var(--dpt-accent,#3370ff))}
@@ -1358,11 +1377,108 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1358
1377
  }
1359
1378
 
1360
1379
  const PANEL_WIDTH = 280;
1380
+ const PANEL_MIN_WIDTH = 240;
1381
+ const PANEL_MAX_WIDTH = 640;
1361
1382
  const PANEL_MIN_ROOM = 820;
1383
+ // A docked panel never squeezes the conversation below this width.
1384
+ const CHAT_MIN_WIDTH = 540;
1362
1385
  const PANEL_COLLAPSED_KEY = `${PLUGIN}:side-panel-collapsed`;
1363
- const readPanelCollapsed = () => {
1364
- try { return localStorage.getItem(PANEL_COLLAPSED_KEY) === '1'; } catch { return false; }
1386
+ const PANEL_WIDTH_KEY = `${PLUGIN}:side-panel-width`;
1387
+ const CAPSULE_KEY = `${PLUGIN}:capsule-placement`;
1388
+ const PLACEMENTS = ['auto', 'dock', 'toolbar', 'hidden'];
1389
+ const readStored = key => { try { return localStorage.getItem(key); } catch { return null; } };
1390
+ const writeStored = (key, value) => { try { localStorage.setItem(key, value); } catch { /* kept in memory */ } };
1391
+ const readPanelWidth = () => {
1392
+ const value = Number(readStored(PANEL_WIDTH_KEY));
1393
+ return Number.isFinite(value) && value > 0 ? Math.round(value) : PANEL_WIDTH;
1365
1394
  };
1395
+ const readPlacement = () => { const value = readStored(CAPSULE_KEY); return PLACEMENTS.includes(value) ? value : 'auto'; };
1396
+
1397
+ // Viewer preferences (collapsed, width, capsule placement) and each conversation's open state, shared
1398
+ // by the panel host in the composer dock, the capsule wherever it sits, and the right-sidebar tab.
1399
+ const PANEL = {
1400
+ collapsed: readStored(PANEL_COLLAPSED_KEY) === '1',
1401
+ width: readPanelWidth(),
1402
+ placement: readPlacement(),
1403
+ peek: new Map(), wide: new Map(), version: 0, subs: new Set(),
1404
+ subscribe(listener) { this.subs.add(listener); return () => this.subs.delete(listener); },
1405
+ emit() { this.version++; for (const listener of [...this.subs]) { try { listener(); } catch (error) { console.warn(`[${PLUGIN}]`, error); } } },
1406
+ isOpen(id) { return (this.wide.get(id) === true && !this.collapsed) || this.peek.get(id) === true; },
1407
+ // A layout change (docked, floating, covered) closes a floating peek, as before.
1408
+ setWide(id, wide) {
1409
+ if (this.wide.get(id) === wide) return;
1410
+ if (wide === undefined) this.wide.delete(id); else this.wide.set(id, wide);
1411
+ this.peek.delete(id);
1412
+ this.emit();
1413
+ },
1414
+ setCollapsed(value) { this.collapsed = value; writeStored(PANEL_COLLAPSED_KEY, value ? '1' : '0'); },
1415
+ toggle(id) {
1416
+ if (this.wide.get(id)) this.setCollapsed(!this.collapsed);
1417
+ else this.peek.set(id, this.peek.get(id) !== true);
1418
+ this.emit();
1419
+ },
1420
+ open(id) {
1421
+ if (id === undefined) return;
1422
+ if (this.wide.get(id)) this.setCollapsed(false); else this.peek.set(id, true);
1423
+ this.emit();
1424
+ },
1425
+ setWidth(width, persist) {
1426
+ const next = Math.round(width);
1427
+ if (Number.isFinite(next) && next > 0 && next !== this.width) { this.width = next; this.emit(); }
1428
+ if (persist) writeStored(PANEL_WIDTH_KEY, String(this.width));
1429
+ },
1430
+ setPlacement(value) {
1431
+ if (!PLACEMENTS.includes(value) || value === this.placement) return;
1432
+ this.placement = value;
1433
+ writeStored(CAPSULE_KEY, value);
1434
+ this.emit();
1435
+ },
1436
+ // Another window changed a preference.
1437
+ sync(event) {
1438
+ if (event.key !== null && ![PANEL_COLLAPSED_KEY, PANEL_WIDTH_KEY, CAPSULE_KEY].includes(event.key)) return;
1439
+ this.collapsed = readStored(PANEL_COLLAPSED_KEY) === '1';
1440
+ this.width = readPanelWidth();
1441
+ this.placement = readPlacement();
1442
+ this.emit();
1443
+ },
1444
+ };
1445
+ const getPanelVersion = () => PANEL.version;
1446
+ const subscribePanel = listener => PANEL.subscribe(listener);
1447
+ function usePanel() {
1448
+ React.useSyncExternalStore(subscribePanel, getPanelVersion, getPanelVersion);
1449
+ return PANEL;
1450
+ }
1451
+
1452
+ // dsh-claude-style folds the composer into one row, which leaves no room for a row of our own below it.
1453
+ const compactComposer = () => typeof document !== 'undefined'
1454
+ && (document.body?.hasAttribute?.('data-dsh-claude-style') === true || appearancePlugin() === 'dsh-claude-style');
1455
+ function subscribeCompact(listener) {
1456
+ if (typeof MutationObserver !== 'function' || typeof document === 'undefined' || !document.body) return () => {};
1457
+ const observer = new MutationObserver(listener);
1458
+ try {
1459
+ observer.observe(document.body, { attributes: true, attributeFilter: ['data-dsh-claude-style'] });
1460
+ if (document.head) observer.observe(document.head, { childList: true });
1461
+ } catch { /* detection stays as first read */ }
1462
+ return () => observer.disconnect();
1463
+ }
1464
+ const useCompactComposer = () => React.useSyncExternalStore(subscribeCompact, compactComposer, compactComposer);
1465
+ const resolvePlacement = compact => PANEL.placement === 'auto' ? (compact ? 'toolbar' : 'dock') : PANEL.placement;
1466
+
1467
+ // Floating widgets pinned to the window's bottom-right corner (the dsh-whale-widget whale) cover the
1468
+ // bottom of the panel; the panel body reserves that height so its last controls scroll clear of it.
1469
+ const CORNER_FLOATERS = '.dshwv-root .dshwv-img';
1470
+ function cornerInset(box) {
1471
+ if (typeof document === 'undefined') return 0;
1472
+ let inset = 0;
1473
+ for (const node of document.querySelectorAll?.(CORNER_FLOATERS) ?? []) {
1474
+ const rect = node.getBoundingClientRect?.();
1475
+ if (!rect || rect.width <= 0 || rect.height <= 0) continue;
1476
+ const overlaps = rect.left < box.right && rect.right > box.left && rect.top < box.bottom && rect.bottom > box.top;
1477
+ if (overlaps) inset = Math.max(inset, box.bottom - rect.top);
1478
+ }
1479
+ // Never more than half the panel: the panel stays usable under a widget scaled up very large.
1480
+ return Math.round(Math.min(inset, (box.bottom - box.top) / 2));
1481
+ }
1366
1482
 
1367
1483
  // Measure the conversation itself, so the panel follows native sidebar resizing and is hidden
1368
1484
  // when that conversation is covered by a fullscreen sidebar.
@@ -1396,10 +1512,16 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1396
1512
  }
1397
1513
  const wide = room.width >= PANEL_MIN_ROOM;
1398
1514
  const composer = region.querySelector('[data-composer-seat]')?.getBoundingClientRect();
1399
- const next = { region, wide, top: Math.round(rect.top), right: Math.round(window.innerWidth - room.right),
1515
+ const fit = Math.max(0, room.width - 24);
1516
+ const maxWidth = Math.min(fit, Math.max(PANEL_MIN_WIDTH, Math.min(PANEL_MAX_WIDTH, wide ? room.width - CHAT_MIN_WIDTH : fit)));
1517
+ const minWidth = Math.min(PANEL_MIN_WIDTH, maxWidth);
1518
+ const next = { region, wide, minWidth, maxWidth, top: Math.round(rect.top), right: Math.round(window.innerWidth - room.right),
1400
1519
  height: Math.round(wide ? rect.height : Math.max(0, Math.min(rect.height, (composer?.top ?? rect.bottom) - rect.top - 8))),
1401
- width: Math.min(PANEL_WIDTH, Math.max(0, room.width - 24)) };
1402
- const same = previous?.region === region && ['wide', 'top', 'right', 'height', 'width'].every(key => previous[key] === next[key]);
1520
+ width: Math.min(maxWidth, Math.max(minWidth, PANEL.width)) };
1521
+ const right = window.innerWidth - next.right;
1522
+ next.inset = cornerInset({ left: right - next.width, right, top: next.top, bottom: next.top + next.height });
1523
+ const same = previous?.region === region
1524
+ && ['wide', 'top', 'right', 'height', 'width', 'minWidth', 'maxWidth', 'inset'].every(key => previous[key] === next[key]);
1403
1525
  if (!same) { previous = next; setLayout(next); }
1404
1526
  }
1405
1527
  function schedule() {
@@ -1407,13 +1529,16 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1407
1529
  }
1408
1530
  const changes = typeof MutationObserver === 'function' ? new MutationObserver(records => {
1409
1531
  if (!previous?.region?.isConnected || records.some(record => record.type === 'attributes'
1410
- && (record.target.contains(previous?.region) || record.target.matches?.('[data-sidebar-right-panel]')))) schedule();
1532
+ && (record.target.contains(previous?.region) || record.target.matches?.('[data-sidebar-right-panel],.dshwv-root')))) schedule();
1411
1533
  }) : undefined;
1412
1534
  changes?.observe(document.body, { subtree: true, childList: true, attributes: true,
1413
1535
  attributeFilter: ['class', 'style', 'hidden', 'aria-hidden', 'data-sidebar-right-panel', 'data-sidebar-right-open'] });
1414
1536
  window.addEventListener('resize', schedule);
1537
+ // A new preferred width (dragging the edge, another window) is measured like a resize.
1538
+ const unsubscribe = PANEL.subscribe(() => { if (previous?.width !== Math.min(previous?.maxWidth ?? Infinity, Math.max(previous?.minWidth ?? 0, PANEL.width))) schedule(); });
1415
1539
  measure();
1416
1540
  return () => {
1541
+ unsubscribe();
1417
1542
  resize?.disconnect(); changes?.disconnect();
1418
1543
  window.removeEventListener('resize', schedule);
1419
1544
  if (frame !== undefined) cancelAnimationFrame(frame);
@@ -1422,19 +1547,90 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1422
1547
  return layout;
1423
1548
  }
1424
1549
 
1425
- // The capsule stays under the composer and toggles the independent conversation-side panel.
1426
- function Capsule(props) {
1427
- const { sessionId, useSessions, useProjection, form, t } = props;
1428
- const marker = React.useRef(null);
1429
- const layout = useSidePanelLayout(sessionId, marker);
1550
+ // The capsule's one-line summary: environment, subagents, tool notices.
1551
+ function useCapsuleSummary({ sessionId, useSessions, useProjection, form, t }) {
1430
1552
  const sessions = typeof useSessions === 'function' ? useSessions(state => state) : undefined;
1431
1553
  const tools = projectionValue(useProjection, 'deepPtcTools');
1432
1554
  const settings = useSettingsForm(form);
1433
- const [collapsed, setCollapsed] = React.useState(readPanelCollapsed);
1434
- const [peek, setPeek] = React.useState(false);
1435
- React.useEffect(() => setPeek(false), [sessionId, layout?.wide]);
1436
- const docked = !!layout?.wide && !collapsed;
1437
- const open = docked || peek;
1555
+ const rows = subagentRows(sessions, sessionId, Date.now());
1556
+ const running = rows.some(row => row.state === 'running');
1557
+ const failures = tools && typeof tools === 'object' ? (tools.report?.tools ?? []).length : 0;
1558
+ const environment = settings.status === 'ready' && settings.value ? envLabel(settings.value.environment ?? 'auto', t) : undefined;
1559
+ const label = [environment, rows.length ? `${t('agentsTitle')} ${rows.length}` : null, failures ? `${t('toolFailures')} ${failures}` : null]
1560
+ .filter(Boolean).join(' · ') || t('sideTitle');
1561
+ return { label, running };
1562
+ }
1563
+
1564
+ // The capsule toggles this conversation's side panel, below the composer or in its toolbar.
1565
+ function CapsuleButton(props) {
1566
+ const { sessionId, compact, t } = props;
1567
+ usePanel();
1568
+ const { label, running } = useCapsuleSummary(props);
1569
+ return h('button', { type: 'button', className: 'dpt-capsule', 'data-compact': compact ? '' : undefined,
1570
+ 'data-state': running ? 'running' : 'idle', 'aria-expanded': props.open ?? PANEL.isOpen(sessionId),
1571
+ title: compact ? `${t('capsuleOpen')} · ${label}` : t('capsuleOpen'), onClick: () => PANEL.toggle(sessionId) },
1572
+ h('span', { className: 'dpt-agent-dot', 'aria-hidden': 'true' }), h('span', null, label));
1573
+ }
1574
+
1575
+ // The panel's left edge. Dragging sets the preferred width (kept per viewer); arrow keys step it,
1576
+ // Home and End jump to the bounds, a double click restores the default.
1577
+ function ResizeHandle({ layout, t }) {
1578
+ const [active, setActive] = React.useState(false);
1579
+ const stop = React.useRef();
1580
+ React.useEffect(() => () => stop.current?.(), []);
1581
+ const clamp = value => Math.min(layout.maxWidth, Math.max(layout.minWidth, value));
1582
+ function onPointerDown(event) {
1583
+ if (event.button !== undefined && event.button !== 0) return;
1584
+ event.preventDefault();
1585
+ const target = event.currentTarget;
1586
+ const startX = event.clientX;
1587
+ const startWidth = layout.width;
1588
+ const move = next => PANEL.setWidth(clamp(startWidth + startX - next.clientX), false);
1589
+ const end = () => {
1590
+ target.removeEventListener?.('pointermove', move);
1591
+ target.removeEventListener?.('pointerup', end);
1592
+ target.removeEventListener?.('pointercancel', end);
1593
+ document.body?.removeAttribute?.('data-dpt-resizing');
1594
+ stop.current = undefined;
1595
+ setActive(false);
1596
+ PANEL.setWidth(PANEL.width, true);
1597
+ };
1598
+ try { target.setPointerCapture?.(event.pointerId); } catch { /* the move events still reach the handle */ }
1599
+ target.addEventListener?.('pointermove', move);
1600
+ target.addEventListener?.('pointerup', end);
1601
+ target.addEventListener?.('pointercancel', end);
1602
+ document.body?.setAttribute?.('data-dpt-resizing', '');
1603
+ stop.current = end;
1604
+ setActive(true);
1605
+ }
1606
+ function onKeyDown(event) {
1607
+ const step = event.shiftKey ? 64 : 16;
1608
+ const next = event.key === 'ArrowLeft' ? layout.width + step : event.key === 'ArrowRight' ? layout.width - step
1609
+ : event.key === 'Home' ? layout.minWidth : event.key === 'End' ? layout.maxWidth : undefined;
1610
+ if (next === undefined) return;
1611
+ event.preventDefault();
1612
+ PANEL.setWidth(clamp(next), true);
1613
+ }
1614
+ return h('div', { className: 'dpt-resize', role: 'separator', 'aria-orientation': 'vertical', tabIndex: 0,
1615
+ 'aria-label': t('panelResize'), title: t('panelResize'), 'data-active': active ? '' : undefined,
1616
+ 'aria-valuenow': layout.width, 'aria-valuemin': layout.minWidth, 'aria-valuemax': layout.maxWidth,
1617
+ onPointerDown, onKeyDown, onDoubleClick: () => PANEL.setWidth(clamp(PANEL_WIDTH), true) });
1618
+ }
1619
+
1620
+ // Mounted in the composer dock for every Deep PTC conversation, whatever the capsule placement: its
1621
+ // marker locates the conversation, and it owns the side panel. When the capsule sits elsewhere the
1622
+ // row is display:none, which keeps the marker (and closest()) working without taking a row.
1623
+ function PanelHost(props) {
1624
+ const { sessionId, useSessions, t } = props;
1625
+ const marker = React.useRef(null);
1626
+ const layout = useSidePanelLayout(sessionId, marker);
1627
+ usePanel();
1628
+ const placement = resolvePlacement(useCompactComposer());
1629
+ const wide = layout ? layout.wide : undefined;
1630
+ React.useEffect(() => PANEL.setWide(sessionId, wide), [sessionId, wide]);
1631
+ React.useEffect(() => () => PANEL.setWide(sessionId, undefined), [sessionId]);
1632
+ const docked = !!layout?.wide && !PANEL.collapsed;
1633
+ const open = docked || PANEL.peek.get(sessionId) === true;
1438
1634
  React.useEffect(() => {
1439
1635
  const region = layout?.region;
1440
1636
  if (!region) return undefined;
@@ -1442,34 +1638,24 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1442
1638
  region.style.setProperty('--dpt-panel-width', `${layout.width}px`);
1443
1639
  return () => { region.removeAttribute('data-dpt-panel-open'); region.style.removeProperty('--dpt-panel-width'); };
1444
1640
  }, [layout?.region, layout?.width, docked]);
1445
- const rows = subagentRows(sessions, sessionId, Date.now());
1446
- const running = rows.filter(row => row.state === 'running').length;
1641
+ const sessions = typeof useSessions === 'function' ? useSessions(state => state) : undefined;
1642
+ const running = subagentRows(sessions, sessionId, Date.now()).some(row => row.state === 'running');
1447
1643
  React.useEffect(() => {
1448
- SESSIONS.setWorking(sessionId, running > 0);
1644
+ SESSIONS.setWorking(sessionId, running);
1449
1645
  return () => SESSIONS.setWorking(sessionId, false);
1450
- }, [sessionId, running > 0]);
1451
- const failures = tools && typeof tools === 'object' ? (tools.report?.tools ?? []).length : 0;
1452
- const environment = settings.status === 'ready' && settings.value ? envLabel(settings.value.environment ?? 'auto', t) : undefined;
1453
- const label = [environment, rows.length ? `${t('agentsTitle')} ${rows.length}` : null, failures ? `${t('toolFailures')} ${failures}` : null]
1454
- .filter(Boolean).join(' · ') || t('sideTitle');
1455
- const toggle = () => {
1456
- if (layout?.wide) {
1457
- const next = !collapsed;
1458
- setCollapsed(next);
1459
- try { localStorage.setItem(PANEL_COLLAPSED_KEY, next ? '1' : '0'); } catch { /* viewer preference */ }
1460
- } else setPeek(value => !value);
1461
- };
1646
+ }, [sessionId, running]);
1462
1647
  const panel = open && layout ? ReactDOM.createPortal(h('aside', { className: 'dpt-sidecar',
1463
1648
  'data-floating': docked ? undefined : '', 'aria-label': t('sideTitle'),
1464
- style: { top: layout.top, right: layout.right, height: layout.height, width: layout.width } },
1649
+ style: { top: layout.top, right: layout.right, height: layout.height, width: layout.width,
1650
+ '--dpt-inset-bottom': layout.inset ? `${layout.inset}px` : undefined } },
1651
+ h(ResizeHandle, { layout, t }),
1465
1652
  h('header', { className: 'dpt-sidecar-head' }, h('h3', null, t('sideTitle')),
1466
- h('button', { type: 'button', className: 'dpt-icon-btn', onClick: toggle, 'aria-label': t('panelClose') }, '×')),
1653
+ h('button', { type: 'button', className: 'dpt-icon-btn', onClick: () => PANEL.toggle(sessionId), 'aria-label': t('panelClose') }, '×')),
1467
1654
  h(DeepPtcPanel, props)), document.body) : null;
1468
- return h('div', { ref: marker, className: 'dpt-capsule-row' },
1469
- h('button', { type: 'button', className: 'dpt-capsule', 'data-state': running ? 'running' : 'idle', 'aria-expanded': open,
1470
- title: t('capsuleOpen'), onClick: toggle },
1471
- h('span', { className: 'dpt-agent-dot', 'aria-hidden': 'true' }), h('span', null, label)),
1472
- panel,
1655
+ return h(React.Fragment, null,
1656
+ h('div', { ref: marker, className: 'dpt-capsule-row', 'data-placement': placement },
1657
+ placement === 'dock' ? h(CapsuleButton, { ...props, open }) : null,
1658
+ panel),
1473
1659
  open && !layout && typeof ReactDOM?.createPortal !== 'function' ? h(DeepPtcPanel, { ...props, inline: true }) : null);
1474
1660
  }
1475
1661
 
@@ -1496,11 +1682,41 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1496
1682
  function DockHost(props) {
1497
1683
  // Registered for every session; only Deep PTC sessions draw the capsule.
1498
1684
  if (projectionValue(props.useProjection, 'agentPreset') !== 'deep-ptc') return null;
1499
- return h(Boundary, null, h(Capsule, props));
1685
+ return h(Boundary, null, h(PanelHost, props));
1686
+ }
1687
+
1688
+ // The compact capsule in the composer toolbar, beside the host's own controls (conversation.input.right).
1689
+ function ToolbarHost(props) {
1690
+ usePanel();
1691
+ const placement = resolvePlacement(useCompactComposer());
1692
+ if (projectionValue(props.useProjection, 'agentPreset') !== 'deep-ptc' || placement !== 'toolbar') return null;
1693
+ return h(Boundary, null, h(CapsuleButton, { ...props, compact: true }));
1500
1694
  }
1501
1695
 
1502
- function TabHost({ t }) {
1503
- return h('p', { className: 'dpt-side-note' }, t('panelMoved'));
1696
+ const PLACEMENT_NOTES = { dock: 'panelMoved', toolbar: 'panelMovedToolbar', hidden: 'panelMovedHidden' };
1697
+ function TabHost({ sessionId, t }) {
1698
+ usePanel();
1699
+ const placement = resolvePlacement(useCompactComposer());
1700
+ const id = sessionId ?? SESSIONS.current()?.id;
1701
+ return h('div', { className: 'dpt-side-section' },
1702
+ h('p', { className: 'dpt-side-note' }, t(PLACEMENT_NOTES[placement])),
1703
+ h('button', { type: 'button', className: 'dpt-btn dpt-btn-block', disabled: id === undefined, onClick: () => PANEL.open(id) }, t('panelOpen')));
1704
+ }
1705
+
1706
+ const PLACEMENT_LABELS = { auto: 'placementAuto', dock: 'placementDock', toolbar: 'placementToolbar', hidden: 'placementHidden' };
1707
+ function CapsulePlacementSection({ t }) {
1708
+ usePanel();
1709
+ const compact = useCompactComposer();
1710
+ const label = t('capsulePlacement');
1711
+ const note = PANEL.placement === 'auto'
1712
+ ? `${tf(t, 'placementAutoNow', { place: t(PLACEMENT_LABELS[resolvePlacement(compact)]) })}${t('placementHint')}`
1713
+ : t('placementHint');
1714
+ return h('section', { className: 'dpt-side-section', 'aria-label': label },
1715
+ h('div', { className: 'dpt-side-label' }, h('span', null, label)),
1716
+ h('div', { className: 'dpt-seg', role: 'radiogroup', 'aria-label': label },
1717
+ ...PLACEMENTS.map(option => h('button', { key: option, type: 'button', role: 'radio', className: 'dpt-seg-btn',
1718
+ 'aria-checked': option === PANEL.placement, onClick: () => PANEL.setPlacement(option) }, t(PLACEMENT_LABELS[option])))),
1719
+ h('p', { className: 'dpt-side-note' }, note));
1504
1720
  }
1505
1721
 
1506
1722
  function TabTitle({ t }) {
@@ -1528,7 +1744,8 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1528
1744
  // The form labels its own environment field.
1529
1745
  h('section', { 'aria-label': t('environment') },
1530
1746
  form ? h(Card, { form, t }) : h('p', { className: 'dpt-side-note' }, t('readOnly'))),
1531
- h('section', { 'aria-label': t('visualEffects') }, h('h3', null, t('appearance')), h(VisualEffectsSection, { t })),
1747
+ h('section', { 'aria-label': t('appearance') }, h('h3', null, t('appearance')),
1748
+ h(VisualEffectsSection, { t }), h(CapsulePlacementSection, { t })),
1532
1749
  h(DiagnosticsSection, { t }));
1533
1750
  }
1534
1751
 
@@ -1585,6 +1802,12 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1585
1802
  installPresetLabels(ctx.slots, t, useLocaleRevision);
1586
1803
  ctx.effect(() => injectCss(), `${PLUGIN}: style`);
1587
1804
  ctx.effect(() => watchActiveSession(), `${PLUGIN}: active session`);
1805
+ ctx.effect(() => {
1806
+ if (typeof window?.addEventListener !== 'function') return () => {};
1807
+ const sync = event => PANEL.sync(event);
1808
+ window.addEventListener('storage', sync);
1809
+ return () => window.removeEventListener('storage', sync);
1810
+ }, `${PLUGIN}: panel preferences`);
1588
1811
  const form = ctx.configForms.get(NS);
1589
1812
  ctx.effect(() => ctx.configForms.whileServed([NS], () => {
1590
1813
  const disposers = [
@@ -1635,17 +1858,34 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
1635
1858
  inject: sessionTools(child),
1636
1859
  }, props => h(LocalizedSlot, { ...props, form, component: DockHost })));
1637
1860
  } catch { /* the composer stays usable when this slot cannot register */ }
1861
+ try {
1862
+ // The compact capsule joins the host's tool row, so a one-row composer keeps one row.
1863
+ child.slots.inject('conversation.input.right', () => child.slots.register({
1864
+ name: 'conversation.input.right', id: 'deep-ptc-capsule', order: 80, locale: 'deep-ptc',
1865
+ }, props => h(LocalizedSlot, { ...props, form, component: ToolbarHost })));
1866
+ } catch { /* the capsule stays below the composer */ }
1638
1867
  });
1639
1868
  } catch { /* the composer stays usable when this slot cannot register */ }
1640
1869
  try {
1641
- // Saved 1.9.0 sidebar tabs show a migration hint. New entries use the composer capsule.
1870
+ // The tab holds a button that opens the panel. It is listed on the sidebar's new-tab guide only
1871
+ // while the capsule is hidden, as the way back to the panel; saved tabs open in any placement.
1642
1872
  ctx.inject?.(['remote', 'remote.commands', 'sidebarRightTabs'], child => {
1643
1873
  child.effect(() => {
1644
- const dispose = child.sidebarRightTabs.register({
1645
- id: PLUGIN, kind: TAB_KIND, title: () => t('sideTitle'),
1646
- guide: [],
1647
- });
1648
- return dispose;
1874
+ let hidden;
1875
+ let dispose;
1876
+ const register = () => {
1877
+ const next = PANEL.placement === 'hidden';
1878
+ if (next === hidden) return;
1879
+ hidden = next;
1880
+ dispose?.();
1881
+ dispose = child.sidebarRightTabs.register({
1882
+ id: PLUGIN, kind: TAB_KIND, title: () => t('sideTitle'),
1883
+ guide: hidden ? [{ id: TAB_KIND, order: 60, title: () => t('sideTitle'), description: () => t('sideGuide') }] : [],
1884
+ });
1885
+ };
1886
+ register();
1887
+ const unsubscribe = PANEL.subscribe(register);
1888
+ return () => { unsubscribe(); dispose?.(); };
1649
1889
  }, `${PLUGIN}: sidebar tab type`);
1650
1890
  child.slots.inject('sidebar.right.pane.tab', () => child.slots.register({
1651
1891
  name: 'sidebar.right.pane.tab', key: PLUGIN, locale: 'deep-ptc', inject: sessionTools(child),
package/locale/en.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "Deep PTC Mode",
4
- "description": "Deep PTC builds on official PTC with interruptible jobs, selectable shells and a conversation-side panel. Click output files to open them; compact subagent rows show names and duration. Use drawing, design and research tools on demand, with general SSH and DSH Go assistance. The UI follows DSH's Chinese or English setting.",
4
+ "description": "Deep PTC builds on official PTC with interruptible jobs, selectable shells and a conversation-side panel. Click output files to open them; drag the panel edge to resize it, and place the capsule below the composer, in its toolbar or nowhere. Use drawing, design and research tools on demand, with general SSH and DSH Go assistance. The UI follows DSH's Chinese or English setting.",
5
5
  "detail": "README.md"
6
6
  }
7
7
  }
package/locale/zh.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "meta": {
3
3
  "title": "深度 PTC 模式",
4
- "description": "基于官方 PTC 的深度模式:可插话的后台任务、可选执行环境和对话侧边面板,输出文件可点击打开,子代理行简洁展示名字与用时。按需使用绘图、设计和研究工具,提供通用 SSH 与 DSH Go 连接辅助,界面随 DSH 设置切换中英文。",
4
+ "description": "基于官方 PTC 的深度模式:可插话的后台任务、可选执行环境和对话侧边面板,输出文件可点击打开,面板宽度可拖动调整,胶囊可放在输入框下方、工具栏或隐藏。按需使用绘图、设计和研究工具,提供通用 SSH 与 DSH Go 连接辅助,界面随 DSH 设置切换中英文。",
5
5
  "detail": "README.zh.md"
6
6
  }
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dsh-deep-ptc-mode",
3
- "version": "1.9.3",
3
+ "version": "1.9.4",
4
4
  "description": "Deep PTC for DeepSeek Harness: interruptible jobs, selectable shells, a side panel with clickable outputs and compact subagent rows, general SSH and DSH Go assistance, bilingual UI, and on-demand tools and skills for drawing, design and research.",
5
5
  "type": "module",
6
6
  "keywords": [