dsh-better-sidebar 0.12.1 → 0.12.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.
Files changed (61) hide show
  1. package/README.md +60 -110
  2. package/README_EN.md +60 -110
  3. package/lib/client-editor.js +1388 -281
  4. package/lib/client-registry.js +699 -418
  5. package/lib/client-terminal.js +1176 -759
  6. package/lib/client.js +699 -418
  7. package/lib/index.js +350 -37
  8. package/lib/types/agent-pty.d.ts +8 -3
  9. package/lib/types/client/TerminalView.d.ts +18 -2
  10. package/lib/types/client/api.d.ts +30 -3
  11. package/lib/types/client/link-intercept.d.ts +15 -8
  12. package/lib/types/client/locales.d.ts +15 -0
  13. package/lib/types/client/paths.d.ts +16 -0
  14. package/lib/types/client/prefs.d.ts +2 -2
  15. package/lib/types/client/produced-files.d.ts +5 -9
  16. package/lib/types/client/service.d.ts +32 -2
  17. package/lib/types/client/settings-nav-icon.d.ts +19 -0
  18. package/lib/types/client/theme.d.ts +17 -0
  19. package/lib/types/config.d.ts +10 -1
  20. package/lib/types/fs-tree.d.ts +11 -1
  21. package/lib/types/html-route.d.ts +15 -4
  22. package/lib/types/prefs-shared.d.ts +44 -5
  23. package/lib/types/pty-deps.d.ts +78 -0
  24. package/lib/types/pty-manager.d.ts +49 -5
  25. package/lib/types/wire.d.ts +1 -1
  26. package/package.json +16 -16
  27. package/scripts/install.ps1 +87 -49
  28. package/scripts/install.sh +85 -44
  29. package/src/agent-pty.ts +10 -5
  30. package/src/client/DiffTab.tsx +1 -1
  31. package/src/client/ExplorerView.tsx +6 -4
  32. package/src/client/GitView.tsx +1 -1
  33. package/src/client/SideCardSection.module.css +41 -15
  34. package/src/client/SideCardSection.tsx +69 -0
  35. package/src/client/Sidebar.tsx +78 -49
  36. package/src/client/TerminalView.tsx +88 -7
  37. package/src/client/TextEditor.tsx +2 -2
  38. package/src/client/api.ts +32 -3
  39. package/src/client/builtins/tabs.tsx +12 -3
  40. package/src/client/index.tsx +37 -7
  41. package/src/client/lang.ts +8 -0
  42. package/src/client/layout.css +19 -0
  43. package/src/client/link-intercept.ts +17 -10
  44. package/src/client/locales.ts +32 -2
  45. package/src/client/paths.ts +19 -0
  46. package/src/client/plugins-tabs.ts +16 -0
  47. package/src/client/plugins-viewers.ts +7 -0
  48. package/src/client/prefs.ts +14 -1
  49. package/src/client/produced-files.ts +7 -3
  50. package/src/client/service.ts +46 -1
  51. package/src/client/settings-nav-icon.ts +45 -0
  52. package/src/client/sidebar.module.css +136 -13
  53. package/src/client/theme.ts +66 -0
  54. package/src/config.ts +21 -0
  55. package/src/fs-tree.ts +51 -8
  56. package/src/html-route.ts +43 -16
  57. package/src/index.ts +64 -16
  58. package/src/prefs-shared.ts +52 -5
  59. package/src/pty-deps.ts +240 -0
  60. package/src/pty-manager.ts +113 -8
  61. package/src/wire.ts +1 -0
package/README.md CHANGED
@@ -1,136 +1,84 @@
1
1
  # dsh-better-sidebar
2
2
 
3
- <!-- 头部介绍区(HTML 排版) -->
3
+ <!-- Hero -->
4
4
  <div align="center">
5
- <b style="font-size: 1.15em;">一个插件,一套完整工作台</b><br /><br />
6
- <code>文件管理</code> <code>编辑预览</code> <code>内嵌浏览器</code> <code>真实终端</code> <code>Git 面板</code> <code>后台任务页</code><br /><br />
7
- <b>右侧栏 + 底部面板双工作台</b>,一个插件全部搞定。<br />
8
- <small>支持 Tab 窗口随意拖拽,支持三方拓展注册新 Tab 页面和文件预览</small>
5
+ <b style="font-size: 1.15em;">一个服务化的侧边栏框架,一套开箱即用的完整工作台</b><br /><br />
6
+ <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a>
7
+ <a href="https://dshfind.com/zh/plugins/omdsh-dev/DSH-better-sidebar?ref=badge"><img alt="dshfind" src="https://dshfind.com/api/badge/omdsh-dev/DSH-better-sidebar?lang=zh" /></a><br /><br />
8
+ <img alt="文件管理" src="https://img.shields.io/badge/-文件管理-4d6bfe" /> <img alt="编辑预览" src="https://img.shields.io/badge/-编辑预览-4d6bfe" /> <img alt="内嵌浏览器" src="https://img.shields.io/badge/-内嵌浏览器-4d6bfe" /> <img alt="真实终端" src="https://img.shields.io/badge/-真实终端-4d6bfe" /> <img alt="Git 面板" src="https://img.shields.io/badge/-Git%20面板-4d6bfe" /> <img alt="后台任务" src="https://img.shields.io/badge/-后台任务-4d6bfe" /> <img alt="插件接入" src="https://img.shields.io/badge/-插件接入-4d6bfe" /><br /><br />
9
+ <b>右侧栏 + 底部面板双工作台</b>,并把 <code>ctx.betterSidebar</code> 服务开放给所有插件——<br />
10
+ 通过 <code>registerTab</code> / <code>registerFileViewer</code> 注册新的侧边栏页面与文件预览器。
9
11
  </div>
