dsh-better-sidebar 0.12.1 → 0.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -34
- package/README_EN.md +39 -35
- package/lib/client-editor.js +164 -146
- package/lib/client-registry.js +414 -242
- package/lib/client-terminal.js +167 -149
- package/lib/client.js +415 -243
- package/lib/index.js +31 -5
- package/lib/types/client/link-intercept.d.ts +15 -8
- package/lib/types/client/locales.d.ts +9 -0
- package/lib/types/client/prefs.d.ts +2 -2
- package/lib/types/client/service.d.ts +32 -2
- package/lib/types/config.d.ts +1 -1
- package/lib/types/prefs-shared.d.ts +44 -5
- package/lib/types/pty-manager.d.ts +15 -1
- package/package.json +4 -2
- package/src/agent-pty.ts +2 -2
- package/src/client/SideCardSection.module.css +25 -1
- package/src/client/SideCardSection.tsx +69 -0
- package/src/client/Sidebar.tsx +27 -0
- package/src/client/builtins/tabs.tsx +12 -3
- package/src/client/index.tsx +26 -7
- package/src/client/link-intercept.ts +17 -10
- package/src/client/locales.ts +20 -2
- package/src/client/plugins-tabs.ts +9 -0
- package/src/client/prefs.ts +14 -1
- package/src/client/service.ts +46 -1
- package/src/client/sidebar.module.css +23 -0
- package/src/config.ts +10 -0
- package/src/prefs-shared.ts +52 -5
- package/src/pty-manager.ts +31 -4
package/README.md
CHANGED
|
@@ -1,50 +1,53 @@
|
|
|
1
1
|
# dsh-better-sidebar
|
|
2
2
|
|
|
3
|
-
<!--
|
|
3
|
+
<!-- Hero -->
|
|
4
4
|
<div align="center">
|
|
5
|
-
<b style="font-size: 1.15em;"
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
<
|
|
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
|
-
|
|
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>
|
|
21
|
+
|
|
22
|
+
## ✨ 功能一览
|
|
23
|
+
|
|
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)实时切换
|
|
16
34
|
|
|
17
|
-
|
|
35
|
+
> 🔌 **核心理念**:服务优先——内置的 7 tab + 6 viewer 与第三方插件通过同一套 `ctx.betterSidebar` API 注册,能力完全对等;官方不再内置、可由生态提供的功能,交由生态插件实现。接入文档见下方「🔌 服务化」与 [外部插件接入指南](./docs/external-plugin-guide.md)。
|
|
18
36
|
|
|
19
37
|
## 🆕 最近更新
|
|
20
38
|
|
|
21
|
-
<small>v0.12.
|
|
39
|
+
<small>v0.12.2</small>
|
|
40
|
+
|
|
41
|
+
> 📝 **说明**:本版新增「位置兼容模式」——为 Windows 右上角原生标题栏预留顶部空间,侧边栏整体下移,距离可在齿轮弹窗自定义(0–120px)。随 0.12.0 起的服务化基座一同发布:能力探测、状态订阅、tab 角标、生命周期回调、外链认领(`urlTarget`)与插件自有设置均已就绪,第三方插件可深度接入;设置页新增「添加插件」推荐目录。详细条目见下表。
|
|
22
42
|
|
|
23
43
|
| 功能 | 说明 | 截图 |
|
|
24
44
|
|---|---|---|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
45
|
+
| 📐 位置兼容模式 | 设置页新增「位置兼容模式」开关:为 Windows 右上角原生标题栏预留顶部空间,侧边栏按钮与内容整体下移(默认关闭);下移距离可在齿轮弹窗中自定义(0–120px) | |
|
|
46
|
+
| 🔌 服务化基座 | 完整类型导出 + `version`/`features` 能力探测、状态订阅(`getSnapshot`/`subscribeState`)、tab 角标、`onOpen`/`onActivate`/`onClose` 生命周期回调、`updateTab`/`activateTab`/`openFile`、定向打开、`meta` 跨刷新持久化、插件自有设置(`pluginToggles`/`render`)、外链点击目标认领(`urlTarget`) | <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="800" alt="服务化基座截图" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a> |
|
|
47
|
+
| ➕ 添加插件 | 设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件 | <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="800" alt="添加插件截图" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a> |
|
|
27
48
|
| 🖱️ 标签页滚轮 | 标签页栏支持鼠标滚轮横向滚动 | |
|
|
28
49
|
| 🐛 修复 | 远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径 | |
|
|
29
50
|
|
|
30
|
-
## ✨ 功能一览
|
|
31
|
-
|
|
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)实时切换,无需刷新
|
|
47
|
-
|
|
48
51
|
## 🚀 安装
|
|
49
52
|
|
|
50
53
|
**前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
|
|
@@ -68,10 +71,10 @@ irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/
|
|
|
68
71
|
|
|
69
72
|
```sh
|
|
70
73
|
# macOS / Linux
|
|
71
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.
|
|
74
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
|
|
72
75
|
|
|
73
76
|
# Windows PowerShell
|
|
74
|
-
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.
|
|
77
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.2 -Restart
|
|
75
78
|
```
|
|
76
79
|
|
|
77
80
|
不确定的话,可先加 `--dry-run`(PowerShell 用 `-DryRun`)预览步骤再执行。
|
|
@@ -97,7 +100,7 @@ minimumReleaseAgeExclude:
|
|
|
97
100
|
- dsh-better-sidebar
|
|
98
101
|
EOF
|
|
99
102
|
|
|
100
|
-
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.
|
|
103
|
+
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.2)
|
|
101
104
|
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
102
105
|
```
|
|
103
106
|
|
|
@@ -128,7 +131,7 @@ npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sideba
|
|
|
128
131
|
3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
|
|
129
132
|
4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
|
|
130
133
|
|
|
131
|
-
`curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.12.
|
|
134
|
+
`curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.12.2` 发布,通过 `dsh.bundle.patch`(随包的 `cordis.patch.yml`)由官方 CLI 自动挂载,**不修改 DSH 源码**。
|
|
132
135
|
|
|
133
136
|
</details>
|
|
134
137
|
|
|
@@ -174,7 +177,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
174
177
|
5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
|
|
175
178
|
```
|
|
176
179
|
|
|
177
|
-
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.
|
|
180
|
+
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.2"` 再 `pnpm install`。
|
|
178
181
|
|
|
179
182
|
</details>
|
|
180
183
|
|
|
@@ -208,7 +211,7 @@ dsh registry enable dsh-external/dsh-better-sidebar
|
|
|
208
211
|
|
|
209
212
|
## 🔌 服务化:注册 tab 与文件预览器
|
|
210
213
|
|
|
211
|
-
从 v0.4.0 起暴露 `ctx.betterSidebar` 服务,其他插件可注册侧边栏页面与文件预览器(内置 7 tab +
|
|
214
|
+
从 v0.4.0 起暴露 `ctx.betterSidebar` 服务,其他插件可注册侧边栏页面与文件预览器(内置 7 tab + 6 viewer 亦通过同一服务注册):
|
|
212
215
|
|
|
213
216
|
```ts
|
|
214
217
|
import type {} from 'dsh-better-sidebar' // 触发 ctx.betterSidebar 类型合并
|
|
@@ -268,3 +271,4 @@ Windows / Linux / macOS 三平台适配(macOS 日常验证;其余经单元
|
|
|
268
271
|
- [dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui):DeepSeek Harness 交互式终端 UI 插件(渲染核心由自研 harness agent Tianshu-Tui 演进而来),在官方基础上增加 TDD 与证据门等工作流
|
|
269
272
|
- [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI):Claude Code 风格全屏交互终端插件——像素鲸鱼顶栏、实时工作状态行、思考流式展开、双击 Esc 回滚、上下文进度条 + TPS 仪表,npm 一键安装
|
|
270
273
|
- [dshfind 插件超市](https://dshfind.com/zh/plugins):三方插件市场——GitHub topic `dsh-plugin` 下的公开仓库清单,每日同步 star、贡献者与增长数据
|
|
274
|
+
- [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,50 +1,53 @@
|
|
|
1
1
|
# dsh-better-sidebar
|
|
2
2
|
|
|
3
|
-
<!-- Hero
|
|
3
|
+
<!-- Hero -->
|
|
4
4
|
<div align="center">
|
|
5
|
-
<b style="font-size: 1.15em;">
|
|
6
|
-
<
|
|
7
|
-
<
|
|
8
|
-
<
|
|
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 & 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
|
-
|
|
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>
|
|
21
|
+
|
|
22
|
+
## ✨ Features
|
|
23
|
+
|
|
24
|
+
- **🗂️ File Workbench**: file explorer (lazy-loading tree) + 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
|
|
16
34
|
|
|
17
|
-
|
|
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).
|
|
18
36
|
|
|
19
37
|
## 🆕 Recent Updates
|
|
20
38
|
|
|
21
|
-
<small>v0.12.
|
|
39
|
+
<small>v0.12.2</small>
|
|
40
|
+
|
|
41
|
+
> 📝 **Note**: this release adds "Position compat mode" — reserves top space for the native Windows title bar (top-right), shifting the sidebar buttons and content below it (0–120px, customizable in the gear popup). It ships together with the service API base introduced since v0.12.0: capability detection, state subscription, tab badges, lifecycle callbacks, external-link claiming (`urlTarget`) and plugin-owned settings are all in place for deep third-party integration; settings gained the "Add Plugins" recommended catalog. See the table below for details.
|
|
22
42
|
|
|
23
43
|
| Feature | Description | Screenshot |
|
|
24
44
|
|---|---|---|
|
|
25
|
-
|
|
|
26
|
-
|
|
|
45
|
+
| 📐 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) | |
|
|
46
|
+
| 🔌 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`) | <a href="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0"><img width="480" alt="Service API base screenshot" src="https://github.com/user-attachments/assets/946f7028-4967-461e-a750-d1b5056b62d0" /></a> |
|
|
47
|
+
| ➕ Add Plugins | Recommended plugin catalog in settings + one-click copy install command; built-in Office preview moved to the recommended plugin | <a href="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e"><img width="480" alt="Add Plugins screenshot" src="https://github.com/user-attachments/assets/d4385b7e-aab4-425d-a5c4-2da5da81a34e" /></a> |
|
|
27
48
|
| 🖱️ Tab-bar scroll | Mouse-wheel horizontal scrolling on the tab bar | |
|
|
28
49
|
| 🐛 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 | |
|
|
29
50
|
|
|
30
|
-
## ✨ Features
|
|
31
|
-
|
|
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
|
|
47
|
-
|
|
48
51
|
## 🚀 Installation
|
|
49
52
|
|
|
50
53
|
**Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
|
|
@@ -68,10 +71,10 @@ Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot
|
|
|
68
71
|
|
|
69
72
|
```sh
|
|
70
73
|
# macOS / Linux
|
|
71
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.
|
|
74
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
|
|
72
75
|
|
|
73
76
|
# Windows PowerShell
|
|
74
|
-
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.
|
|
77
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.2 -Restart
|
|
75
78
|
```
|
|
76
79
|
|
|
77
80
|
Not sure? Add `--dry-run` (`-DryRun` in PowerShell) to preview before running.
|
|
@@ -97,7 +100,7 @@ minimumReleaseAgeExclude:
|
|
|
97
100
|
- dsh-better-sidebar
|
|
98
101
|
EOF
|
|
99
102
|
|
|
100
|
-
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.
|
|
103
|
+
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.2)
|
|
101
104
|
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
102
105
|
```
|
|
103
106
|
|
|
@@ -128,7 +131,7 @@ The one-click script does four things, all idempotent (safe to re-run):
|
|
|
128
131
|
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
132
|
4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
|
|
130
133
|
|
|
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.
|
|
134
|
+
`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.2` and mounts via `dsh.bundle.patch` (the shipped `cordis.patch.yml`), so the DSH source is never modified.
|
|
132
135
|
|
|
133
136
|
</details>
|
|
134
137
|
|
|
@@ -139,7 +142,7 @@ The one-click script does four things, all idempotent (safe to re-run):
|
|
|
139
142
|
dsh plugin --profile web add dsh-better-sidebar
|
|
140
143
|
```
|
|
141
144
|
|
|
142
|
-
or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.
|
|
145
|
+
or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.12.2"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
|
|
143
146
|
|
|
144
147
|
</details>
|
|
145
148
|
|
|
@@ -174,7 +177,7 @@ To debug local changes or track the dev branch, point the dependency at a local
|
|
|
174
177
|
5. Restart DSH and hard-refresh
|
|
175
178
|
```
|
|
176
179
|
|
|
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.
|
|
180
|
+
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.2"` and re-run `pnpm install`.
|
|
178
181
|
|
|
179
182
|
</details>
|
|
180
183
|
|
|
@@ -208,7 +211,7 @@ Update: `git pull && pnpm install && pnpm build` → `node scripts/package-regis
|
|
|
208
211
|
|
|
209
212
|
## 🔌 Service: register tabs & file viewers
|
|
210
213
|
|
|
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 +
|
|
214
|
+
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
215
|
|
|
213
216
|
```ts
|
|
214
217
|
import type {} from 'dsh-better-sidebar' // triggers the ctx.betterSidebar type merge
|
|
@@ -268,3 +271,4 @@ Windows / Linux / macOS (macOS validated daily; the rest covered by unit tests);
|
|
|
268
271
|
- [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
272
|
- [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
273
|
- [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
|
|
274
|
+
- [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)
|