dsh-deep-ptc-mode 1.9.2 → 1.9.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/COMPATIBILITY.md +3 -3
- package/README.md +5 -5
- package/README.zh.md +5 -5
- package/TEST_REPORT.md +4 -1
- package/lib/client.js +44 -30
- package/locale/en.json +1 -1
- package/locale/zh.json +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.9.3 — 2026-11-12
|
|
4
|
+
|
|
5
|
+
- 侧边输出文件可点击,使用 DSH 原生文件资源接口按所属会话打开;兼容折叠列表、相对路径、Windows/UNC 路径及带中文和特殊字符的文件名,预览不可用时显示提示。
|
|
6
|
+
- 子代理行精简为状态指示、名字与同一行最右侧的用时,移除可见状态文字、统计摘要和 token 消耗。状态仍供辅助阅读工具使用。
|
|
7
|
+
- Output files open through DSH's native session-scoped viewer, including folded entries, relative/Windows/UNC paths and special characters; unavailable previews show a message.
|
|
8
|
+
- Subagent rows show the state indicator, name and right-aligned duration. Visible state text, summaries and token usage are removed; state remains available to assistive technology.
|
|
9
|
+
|
|
3
10
|
## 1.9.2 — 2026-11-12
|
|
4
11
|
|
|
5
12
|
- 文档与简介说明 DrawAI 绘图、归藏设计技能、Agentero 论文工具、dsh-ops 执行环境及 DSH Go 连接辅助的协作方式,并标明验证范围。26 个真实工具通过隔离注册、发现、选用和宿主双语言 SDK 渲染;DrawAI 的文件编辑、SVG 导出和 revision 冲突保护通过。统一分类层将明确的并发编辑冲突归为输入状态过旧,修复连续旧 revision 拒写导致工具误隔离;保留实现缺陷、不可用和部分完成的处理。
|
package/COMPATIBILITY.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
# 插件协作与验证范围 / Plugin workflows and verification
|
|
2
2
|
|
|
3
|
-
Deep PTC **1.9.
|
|
3
|
+
Deep PTC **1.9.3** · 核对日期:2026-11-12。接口验证使用 DSH Desktop 0.2.2-rc.2 的校验器与 SDK 渲染器、内嵌 Node 24.21.0。
|
|
4
4
|
|
|
5
5
|
## 可以配合完成哪些工作
|
|
6
6
|
|
|
@@ -49,7 +49,7 @@ DSH Go 的连接资料是额外便利:按远端系统选择托管启动或连
|
|
|
49
49
|
|
|
50
50
|
## English
|
|
51
51
|
|
|
52
|
-
Deep PTC 1.9.
|
|
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.
|
|
53
53
|
|
|
54
54
|
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
55
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Deep PTC mode
|
|
2
2
|
|
|
3
|
-
[中文](README.zh.md) · MIT · **1.9.
|
|
3
|
+
[中文](README.zh.md) · MIT · **1.9.3**
|
|
4
4
|
|
|
5
5
|
[Changelog](CHANGELOG.md) · [Test report](TEST_REPORT.md) · [Plugin workflows and verification](COMPATIBILITY.md)
|
|
6
6
|
|
|
@@ -69,9 +69,9 @@ The Deep PTC mode label, settings, and conversation UI switch between Chinese an
|
|
|
69
69
|
- **Settings → Deep PTC**: execution environment and shell, the visual effects switch, and copyable diagnostics to attach to interface bug reports.
|
|
70
70
|
- **The Deep PTC panel beside the conversation** is open by default when there is room. It follows the conversation width and hides under a fullscreen native sidebar. On narrow screens the bottom capsule expands it.
|
|
71
71
|
- **Execution environment**: WSL, PowerShell, native Bash or Zsh, for newly created Deep PTC sessions.
|
|
72
|
-
- **Subagents**: name
|
|
72
|
+
- **Subagents**: the state indicator and name on the left, with duration at the right of the same row; a row opens that subagent's chat in the official right sidebar.
|
|
73
73
|
- **Background jobs**: six positions, up to five active jobs first and up to three finished jobs; overflow folds into one expandable row.
|
|
74
|
-
- **Output files**: files this conversation wrote or delivered, newest first
|
|
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
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.
|
|
@@ -214,10 +214,10 @@ A prompt changes the model's working tendency, not the real token limit or billi
|
|
|
214
214
|
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
215
|
|
|
216
216
|
```js
|
|
217
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.
|
|
217
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.3" })
|
|
218
218
|
// Or from a local checkout or archive:
|
|
219
219
|
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.
|
|
220
|
+
// Or target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.3.tgz"
|
|
221
221
|
```
|
|
222
222
|
|
|
223
223
|
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,6 +1,6 @@
|
|
|
1
1
|
# 深度 PTC 模式
|
|
2
2
|
|
|
3
|
-
[English](README.md) · MIT · 当前版本 **1.9.
|
|
3
|
+
[English](README.md) · MIT · 当前版本 **1.9.3**
|
|
4
4
|
|
|
5
5
|
[更新日志](CHANGELOG.md) · [测试报告](TEST_REPORT.md) · [插件协作与验证范围](COMPATIBILITY.md)
|
|
6
6
|
|
|
@@ -69,9 +69,9 @@ Deep PTC 的模式名称、设置页和会话界面会随 DSH「设置 → 通
|
|
|
69
69
|
- **设置 → 深度 PTC**:执行环境与 Shell、界面特效开关,以及可复制的诊断信息(反馈界面问题时附上)。
|
|
70
70
|
- **对话侧边的「深度 PTC」面板**。空间充足时默认显示,并随对话区尺寸调整。原生侧栏全屏覆盖对话时会隐藏,窄屏可通过下方胶囊展开。
|
|
71
71
|
- **执行环境**:WSL、PowerShell、原生 Bash 或 Zsh,对之后新建的深度 PTC 会话生效。
|
|
72
|
-
-
|
|
72
|
+
- **子代理**:状态指示与名称在左,用时在同一行的最右侧;点击在官方右侧栏打开该子代理的对话。
|
|
73
73
|
- **后台任务**:最多六个位置,运行中优先且最多五条,已结束最多三条,超出部分合为一条可展开记录。
|
|
74
|
-
-
|
|
74
|
+
- **输出文件**:本会话写入或交付的文件,最新的在前;点击通过 DSH 原生文件预览打开对应文件。最多三个位置,超出时折叠占一个位置。规则与 DSH 官方的交付卡片一致,并包括 `run_code` 里写入的文件。
|
|
75
75
|
- **SSH 连接**:本会话连接过的主机(成功或失败)与 `~/.ssh/config` 中的主机别名。
|
|
76
76
|
- **工具状态**:“重载所有工具状态”按钮,以及调用失败的外部工具(如有)。
|
|
77
77
|
- **输入框下方的小胶囊**显示执行环境、子代理数和工具提醒,点击展开或收起独立的侧边面板。1.9.0 保存的旧侧栏页签会显示迁移提示。
|
|
@@ -218,10 +218,10 @@ Deep PTC 可以把其他插件提供的能力接进同一项任务:用 **DrawA
|
|
|
218
218
|
本地目录或构建产物可通过插件管理器安装:
|
|
219
219
|
|
|
220
220
|
```js
|
|
221
|
-
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.
|
|
221
|
+
plugin_manager({ action: "install_bundle", target: "dsh-deep-ptc-mode@1.9.3" })
|
|
222
222
|
// 也可从本地目录或安装包安装:
|
|
223
223
|
plugin_manager({ action: "install_bundle", target: "C:\\path\\to\\dsh-deep-ptc-mode" })
|
|
224
|
-
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.
|
|
224
|
+
// 或 target: "C:\\path\\to\\dsh-deep-ptc-mode-1.9.3.tgz"
|
|
225
225
|
```
|
|
226
226
|
|
|
227
227
|
GitHub 地址:`github:lishize20040802-rgb/dsh-deep-ptc-mode`。该地址安装远端实际内容;本地升级不会自动发布到 GitHub/npm。
|
package/TEST_REPORT.md
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
# 1.9.
|
|
1
|
+
# 1.9.3 测试报告 / Test report
|
|
2
|
+
|
|
3
|
+
> 1.9.3 界面调整:201 项自动化测试及结构检查通过。输出文件按钮覆盖普通/折叠列表、所属会话、相对/Windows/UNC 路径、中文及特殊字符、旧版预览接口和打开失败后的恢复。另使用真实 DSH Desktop 0.2.2-rc.2 文件地址解析器确认四类路径可由当前面板的打开函数正确还原。子代理行保留状态指示与辅助阅读标签,可见内容仅为名称和同一行右侧的用时。未做整窗目视验收。
|
|
4
|
+
> 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.
|
|
2
5
|
|
|
3
6
|
> 2026-11-12 插件协作验证:已发布包的实际注册代码在隔离服务上下文中注册 DrawAI 0.4.6 的 19 个工具、归藏设计 0.1.4 的 2 个工具和 Agentero host 0.1.8 的 5 个工具。使用桌面宿主 0.2.2-rc.2 的实际参数校验器及 TypeScript / Python SDK 渲染器,26 个工具的发现和选用路径通过。7 条技能全文读取通过;DrawAI 临时文件的读→改→回读、SVG 导出及旧 revision 拒写通过。修复前连续三次旧 revision 拒写会误隔离改图工具;通用分类修复后文件保持不变、工具仍可用,最新 revision 写入通过。新增两项回归测试,全部 199 项通过。context 为源码接口核对。完整来源、版本和未验证项目见 [协作说明](COMPATIBILITY.md)。未做浏览器/模型/外部 CLI/视频端到端验证。
|
|
4
7
|
> Plugin workflow verification: 26 actual published tool definitions passed isolated registration, host 0.2.2-rc.2 schema validation, Deep PTC selection and both host SDK renderers. Seven skill contents, DrawAI read/edit/readback and SVG export passed. Three stale-revision rejections reproduced incorrect quarantine before the generic conflict-classification fix; afterwards safe rejection and a fresh-revision write passed. All 199 tests pass, including two new regressions. Context received source review. See the linked report for versions and limits; no browser, model, external CLI or video end-to-end test was performed.
|
package/lib/client.js
CHANGED
|
@@ -216,18 +216,19 @@ window.__ModuleLoader__.load({ id: 'dsh-deep-ptc-mode', factory: require => {
|
|
|
216
216
|
skillHint: '关闭的 Skill 会在你发送下一条消息时移出上下文,历史记录不受影响。',
|
|
217
217
|
skillKeepAll: '全部保留', skillCloseAll: '全部关闭', skillNoDescription: '无描述', skillThisTurn: '本轮',
|
|
218
218
|
skillShowAll: '显示全部 {count} 个', skillShowLess: '收起',
|
|
219
|
-
agentsTitle: '子代理',
|
|
219
|
+
agentsTitle: '子代理',
|
|
220
220
|
agentRunning: '运行中', agentCompleted: '已完成', agentIdle: '空闲', agentExternal: '外部',
|
|
221
221
|
agentOpen: '在右侧栏打开这个子代理的对话',
|
|
222
222
|
sideTitle: '深度 PTC', toolsSection: '工具状态', envAuto: '自动', envForNew: '新会话生效', envThisSession: '本会话保持创建时的环境。',
|
|
223
223
|
envAutoNow: '当前按自动选择:{env}。本会话保持创建时的环境。', envSaved: '已保存,之后新建的会话使用 {env}。',
|
|
224
224
|
envFailed: '未能保存,请检查发行版名称或设置是否已在别处修改。', envDefaultDistribution: '默认发行版',
|
|
225
|
-
durationSeconds: '{s} 秒', durationMinutes: '{m} 分 {s} 秒', durationHours: '{h} 小时 {m} 分',
|
|
225
|
+
durationSeconds: '{s} 秒', durationMinutes: '{m} 分 {s} 秒', durationHours: '{h} 小时 {m} 分',
|
|
226
226
|
sideGuide: '执行环境、子代理、后台任务、输出文件与 SSH', sideOtherMode: '当前对话不是深度 PTC 模式。这里的执行环境用于之后新建的深度 PTC 会话。',
|
|
227
227
|
capsuleOpen: '展开或收起侧边面板', panelClose: '收起侧边面板',
|
|
228
228
|
panelMoved: '深度 PTC 面板已回到对话区侧边,请使用输入框下方的胶囊展开。',
|
|
229
229
|
outputsTitle: '输出文件', outputsEmpty: '本会话暂无输出文件。', outputsMore: '另有 {count} 个文件',
|
|
230
230
|
outputPresented: '已交付', outputTurn: '第 {turn} 轮',
|
|
231
|
+
outputOpenFailed: '无法打开文件,请检查文件是否仍存在,以及宿主文件预览是否可用。',
|
|
231
232
|
sshTitle: 'SSH 连接', sshHint: '非交互连接', sshNoClient: '未找到 OpenSSH 客户端', sshConfigured: '已配置',
|
|
232
233
|
sshUsed: '第 {turn} 轮 · {count} 次', sshFailed: '第 {turn} 轮失败', sshEmpty: '~/.ssh/config 中没有主机别名,本会话也未连接过远程主机。',
|
|
233
234
|
sshCopy: '复制 SSH 检查命令', sshGoCopy: '复制 DSH Go 连接资料', sshCopied: '已复制', sshCopyFailed: '复制失败,请检查剪贴板权限。',
|
|
@@ -242,18 +243,19 @@ window.__ModuleLoader__.load({ id: 'dsh-deep-ptc-mode', factory: require => {
|
|
|
242
243
|
skillHint: 'A closed skill leaves the model context when you send your next message. The history stays complete.',
|
|
243
244
|
skillKeepAll: 'Keep all', skillCloseAll: 'Close all', skillNoDescription: 'No description', skillThisTurn: 'this turn',
|
|
244
245
|
skillShowAll: 'Show all {count}', skillShowLess: 'Show less',
|
|
245
|
-
agentsTitle: 'Subagents',
|
|
246
|
+
agentsTitle: 'Subagents',
|
|
246
247
|
agentRunning: 'Running', agentCompleted: 'Done', agentIdle: 'Idle', agentExternal: 'External',
|
|
247
248
|
agentOpen: 'Open this subagent in the right sidebar',
|
|
248
249
|
sideTitle: 'Deep PTC', toolsSection: 'Tool state', envAuto: 'Auto', envForNew: 'for new sessions', envThisSession: 'This session keeps the environment it was created with.',
|
|
249
250
|
envAutoNow: 'Automatic picks {env}. This session keeps the environment it was created with.', envSaved: 'Saved. New sessions use {env}.',
|
|
250
251
|
envFailed: 'Could not save. Check the distribution name, or whether settings changed elsewhere.', envDefaultDistribution: 'Default distribution',
|
|
251
|
-
durationSeconds: '{s}s', durationMinutes: '{m}m {s}s', durationHours: '{h}h {m}m',
|
|
252
|
+
durationSeconds: '{s}s', durationMinutes: '{m}m {s}s', durationHours: '{h}h {m}m',
|
|
252
253
|
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.',
|
|
253
254
|
capsuleOpen: 'Expand or collapse the side panel', panelClose: 'Collapse the side panel',
|
|
254
255
|
panelMoved: 'The Deep PTC panel is beside the conversation. Use the capsule below the composer to expand it.',
|
|
255
256
|
outputsTitle: 'Output files', outputsEmpty: 'No output files in this conversation.', outputsMore: '{count} more files',
|
|
256
257
|
outputPresented: 'Delivered', outputTurn: 'Turn {turn}',
|
|
258
|
+
outputOpenFailed: 'Could not open the file. Check that it still exists and the host file preview is available.',
|
|
257
259
|
sshTitle: 'SSH connections', sshHint: 'non-interactive', sshNoClient: 'OpenSSH client not found', sshConfigured: 'Configured',
|
|
258
260
|
sshUsed: 'Turn {turn} · {count}×', sshFailed: 'Failed in turn {turn}', sshEmpty: 'No host aliases in ~/.ssh/config and no remote host reached in this conversation.',
|
|
259
261
|
sshCopy: 'Copy SSH check command', sshGoCopy: 'Copy DSH Go connection details', sshCopied: 'Copied', sshCopyFailed: 'Could not copy. Check clipboard permissions.',
|
|
@@ -309,7 +311,7 @@ ${DARK} .dpt-card{--dpt-card-fill:var(--dsw-static-neutral-850,#1a1f29)}
|
|
|
309
311
|
.dpt-card .dpt-btn:hover:not(:disabled){background:var(--dsw-alias-button-floating-hover,var(--dsw-alias-interactive-bg-hover,rgba(16,24,40,.05)))}
|
|
310
312
|
.dpt-btn:disabled{opacity:.45;cursor:default}
|
|
311
313
|
.dpt-btn[aria-busy="true"]{cursor:wait}
|
|
312
|
-
.dpt-btn:focus-visible,.dpt-switch:focus-visible,.dpt-agent:focus-visible,.dpt-icon-btn:focus-visible,.dpt-link:focus-visible,.dpt-capsule:focus-visible{outline:2px solid var(--dpt-accent,#3370ff);outline-offset:2px}
|
|
314
|
+
.dpt-btn:focus-visible,.dpt-switch:focus-visible,.dpt-agent:focus-visible,.dpt-file-open:focus-visible,.dpt-icon-btn:focus-visible,.dpt-link:focus-visible,.dpt-capsule:focus-visible{outline:2px solid var(--dpt-accent,#3370ff);outline-offset:2px}
|
|
313
315
|
.dpt-skill-list{list-style:none;margin:0;padding:0 4px 4px;display:flex;flex-direction:column;gap:2px}
|
|
314
316
|
.dpt-skill{display:flex;align-items:center;gap:12px;padding:7px 8px 7px 10px;border-radius:10px;transition:background-color 120ms}
|
|
315
317
|
.dpt-skill:hover{background:var(--dsw-alias-interactive-bg-hover,rgba(16,24,40,.05))}
|
|
@@ -373,6 +375,10 @@ ${ON} .dpt-capsule[data-state="running"] .dpt-agent-dot,${ON} .dpt-agent[data-st
|
|
|
373
375
|
.dpt-jobs-more .dpt-jobs-list{margin-top:4px}
|
|
374
376
|
.dpt-agent-main{flex:1;min-width:0;display:flex;flex-direction:column}
|
|
375
377
|
.dpt-agent-name{font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
378
|
+
.dpt-side-agents .dpt-agent{align-items:center}
|
|
379
|
+
.dpt-side-agents .dpt-agent-dot{margin-top:0}
|
|
380
|
+
.dpt-side-agents .dpt-agent-name{flex:1;min-width:0}
|
|
381
|
+
.dpt-agent-duration{flex:none;margin-left:auto;font-size:11px;color:var(--dsw-alias-label-tertiary,#667085);font-variant-numeric:tabular-nums;white-space:nowrap}
|
|
376
382
|
.dpt-agent-meta{font-size:11px;line-height:16px;color:var(--dsw-alias-label-tertiary,#667085);font-variant-numeric:tabular-nums;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
377
383
|
.dpt-capsule-row{display:flex;flex-direction:column;align-items:flex-end;padding:4px 2px 0}
|
|
378
384
|
.dpt-capsule{display:inline-flex;align-items:center;gap:8px;max-width:100%;height:26px;padding:0 11px;box-sizing:border-box;border-radius:999px;border:1px solid var(--dpt-line);background:var(--dsw-alias-bg-base,#fff);color:var(--dsw-alias-label-secondary,#4a5565);font:inherit;font-size:12px;cursor:pointer;transition:border-color 120ms,color 120ms}
|
|
@@ -396,6 +402,7 @@ ${ON} .dpt-capsule[data-state="running"] .dpt-agent-dot,${ON} .dpt-agent[data-st
|
|
|
396
402
|
.dpt-diag{margin:8px 0 0;padding:10px 12px;max-height:220px;overflow:auto;border-radius:10px;border:1px solid var(--dpt-line);font:11px/16px var(--ds-font-family-code,ui-monospace,monospace);white-space:pre-wrap;word-break:break-word}
|
|
397
403
|
.dpt-files{display:grid;gap:1px;list-style:none;margin:0;padding:0}
|
|
398
404
|
.dpt-file{display:flex;align-items:center;gap:6px;min-width:0;height:22px;padding:0 6px;border-radius:6px;font-size:12px;line-height:18px}
|
|
405
|
+
.dpt-file-open{box-sizing:border-box;width:100%;border:0;background:transparent;color:inherit;font-family:inherit;text-align:left;cursor:pointer}
|
|
399
406
|
.dpt-file:hover{background:color-mix(in srgb,var(--dpt-accent) 6%,transparent)}
|
|
400
407
|
.dpt-file-name{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--ds-font-family-code,ui-monospace,monospace);font-size:11.5px}
|
|
401
408
|
.dpt-file-meta{flex:none;max-width:45%;font-size:11px;color:var(--dsw-alias-label-tertiary,#667085);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
|
@@ -937,12 +944,10 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
|
|
|
937
944
|
const completed = !external && entry.activity === 'inactive' && timing?.lastTurnCompleted === true;
|
|
938
945
|
const duration = timing === undefined || external ? undefined : timing.active === undefined ? timing.settledMs
|
|
939
946
|
: timing.settledMs + Math.max(0, (running ? now : timing.active.through) - timing.active.since);
|
|
940
|
-
const usage = summary?.projectionValues?.tokenUsage;
|
|
941
|
-
const tokens = usage ? usage.uncachedInputTokens + usage.outputTokens + usage.cacheReadTokens + usage.cacheWriteTokens : undefined;
|
|
942
947
|
rows.push({ id: entry.id, parentId, mode: entry.mode, depth,
|
|
943
948
|
label: entry.label ?? summary?.title ?? summary?.displayTitle ?? entry.id,
|
|
944
949
|
state: external ? 'external' : running ? 'running' : completed ? 'completed' : 'idle',
|
|
945
|
-
duration: Number.isFinite(duration) ? duration : undefined
|
|
950
|
+
duration: Number.isFinite(duration) ? duration : undefined });
|
|
946
951
|
visit(entry.id, depth + 1);
|
|
947
952
|
}
|
|
948
953
|
};
|
|
@@ -957,12 +962,6 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
|
|
|
957
962
|
if (total >= 60) return tf(t, 'durationMinutes', { m: Math.floor(total / 60), s });
|
|
958
963
|
return tf(t, 'durationSeconds', { s });
|
|
959
964
|
}
|
|
960
|
-
function formatTokens(value) {
|
|
961
|
-
if (value < 1000) return String(value);
|
|
962
|
-
const scaled = value < 1e6 ? value / 1000 : value / 1e6;
|
|
963
|
-
return `${scaled >= 100 ? Math.round(scaled) : Math.round(scaled * 10) / 10}${value < 1e6 ? 'k' : 'M'}`;
|
|
964
|
-
}
|
|
965
|
-
|
|
966
965
|
function openSubagent(row) {
|
|
967
966
|
const sidebar = hostCtx?.get?.('sidebarRight');
|
|
968
967
|
if (typeof sidebar?.openResource === 'function') {
|
|
@@ -1231,14 +1230,33 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
|
|
|
1231
1230
|
const OUTPUT_PREVIEW_LIMIT = 3;
|
|
1232
1231
|
const fileName = path => String(path).split(/[\\/]/u).filter(Boolean).at(-1) ?? String(path);
|
|
1233
1232
|
|
|
1234
|
-
function
|
|
1233
|
+
function openOutputFile(sessionId, path) {
|
|
1234
|
+
// Use the same session-scoped resource address as the host's deliverable cards.
|
|
1235
|
+
const segment = value => encodeURIComponent(value).replace(/%3A/giu, ':');
|
|
1236
|
+
const normalized = path.replace(/\\/gu, '/').replace(/^(?:\.\/)+/u, '');
|
|
1237
|
+
const address = `dsh-resource://file/session/${segment(sessionId)}/${normalized.split('/').map(segment).join('/')}`;
|
|
1238
|
+
const sidebar = hostCtx?.get?.('sidebarRight');
|
|
1239
|
+
if (typeof sidebar?.openResourceIn === 'function') return sidebar.openResourceIn(sessionId, address);
|
|
1240
|
+
if (typeof sidebar?.openResource === 'function') return sidebar.openResource(address);
|
|
1241
|
+
throw new Error('File preview is unavailable');
|
|
1242
|
+
}
|
|
1243
|
+
|
|
1244
|
+
function OutputsSection({ sessionId, outputs, t }) {
|
|
1245
|
+
const [failed, setFailed] = React.useState(false);
|
|
1246
|
+
React.useEffect(() => setFailed(false), [sessionId]);
|
|
1247
|
+
async function open(path) {
|
|
1248
|
+
setFailed(false);
|
|
1249
|
+
try { await openOutputFile(sessionId, path); } catch { setFailed(true); }
|
|
1250
|
+
}
|
|
1235
1251
|
const rows = Array.isArray(outputs) ? outputs : [];
|
|
1236
1252
|
const overflow = rows.length > OUTPUT_PREVIEW_LIMIT;
|
|
1237
1253
|
const visible = rows.slice(0, overflow ? OUTPUT_PREVIEW_LIMIT - 1 : OUTPUT_PREVIEW_LIMIT);
|
|
1238
1254
|
const hidden = overflow ? rows.slice(visible.length) : [];
|
|
1239
|
-
const row = item => h('li', { key: item.path
|
|
1255
|
+
const row = item => h('li', { key: item.path },
|
|
1256
|
+
h('button', { type: 'button', className: 'dpt-file dpt-file-open', 'data-kind': item.kind, title: item.path,
|
|
1257
|
+
onClick: () => { void open(item.path); } },
|
|
1240
1258
|
h('span', { className: 'dpt-file-name' }, fileName(item.path)),
|
|
1241
|
-
h('span', { className: 'dpt-file-meta' }, item.kind === 'presented' ? t('outputPresented') : tf(t, 'outputTurn', { turn: item.turn })));
|
|
1259
|
+
h('span', { className: 'dpt-file-meta' }, item.kind === 'presented' ? t('outputPresented') : tf(t, 'outputTurn', { turn: item.turn }))));
|
|
1242
1260
|
const title = t('outputsTitle');
|
|
1243
1261
|
return h('section', { className: 'dpt-side-section dpt-side-files', 'aria-label': title },
|
|
1244
1262
|
h('div', { className: 'dpt-side-label' }, h('span', null, title), rows.length ? h('span', { className: 'dpt-side-hint' }, String(rows.length)) : null),
|
|
@@ -1246,7 +1264,8 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
|
|
|
1246
1264
|
hidden.length ? h('li', { className: 'dpt-files-more' },
|
|
1247
1265
|
h('details', null, h('summary', null, tf(t, 'outputsMore', { count: hidden.length })),
|
|
1248
1266
|
h('ul', { className: 'dpt-files' }, ...hidden.map(row)))) : null)
|
|
1249
|
-
: h('p', { className: 'dpt-side-note' }, t('outputsEmpty'))
|
|
1267
|
+
: h('p', { className: 'dpt-side-note' }, t('outputsEmpty')),
|
|
1268
|
+
failed ? h('p', { className: 'dpt-side-note', role: 'status' }, t('outputOpenFailed')) : null);
|
|
1250
1269
|
}
|
|
1251
1270
|
|
|
1252
1271
|
// SSH: the configured host aliases and the hosts this conversation reached, most recent first.
|
|
@@ -1310,34 +1329,29 @@ ${ON}[data-dpt-busy] [data-dpt-send]::after{content:"";position:absolute;inset:-
|
|
|
1310
1329
|
const deep = preset === 'deep-ptc';
|
|
1311
1330
|
const rows = deep ? subagentRows(sessions, sessionId, now) : [];
|
|
1312
1331
|
const running = rows.filter(row => row.state === 'running').length;
|
|
1313
|
-
const completed = rows.filter(row => row.state === 'completed').length;
|
|
1314
1332
|
React.useEffect(() => {
|
|
1315
1333
|
if (running === 0) return undefined;
|
|
1316
1334
|
const timer = setInterval(() => setNow(Date.now()), 1000);
|
|
1317
1335
|
return () => clearInterval(timer);
|
|
1318
1336
|
}, [running > 0]);
|
|
1319
|
-
const summary = [running ? tf(t, 'agentsRunning', { count: running }) : null, completed ? tf(t, 'agentsCompleted', { count: completed }) : null,
|
|
1320
|
-
rows.length - running - completed > 0 ? tf(t, 'agentsIdle', { count: rows.length - running - completed }) : null].filter(Boolean).join(' · ');
|
|
1321
1337
|
const stateText = row => row.state === 'running' ? t('agentRunning') : row.state === 'completed' ? t('agentCompleted') : row.state === 'external' ? t('agentExternal') : t('agentIdle');
|
|
1322
1338
|
return h('div', { className: 'dpt-panel', 'data-inline': inline ? '' : undefined, 'aria-label': t('sideTitle') },
|
|
1323
1339
|
h('div', { className: 'dpt-side-body' },
|
|
1324
1340
|
form ? h(EnvironmentSection, { form, t }) : null,
|
|
1325
1341
|
!deep ? h('section', { className: 'dpt-side-section' }, h('p', { className: 'dpt-side-note' }, t('sideOtherMode'))) : null,
|
|
1326
1342
|
deep && rows.length ? h('section', { className: 'dpt-side-section dpt-side-agents', 'aria-label': t('agentsTitle') },
|
|
1327
|
-
h('div', { className: 'dpt-side-label' }, h('span', null, t('agentsTitle'))
|
|
1328
|
-
h('ol', { className: 'dpt-agents-list' }, ...rows.map(row =>
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
return h('li', { key: row.id }, h('button', { type: 'button', className: 'dpt-agent', 'data-state': row.state, style: { '--dpt-depth': row.depth },
|
|
1343
|
+
h('div', { className: 'dpt-side-label' }, h('span', null, t('agentsTitle'))),
|
|
1344
|
+
h('ol', { className: 'dpt-agents-list' }, ...rows.map(row =>
|
|
1345
|
+
h('li', { key: row.id }, h('button', { type: 'button', className: 'dpt-agent', 'data-state': row.state,
|
|
1346
|
+
'aria-label': `${row.label} · ${stateText(row)}`, style: { '--dpt-depth': row.depth },
|
|
1332
1347
|
disabled: row.state === 'external', title: t('agentOpen'), onClick: () => openSubagent(row) },
|
|
1333
1348
|
h('span', { className: 'dpt-agent-dot', 'aria-hidden': 'true' }),
|
|
1334
|
-
h('span', { className: 'dpt-agent-
|
|
1335
|
-
|
|
1336
|
-
}))) : null,
|
|
1349
|
+
h('span', { className: 'dpt-agent-name', title: row.label }, row.label),
|
|
1350
|
+
row.duration !== undefined ? h('span', { className: 'dpt-agent-duration' }, formatDuration(row.duration, t)) : null))))) : null,
|
|
1337
1351
|
deep ? (typeof useJobs === 'function' && typeof watchJobs === 'function'
|
|
1338
1352
|
? h(LiveBackgroundJobs, { key: `jobs:${sessionId}`, sessionId, useJobs, watchJobs, t })
|
|
1339
1353
|
: h(BackgroundJobs, { key: `jobs:${sessionId}`, jobs: sessions?.jobsBySession?.[sessionId], t })) : null,
|
|
1340
|
-
deep ? h(OutputsSection, { outputs: activity?.outputs, t }) : null,
|
|
1354
|
+
deep ? h(OutputsSection, { sessionId, outputs: activity?.outputs, t }) : null,
|
|
1341
1355
|
h(SshSection, { form, ssh: deep ? activity?.ssh : undefined, t }),
|
|
1342
1356
|
deep && typeof reset === 'function' ? h(ToolStateControls, { sessionId, useProjection, reset, t }) : null,
|
|
1343
1357
|
h(VisualEffectsSection, { t })));
|
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. Use
|
|
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.",
|
|
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
|
|
4
|
+
"description": "基于官方 PTC 的深度模式:可插话的后台任务、可选执行环境和对话侧边面板,输出文件可点击打开,子代理行简洁展示名字与用时。按需使用绘图、设计和研究工具,提供通用 SSH 与 DSH Go 连接辅助,界面随 DSH 设置切换中英文。",
|
|
5
5
|
"detail": "README.zh.md"
|
|
6
6
|
}
|
|
7
7
|
}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-deep-ptc-mode",
|
|
3
|
-
"version": "1.9.
|
|
4
|
-
"description": "Deep PTC for DeepSeek Harness: interruptible jobs, selectable shells, a
|
|
3
|
+
"version": "1.9.3",
|
|
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": [
|
|
7
7
|
"dsh-plugin",
|