10
12
 
11
13
  <div align="center">
12
14
  🌏 <a href="./README.md"><b>中文</b></a> · <a href="./README_EN.md">English</a>
13
15
  </div>
14
16
 
15
- https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
16
-
17
- <img width="2630" height="1794" alt="6c4293e1bec2e935031bf0e986d6ec65" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
18
-
19
- ## 🆕 最近更新
20
-
21
- <small>v0.12.1</small>
22
-
23
- | 功能 | 说明 | 截图 |
24
- |---|---|---|
25
- | 🔌 服务化基座 | 完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`) | |
26
- | ➕ 添加插件 | 设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件 | |
27
- | 🖱️ 标签页滚轮 | 标签页栏支持鼠标滚轮横向滚动 | |
28
- | 🐛 修复 | 远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径 | |
17
+ <div align="center">
18
+ <video src="https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86" muted autoplay loop playsinline controls width="100%"></video>
19
+ <img alt="dsh-better-sidebar 工作台截图" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
20
+ </div>
29
21
 
30
22
  ## ✨ 功能一览
31
23
 
32
- - **🗂️ 资源管理器**:懒加载目录树(根 = 会话 cwd),点击打开、`@文件` 引用、右键复制路径
33
- - **📝 编辑与预览**:CodeMirror 6 编辑(Ctrl/Cmd+S 原子保存,切 Tab 不丢草稿);图片 / Markdown / HTML / PDF / Word / Excel / PPT 内联预览(HTML 走沙箱 iframe)
34
- - **⚡ 客户端懒加载**:启动只拉 ~325KB 核心,终端 / 编辑器等重依赖用到才按需拉取(详见 `docs/plans/2026-08-12-lazy-chunks-design.md`)
35
- - **🌐 浏览器**:多开内嵌网页 tab,后退/前进/刷新;内容运行在沙箱 iframe(无法访问界面数据与本地文件,拒绝本机地址),可临时解锁(红色警示);被站点拒绝嵌入时显示原因;外链默认在侧边栏打开
36
- - **💻 终端**:xterm.js + node-pty 真实 shell、断线重连回放;可选为模型注入 `terminal_*` 工具;支持自定义字体(字体族 + 9–32px 字号,实时生效)
37
- - **🌿 Git 面板**:真 diff + VSCode diff tab、历史、右键暂存/提交/还原等
38
- - **🧩 后台任务页**:主会话 agent 拓扑、点击直达执行记录;同页显示后台任务(类型徽标 + 退出码、实时输出 peek、可强制终止)
39
- - **🪟 底部面板**:第二个独立工作台,只挤占中间输出区;首次展开自动开终端(可关)
40
- - **📱 移动端**:窄屏(<768px)自动合并为全宽抽屉,底部面板标签页并入右侧栏;点文件/外链自动展开
41
- - **🔧 分栏工作台**:拖 Tab 拆分/合并(可跨面板)、分隔线调比例;右上角按钮一键折叠/展开面板
42
- - **🔁 会话隔离**:布局 / Tab / 面板状态按会话持久化,陈旧状态自动净化;「产出文件」在侧边栏打开
43
- - **⚙️ 声明式设置**:设置页「侧边卡片」按注册表渲染开关网格,逐项独立开/关;二级设置(自动展开、终端工具、沙箱等)经齿轮弹窗编辑
44
- - **🔌 服务化(基座)**:暴露 `ctx.betterSidebar`,其他插件可注册 tab 与文件预览器(内置 7 tab + 9 viewer 同走一服务);v0.12.1 起支持角标/生命周期回调/状态订阅/定向打开/插件自有设置(见 [AGENTS.md](./AGENTS.md) 与 [外部插件接入指南](./docs/external-plugin-guide.md))
45
- - **➕ 添加插件**:设置页「侧边卡片」两个网格(侧边栏内容 / 文件预览)末尾的虚线卡片分别打开 Tab / 预览插件弹窗:声明扩展点、「在 GitHub 上浏览更多插件」按钮、推荐插件目录(「跳转」直达仓库、「复制」安装命令到剪贴板);弹窗不打开终端、无失败路径,不阻塞启动与侧边栏
46
- - **🌏 多语言**:界面文案跟随 DSH 语言(zh/en)实时切换,无需刷新
24
+ - **🗂️ 文件工作台**:资源管理器(懒加载目录树;软链接按目标类型展示——目录软链接可展开、失效链接标红)+ CodeMirror 编辑器;图片 / Markdown / HTML / PDF / Office 内联预览
25
+ - **🌐 内嵌浏览器**:多开网页 tab,后退 / 前进 / 刷新;内容运行在沙箱 iframe;外链默认按协议分流——HTTP 在侧边栏打开、HTTPS 走系统浏览器(设置页可分别调整)
26
+ - **💻 真实终端**:xterm.js + node-pty 真实 shell,断线重连回放;可选为模型注入 `terminal_*` 工具
27
+ - **🌿 Git 面板**:真 diff + VSCode 式 diff tab、历史、右键暂存 / 提交 / 还原
28
+ - **🧩 后台任务页**:subagent 拓扑 + 后台任务(退出码 / 实时输出 / 强制终止)
29
+ - **🪟 双工作台**:右侧栏 + 底部面板;拖 Tab 拆分 / 合并分栏(可跨面板),移动端自动合并全宽抽屉
30
+ - **🔁 会话隔离**:布局 / Tab / 面板按会话持久化,陈旧状态自动净化
31
+ - **⚙️ 声明式设置**:设置页「侧边卡片」逐项独立开关,二级设置经齿轮弹窗
32
+ - **⚡ 按需加载**:启动只拉 ~325KB 核心,终端 / 编辑器等重依赖用到才按需拉取([设计文档](docs/plans/2026-08-12-lazy-chunks-design.md))
33
+ - **🌏 多语言**:界面文案跟随 DSH 语言(zh / en)实时切换
47
34
 
48
- ## 🚀 安装
35
+ > 🔌 **核心理念**:服务优先——内置的 7 tab + 6 viewer 与第三方插件通过同一套 `ctx.betterSidebar` API 注册,能力完全对等;官方不再内置、可由生态提供的功能,交由生态插件实现。接入文档见下方「🔌 服务化」与 [外部插件接入指南](./docs/external-plugin-guide.md)。
49
36
 
50
- **前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
51
-
52
- **macOS / Linux**(Windows 装了 Git Bash 或 WSL 也可):
37
+ ## 🆕 最近更新
53
38
 
54
- ```sh
55
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
56
- ```
39
+ <div align="center">
40
+ <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="45%" alt="服务化基座截图" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a>
41
+ <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="45%" alt="添加插件截图" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a>
42
+ </div>
57
43
 
58
- **Windows(PowerShell 5.1+ / pwsh)**:
44
+ ### v0.12.3
59
45
 
60
- ```powershell
61
- irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
62
- ```
46
+ - 🐛 **node-pty 加载失败不再拖垮 server**([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)):宿主半改为懒加载 node-pty,缺失时插件照常挂载,终端以修复提示横幅(可复制命令 + 重试按钮)呈现,agent 终端工具自动跳过
47
+ - 🚀 **发布流水线**:接入 GitHub Release 自动发版 npm(Trusted Publishing,产物带 provenance),本版起打 tag 即自动发布
63
48
 
64
- 装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
49
+ ### v0.12.2
65
50
 
66
- <details>
67
- <summary><b>指定版本 / 装完自动重启(可选)</b></summary>
51
+ - 📐 **位置兼容模式**:设置页新增开关:为 Windows 右上角原生标题栏预留顶部空间,侧边栏按钮与内容整体下移(默认关闭);下移距离可在齿轮弹窗中自定义(0–120px)
52
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)、外链点击目标认领(`urlTarget`)
53
+ - ➕ **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
54
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
55
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
68
56
 
69
- ```sh
70
- # macOS / Linux
71
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.1 --restart
57
+ ### v0.12.1
72
58
 
73
- # Windows PowerShell
74
- & ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.1 -Restart
75
- ```
59
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)
60
+ - **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
61
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
62
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
76
63
 
77
- 不确定的话,可先加 `--dry-run`(PowerShell `-DryRun`)预览步骤再执行。
64
+ > 📝 说明:0.12.0 正式版因 npm 判定版本已发布无法复用,正式发布改用 0.12.1,两者内容一致。
78
65
 
79
- </details>
66
+ ### v0.12.0
80
67
 
81
- <details>
82
- <summary><b>手动安装(逐步命令,想看清每一步)</b></summary>
68
+ - 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅、tab 角标、生命周期回调、定向打开、`meta` 跨刷新持久化、插件自有设置
69
+ - ➕ **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
70
+ - 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
71
+ - 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
83
72
 
84
- 与一键脚本等价。**第 步可重复执行;①② 只需做一次。**
73
+ ## 🚀 安装
85
74
 
86
- **macOS / Linux(bash)**:
75
+ **前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
87
76
 
88
77
  ```sh
89
- cd ~/.dsh/profiles/web
90
-
91
- # ① 放行 node-pty / protobufjs 的构建脚本(pnpm 11 默认拦截;pnpm 10 可跳过)
92
- pnpm approve-builds --all
93
-
94
- # ② 放行「发布不足 24h」的新版本(装老版本可跳过;若已有该键,把下面那行并入其下即可)
95
- cat >> pnpm-workspace.yaml <<'EOF'
96
- minimumReleaseAgeExclude:
97
- - dsh-better-sidebar
98
- EOF
99
-
100
- # ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.1)
101
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
102
- ```
103
-
104
- **Windows(PowerShell)**:
105
-
106
- ```powershell
107
- cd ~\.dsh\profiles\web
108
-
109
- # ① 放行构建脚本
110
- pnpm approve-builds --all
111
-
112
- # ② 放行新版本(一次性;若已有该键,把 - dsh-better-sidebar 并入其下即可)
113
- Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
114
-
115
- # ③ 安装并自动挂载
116
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
78
+ dsh plugin --profile web add dsh-better-sidebar
117
79
  ```
118
80
 
119
- </details>
120
-
121
- <details>
122
- <summary><b>脚本内部做了什么(技术细节)</b></summary>
123
-
124
- 一键脚本自动完成 4 件事(全部幂等,可安全重复执行):
125
-
126
- 1. 预写 `allowBuilds`(node-pty / protobufjs),规避 pnpm 11 的构建脚本拦截;
127
- 2. 预写 `minimumReleaseAgeExclude`,放行「发布不足 24 小时」的新版本;
128
- 3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
129
- 4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
130
-
131
- `curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.12.1` 发布,通过 `dsh.bundle.patch`(随包的 `cordis.patch.yml`)由官方 CLI 自动挂载,**不修改 DSH 源码**。
132
-
133
- </details>
81
+ 装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
134
82
 
135
83
  <details>
136
84
  <summary><b>更新</b></summary>
@@ -139,7 +87,7 @@ npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sideba
139
87
  dsh plugin --profile web add dsh-better-sidebar
140
88
  ```
141
89
 
142
- 或重跑一次一键脚本;也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
90
+ 也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
143
91
 
144
92
  </details>
145
93
 
@@ -148,12 +96,13 @@ dsh plugin --profile web add dsh-better-sidebar
148
96
 
149
97
  | 现象 | 原因与解决 |
150
98
  |---|---|
151
- | 报 `Ignored build scripts` | pnpm 11 拦截构建脚本。跑 `pnpm approve-builds --all`(一键脚本已自动处理)。 |
152
- | 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`);一键脚本已自动处理。 |
99
+ | 报 `Ignored build scripts` | pnpm 11 拦截构建脚本。在 profile 目录(`~/.dsh/profiles/web`)跑 `pnpm approve-builds --all`。 |
100
+ | 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`)。 |
153
101
  | 报「找不到 profile 目录」 | 先跑一次 `dsh web`,让它初始化 `~/.dsh/profiles/web`。 |
154
- | 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`(一键脚本会自动清)。 |
102
+ | 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`。 |
155
103
  | Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
156
- | Windows 没有 bash / curl | 直接用 PowerShell 一键命令;或安装 Git Bash / WSL 再跑 bash 命令。 |
104
+ | 终端提示「node-pty 加载失败」 | `node-pty` 安装缺失/损坏(如 pnpm 拦截了构建脚本)。终端横幅会给出修复命令:复制到 DSH 所在环境的终端/cmd 执行(在 `~/.dsh/profiles/web` `pnpm approve-builds --all && pnpm rebuild node-pty`),完成后重启 DSH 并点重试。插件与 DSH 核心使用同一 `node-pty@^1.1.0`,修复后两者同步恢复。 |
105
+ | 提示 `dsh: command not found` | 先安装 DSH;或直接用 `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar`。 |
157
106
 
158
107
  </details>
159
108
 
@@ -174,7 +123,7 @@ dsh plugin --profile web add dsh-better-sidebar
174
123
  5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
175
124
  ```
176
125
 
177
- 更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.1"` 再 `pnpm install`。
126
+ 更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.3"` 再 `pnpm install`。
178
127
 
179
128
  </details>
180
129
 
@@ -208,7 +157,7 @@ dsh registry enable dsh-external/dsh-better-sidebar
208
157
 
209
158
  ## 🔌 服务化:注册 tab 与文件预览器
210
159
 
211
- 从 v0.4.0 起暴露 `ctx.betterSidebar` 服务,其他插件可注册侧边栏页面与文件预览器(内置 7 tab + 9 viewer 也走同一服务,吃自己的狗粮):
160
+ 从 v0.4.0 起暴露 `ctx.betterSidebar` 服务,其他插件可注册侧边栏页面与文件预览器(内置 7 tab + 6 viewer 亦通过同一服务注册):
212
161
 
213
162
  ```ts
214
163
  import type {} from 'dsh-better-sidebar' // 触发 ctx.betterSidebar 类型合并
@@ -268,3 +217,4 @@ Windows / Linux / macOS 三平台适配(macOS 日常验证;其余经单元
268
217
  - [dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui):DeepSeek Harness 交互式终端 UI 插件(渲染核心由自研 harness agent Tianshu-Tui 演进而来),在官方基础上增加 TDD 与证据门等工作流
269
218
  - [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI):Claude Code 风格全屏交互终端插件——像素鲸鱼顶栏、实时工作状态行、思考流式展开、双击 Esc 回滚、上下文进度条 + TPS 仪表,npm 一键安装
270
219
  - [dshfind 插件超市](https://dshfind.com/zh/plugins):三方插件市场——GitHub topic `dsh-plugin` 下的公开仓库清单,每日同步 star、贡献者与增长数据
220
+ - [DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop):为 DeepSeek Harness 生态打造的现代化桌面端——无需配置 Node.js 或执行命令即可启动和管理本地 Harness 服务;[官网](https://www.dshdesktop.cn)
package/README_EN.md CHANGED
@@ -1,136 +1,84 @@
1
1
  # dsh-better-sidebar
2
2
 
3
- <!-- Hero (HTML layout) -->
3
+ <!-- Hero -->
4
4
  <div align="center">
5
- <b style="font-size: 1.15em;">One plugin, one complete workbench</b><br /><br />
6
- <code>File management</code> <code>Edit &amp; preview</code> <code>Embedded browser</code> <code>Real terminal</code> <code>Git panel</code> <code>Background tasks</code><br /><br />
7
- <b>Dual workbench: right sidebar + bottom panel</b>, all in one plugin.<br />
8
- <small>Tabs are freely draggable; third-party plugins can register new tab pages and file viewers</small>
5
+ <b style="font-size: 1.15em;">A service-oriented sidebar framework, and a complete workbench out of the box</b><br /><br />
6
+ <a href="https://opensource.org/licenses/MIT"><img alt="License: MIT" src="https://img.shields.io/badge/License-MIT-yellow.svg" /></a>
7
+ <a href="https://dshfind.com/en/plugins/omdsh-dev/DSH-better-sidebar?ref=badge"><img alt="dshfind" src="https://dshfind.com/api/badge/omdsh-dev/DSH-better-sidebar?lang=en" /></a><br /><br />
8
+ <img alt="File management" src="https://img.shields.io/badge/-File%20management-4d6bfe" /> <img alt="Edit &amp; preview" src="https://img.shields.io/badge/-Edit%20%26%20preview-4d6bfe" /> <img alt="Embedded browser" src="https://img.shields.io/badge/-Embedded%20browser-4d6bfe" /> <img alt="Real terminal" src="https://img.shields.io/badge/-Real%20terminal-4d6bfe" /> <img alt="Git panel" src="https://img.shields.io/badge/-Git%20panel-4d6bfe" /> <img alt="Background tasks" src="https://img.shields.io/badge/-Background%20tasks-4d6bfe" /> <img alt="Plugin integration" src="https://img.shields.io/badge/-Plugin%20integration-4d6bfe" /><br /><br />
9
+ <b>A dual workbench (right sidebar + bottom panel)</b> that opens its <code>ctx.betterSidebar</code> service to every plugin —<br />
10
+ register new sidebar pages and file viewers via <code>registerTab</code> / <code>registerFileViewer</code>.
9
11
  </div>
10
12
 
11
13
  <div align="center">
12
14
  🌏 <a href="./README.md">中文</a> · <a href="./README_EN.md"><b>English</b></a>
13
15
  </div>
14
16
 
15
- https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
16
-
17
- <img width="2630" height="1794" alt="6c4293e1bec2e935031bf0e986d6ec65" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
18
-
19
- ## 🆕 Recent Updates
20
-
21
- <small>v0.12.1</small>
22
-
23
- | Feature | Description | Screenshot |
24
- |---|---|---|
25
- | 🔌 Service API base | Complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`) | |
26
- | ➕ Add Plugins | Recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin | |
27
- | 🖱️ Tab-bar scroll | Mouse-wheel horizontal scrolling on the tab bar | |
28
- | 🐛 Fixes | Remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path | |
17
+ <div align="center">
18
+ <video src="https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86" muted autoplay loop playsinline controls width="100%"></video>
19
+ <img alt="dsh-better-sidebar workbench" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
20
+ </div>
29
21
 
30
22
  ## ✨ Features
31
23
 
32
- - **🗂️ File Explorer**: lazy-loading directory tree (root = session cwd), click to open, `@file` reference, right-click to copy path
33
- - **📝 Edit & Preview**: CodeMirror 6 editing (Ctrl/Cmd+S atomic save, drafts survive tab switches); inline preview for images / Markdown / HTML / PDF / Word / Excel / PPT (HTML in a sandboxed iframe)
34
- - **⚡ Client-side Lazy Loading**: only ~325KB core at startup; heavy deps (terminal / editor) load on demand (see `docs/plans/2026-08-12-lazy-chunks-design.md`)
35
- - **🌐 Browser**: multiple embedded web tabs, back/forward/refresh; pages run in a sandboxed iframe (no access to UI data or local files, rejects local addresses), temporarily unlockable (red warning); sites refusing embedding show a reason panel; external links open in the sidebar by default
36
- - **💻 Terminal**: xterm.js + node-pty real shell, reconnect with transcript replay; optionally injects `terminal_*` tools for the model; custom font (family + 9–32px size, applied live)
37
- - **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage/commit/revert etc.
38
- - **🧩 Background Tasks**: main-session agent topology with click-through to execution records; background tasks on the same page (type badges + exit codes, live-output peek, force-kill)
39
- - **🪟 Bottom Panel**: an independent second workbench that only squeezes the center output area; auto-opens a terminal on first expand (toggleable)
40
- - **📱 Mobile**: narrow viewports (<768px) merge into a full-width drawer with the bottom panel's tabs folded into the sidebar; files/links auto-expand the panel
41
- - **🔧 Split-pane Workbench**: drag tabs to split/merge panes (cross-panel supported), divider to adjust ratios; one-click collapse/expand both panels from the top-right buttons
42
- - **🔁 Session Isolation**: layout / tabs / panel states persisted per session, stale state auto-purged; "produced files" open in the sidebar
43
- - **⚙️ Declarative Settings**: the "Side Cards" settings section renders a registry-driven toggle grid, each item independently switchable; secondary settings (auto-expand, terminal tools, sandbox, etc.) edited in a native dialog via the gear button
44
- - **🔌 Service API**: exposes `ctx.betterSidebar` — other plugins can register tabs and file viewers (the 7 built-in tabs + 9 viewers share the same service, see [AGENTS.md](./AGENTS.md) and the [external plugin guide](./docs/external-plugin-guide.md))
45
- - **➕ Add Plugins**: dashed cards at the end of both settings grids ("Sidebar content" / "File viewers") open tab / previewer plugin modals: the extension point declaration, a "Browse more plugins on GitHub" BUTTON, and the recommended plugin catalog ("Open" jumps to the repo, "Copy" puts the install command on the clipboard); no terminal is opened, nothing can fail — never blocking startup or the sidebar
46
- - **🌏 i18n**: UI text follows DSH's language setting (zh/en) with live switching, no refresh needed
24
+ - **🗂️ File Workbench**: file explorer (lazy-loading tree; symlinks show their target kind — directory links expand, dangling links flagged) + CodeMirror editor; inline preview for images / Markdown / HTML / PDF / Office
25
+ - **🌐 Embedded Browser**: multiple web tabs with back / forward / refresh; content runs in a sandboxed iframe; external links are routed by protocol by default HTTP opens in the sidebar, HTTPS goes to the system browser (both adjustable in settings)
26
+ - **💻 Real Terminal**: xterm.js + node-pty real shell, reconnect with transcript replay; optionally injects `terminal_*` tools for the model
27
+ - **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage / commit / revert
28
+ - **🧩 Background Tasks**: agent topology + background tasks (exit codes / live output / force-kill)
29
+ - **🪟 Dual Workbench**: right sidebar + bottom panel; drag tabs to split / merge panes (cross-panel), mobile auto-merges into a full-width drawer
30
+ - **🔁 Session Isolation**: layout / tabs / panels persisted per session, stale state auto-purged
31
+ - **⚙️ Declarative Settings**: per-item toggles in the "Side Cards" settings section, secondary settings via the gear dialog
32
+ - **⚡ On-demand Loading**: only ~325KB core at startup; heavy deps (terminal / editor) load on demand ([design](docs/plans/2026-08-12-lazy-chunks-design.md))
33
+ - **🌏 i18n**: UI text follows DSH's language (zh / en) with live switching
47
34
 
48
- ## 🚀 Installation
35
+ > 🔌 **Core principle**: service-first — the 7 built-in tabs + 6 viewers register through the same `ctx.betterSidebar` API as third-party plugins, with fully equal capabilities; anything the ecosystem can provide better is delegated to ecosystem plugins. See the "🔌 Service" section below and the [external plugin guide](./docs/external-plugin-guide.md).
49
36
 
50
- **Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
51
-
52
- **macOS / Linux** (also works in Git Bash / WSL on Windows):
37
+ ## 🆕 Recent Updates
53
38
 
54
- ```sh
55
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
56
- ```
39
+ <div align="center">
40
+ <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="45%" alt="Service API base screenshot" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a>
41
+ <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="45%" alt="Add Plugins screenshot" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a>
42
+ </div>
57
43
 
58
- **Windows (PowerShell 5.1+ / pwsh)**:
44
+ ### v0.12.3
59
45
 
60
- ```powershell
61
- irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
62
- ```
46
+ - 🐛 **node-pty load failure no longer crashes the server** ([#140](https://github.com/omdsh-dev/DSH-better-sidebar/issues/140)): the host half now lazy-loads node-pty — when it is missing the plugin still mounts, the terminal shows a repair banner (copyable command + Retry button), and agent terminal tools are skipped
47
+ - 🚀 **Release pipeline**: npm publishing is now wired to GitHub Releases (Trusted Publishing, provenance-attached tarballs); tagging a release publishes automatically from this version on
63
48
 
64
- Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot-reloads client changes; only host-half updates need a restart).
49
+ ### v0.12.2
65
50
 
66
- <details>
67
- <summary><b>Pin a version / auto-restart (optional)</b></summary>
51
+ - 📐 **Position compat mode**: new "Position compatibility mode" setting: reserves top space for the native Windows title bar (top-right) so the sidebar buttons and content sit below it (off by default); the shift distance is customizable in the gear popup (0–120px)
52
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`), external-link claim (`urlTarget`)
53
+ - ➕ **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
54
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
55
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
68
56
 
69
- ```sh
70
- # macOS / Linux
71
- curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.1 --restart
57
+ ### v0.12.1
72
58
 
73
- # Windows PowerShell
74
- & ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.1 -Restart
75
- ```
59
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription (`getSnapshot`/`subscribeState`), tab `badge`, `onOpen`/`onActivate`/`onClose` lifecycle callbacks, `updateTab`/`activateTab`/`openFile`, targeted open, `meta` persisted across reloads, plugin-owned settings (`pluginToggles`/`render`)
60
+ - **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
61
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
62
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
76
63
 
77
- Not sure? Add `--dry-run` (`-DryRun` in PowerShell) to preview before running.
64
+ > 📝 Note: the 0.12.0 final could not be reused (npm reported the version as already published), so the public release became 0.12.1 — both carry identical content.
78
65
 
79
- </details>
66
+ ### v0.12.0
80
67
 
81
- <details>
82
- <summary><b>Manual install (step by step)</b></summary>
68
+ - 🔌 **Service API base**: complete type exports + `version`/`features` capability detection, state subscription, tab badges, lifecycle callbacks, targeted open, `meta` persisted across reloads, plugin-owned settings
69
+ - ➕ **Add Plugins**: recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin
70
+ - 🖱️ **Tab-bar scroll**: mouse-wheel horizontal scrolling on the tab bar
71
+ - 🐛 **Fixes**: remote access 403 (trust fence now uses `trustedHosts`), sidebar crash [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31), Windows HTML-preview drive-path
83
72
 
84
- Equivalent to the one-click script. **Step ③ is repeatable; ①② only need to run once.**
73
+ ## 🚀 Installation
85
74
 
86
- **macOS / Linux (bash)**:
75
+ **Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
87
76
 
88
77
  ```sh
89
- cd ~/.dsh/profiles/web
90
-
91
- # ① Allow node-pty / protobufjs build scripts (pnpm 11 blocks them by default; skip on pnpm 10)
92
- pnpm approve-builds --all
93
-
94
- # ② Allow versions published less than 24h ago (skip for older releases; if the key already exists, merge the line under it instead)
95
- cat >> pnpm-workspace.yaml <<'EOF'
96
- minimumReleaseAgeExclude:
97
- - dsh-better-sidebar
98
- EOF
99
-
100
- # ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.1)
101
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
102
- ```
103
-
104
- **Windows (PowerShell)**:
105
-
106
- ```powershell
107
- cd ~\.dsh\profiles\web
108
-
109
- # ① Allow build scripts
110
- pnpm approve-builds --all
111
-
112
- # ② Allow fresh releases (once; if the key already exists, merge - dsh-better-sidebar under it instead)
113
- Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
114
-
115
- # ③ Install and auto-mount
116
- npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
78
+ dsh plugin --profile web add dsh-better-sidebar
117
79
  ```
118
80
 
119
- </details>
120
-
121
- <details>
122
- <summary><b>What the script does (technical details)</b></summary>
123
-
124
- The one-click script does four things, all idempotent (safe to re-run):
125
-
126
- 1. Pre-writes `allowBuilds` (node-pty / protobufjs) to dodge pnpm 11's build-script block;
127
- 2. Pre-writes `minimumReleaseAgeExclude` to allow versions younger than 24 hours;
128
- 3. Runs `dsh plugin --profile web add dsh-better-sidebar`: registers the dependency → detects `dsh.bundle.patch` → auto-appends the plugin to `dsh.profile.bundles`;
129
- 4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
130
-
131
- `curl | bash` / `irm | iex` executes remote code — the scripts are open source in the repo (`scripts/install.sh` / `scripts/install.ps1`); download and review them first if you prefer. The plugin ships as npm package `dsh-better-sidebar@0.12.1` and mounts via `dsh.bundle.patch` (the shipped `cordis.patch.yml`), so the DSH source is never modified.
132
-
133
- </details>
81
+ Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot-reloads client changes; only host-half updates need a restart).
134
82
 
135
83
  <details>
136
84
  <summary><b>Updating</b></summary>
@@ -139,7 +87,7 @@ The one-click script does four things, all idempotent (safe to re-run):
139
87
  dsh plugin --profile web add dsh-better-sidebar
140
88
  ```
141
89
 
142
- or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.1"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
90
+ or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.3"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
143
91
 
144
92
  </details>
145
93
 
@@ -148,12 +96,13 @@ or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/pack
148
96
 
149
97
  | Symptom | Cause & fix |
150
98
  |---|---|
151
- | `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all` (the one-click script handles it). |
152
- | `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`); the one-click script handles it. |
99
+ | `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all` in the profile directory (`~/.dsh/profiles/web`). |
100
+ | `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`). |
153
101
  | "profile directory not found" | Run `dsh web` once so it initializes `~/.dsh/profiles/web`. |
154
- | Two sidebars on the page | Double-mount: `~/.dsh/profiles/web/cordis.patch.yml` still has the old hand-written `- insert: ... better-sidebar ...` line — delete it (the one-click script cleans it). |
102
+ | Two sidebars on the page | Double-mount: `~/.dsh/profiles/web/cordis.patch.yml` still has the old hand-written `- insert: ... better-sidebar ...` line — delete it. |
155
103
  | Terminal fails on Windows | `node-pty` relies on prebuilt binaries; if none match your Node version, install a build toolchain (VS Build Tools). Mainstream Node versions are usually covered. |
156
- | No bash / curl on Windows | Use the PowerShell one-click command, or install Git Bash / WSL and run the bash commands. |
104
+ | Terminal shows "node-pty failed to load" | The `node-pty` install is missing or broken (e.g. pnpm skipped its build script). The terminal banner shows a repair command — copy it into a terminal/cmd on the DSH machine and run it (in `~/.dsh/profiles/web`: `pnpm approve-builds --all && pnpm rebuild node-pty`), then restart DSH and click Retry. The plugin and DSH core share the same `node-pty@^1.1.0`, so the repair restores both. |
105
+ | `dsh: command not found` | Install DSH first, or run `npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar`. |
157
106
 
158
107
  </details>
159
108
 
@@ -174,7 +123,7 @@ To debug local changes or track the dev branch, point the dependency at a local
174
123
  5. Restart DSH and hard-refresh
175
124
  ```
176
125
 
177
- Update: `git pull && pnpm install && pnpm build` → just hard-refresh the browser (client changes hot-reload; only host-half changes need a DSH restart). To switch back to the npm channel, restore `"dsh-better-sidebar": "^0.12.1"` and re-run `pnpm install`.
126
+ Update: `git pull && pnpm install && pnpm build` → just hard-refresh the browser (client changes hot-reload; only host-half changes need a DSH restart). To switch back to the npm channel, restore `"dsh-better-sidebar": "^0.12.3"` and re-run `pnpm install`.
178
127
 
179
128
  </details>
180
129
 
@@ -208,7 +157,7 @@ Update: `git pull && pnpm install && pnpm build` → `node scripts/package-regis
208
157
 
209
158
  ## 🔌 Service: register tabs & file viewers
210
159
 
211
- Since v0.4.0 the plugin exposes the `ctx.betterSidebar` service — other plugins can register sidebar pages and file viewers (the 7 built-in tabs + 9 viewers go through the same service, eating our own dog food):
160
+ Since v0.4.0 the plugin exposes the `ctx.betterSidebar` service — other plugins can register sidebar pages and file viewers (the 7 built-in tabs + 6 viewers register through the same service):
212
161
 
213
162
  ```ts
214
163
  import type {} from 'dsh-better-sidebar' // triggers the ctx.betterSidebar type merge
@@ -268,3 +217,4 @@ Windows / Linux / macOS (macOS validated daily; the rest covered by unit tests);
268
217
  - [dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui): an interactive terminal UI plugin for DeepSeek Harness (its rendering core evolved from the self-developed harness agent Tianshu-Tui), adding TDD and evidence-gate workflows on top of the official harness
269
218
  - [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI): a Claude Code-style fullscreen interactive TUI plugin — pixel-whale top bar, live working-status row, streaming thought expansion, double-Esc rollback, context progress bar + TPS meter; one-command npm install
270
219
  - [dshfind Plugin Market](https://dshfind.com/zh/plugins): a third-party plugin marketplace — a listing of public repos under the GitHub topic `dsh-plugin`, with stars, contributors and growth data synced daily
220
+ - [DeepSeek Harness Desktop](https://github.com/anywhere-labs/deepseek-harness-desktop): a modern desktop client for the DeepSeek Harness ecosystem — start and manage a local Harness service without configuring Node.js or running commands; [official site](https://www.dshdesktop.cn)