dsh-better-sidebar 0.10.2 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +124 -34
- package/README_EN.md +123 -33
- package/lib/client-docx.js +173 -155
- package/lib/client-editor.js +167 -149
- package/lib/client-pptx.js +173 -155
- package/lib/client-registry.js +570 -340
- package/lib/client-terminal.js +255 -158
- package/lib/client-xlsx.js +173 -155
- package/lib/client.js +574 -344
- package/lib/index.js +2 -0
- package/lib/types/client/SideCardSection.d.ts +9 -3
- package/lib/types/client/intercept.d.ts +14 -1
- package/lib/types/client/locales.d.ts +9 -0
- package/lib/types/client/open-when-sized.d.ts +20 -0
- package/lib/types/client/prefs.d.ts +2 -2
- package/lib/types/client/service.d.ts +21 -5
- package/lib/types/client/terminal-font.d.ts +20 -0
- package/lib/types/config.d.ts +1 -1
- package/lib/types/prefs-shared.d.ts +18 -0
- package/package.json +13 -12
- package/scripts/install.ps1 +242 -0
- package/scripts/install.sh +126 -50
- package/src/client/SideCardSection.module.css +217 -67
- package/src/client/SideCardSection.tsx +269 -114
- package/src/client/TerminalView.tsx +48 -4
- package/src/client/builtins/tabs.tsx +20 -4
- package/src/client/intercept.tsx +16 -3
- package/src/client/locales.ts +18 -0
- package/src/client/open-when-sized.ts +43 -0
- package/src/client/prefs.ts +8 -1
- package/src/client/service.ts +22 -5
- package/src/client/terminal-font.ts +28 -0
- package/src/config.ts +8 -0
- package/src/prefs-shared.ts +24 -0
package/README.md
CHANGED
|
@@ -16,58 +16,141 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
16
16
|
|
|
17
17
|
<img width="2630" height="1794" alt="6c4293e1bec2e935031bf0e986d6ec65" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
|
|
18
18
|
|
|
19
|
+
## 🆕 最近更新
|
|
20
|
+
|
|
21
|
+
- **终端自定义字体**:设置页终端卡片新增字体族 + 9–32px 字号设置,实时生效
|
|
22
|
+
- **侧边卡片设置页重构**:分组容器卡片、计数徽标、自定义开关、加宽设置弹窗
|
|
23
|
+
- **修复**:WKWebView 下底部面板展开后终端空白(xterm 零尺寸容器初始化崩溃,[#25](https://github.com/omdsh-dev/DSH-better-sidebar/issues/25))
|
|
24
|
+
- **文档**:client 改动硬刷新即可生效,无需重启 DSH
|
|
25
|
+
|
|
19
26
|
## ✨ 功能一览
|
|
20
27
|
|
|
21
|
-
- **🗂️ 资源管理器**:懒加载目录树(根 = 会话 cwd
|
|
22
|
-
- **📝 编辑与预览**:CodeMirror 6
|
|
23
|
-
- **⚡
|
|
24
|
-
- **🌐
|
|
25
|
-
- **💻 终端**:xterm.js + node-pty 真实 shell
|
|
26
|
-
- **🌿 Git 面板**:真 diff + VSCode 式 diff tab
|
|
27
|
-
- **🧩
|
|
28
|
-
- **🪟
|
|
29
|
-
- **📱
|
|
30
|
-
- **🔧 分栏工作台**:拖 Tab
|
|
31
|
-
- **🔁
|
|
32
|
-
- **⚙️
|
|
33
|
-
- **🔌 服务化**:暴露 `ctx.betterSidebar
|
|
34
|
-
- **🌏 多语言**:界面文案跟随 DSH
|
|
28
|
+
- **🗂️ 资源管理器**:懒加载目录树(根 = 会话 cwd),点击打开、`@文件` 引用、右键复制路径
|
|
29
|
+
- **📝 编辑与预览**:CodeMirror 6 编辑(Ctrl/Cmd+S 原子保存,切 Tab 不丢草稿);图片 / Markdown / HTML / PDF / Word / Excel / PPT 内联预览(HTML 走沙箱 iframe)
|
|
30
|
+
- **⚡ 客户端懒加载**:启动只拉 ~325KB 核心,Office / 终端 / 编辑器等重依赖用到才按需拉取(详见 `docs/plans/2026-08-12-lazy-chunks-design.md`)
|
|
31
|
+
- **🌐 浏览器**:多开内嵌网页 tab,后退/前进/刷新;内容运行在沙箱 iframe(无法访问界面数据与本地文件,拒绝本机地址),可临时解锁(红色警示);被站点拒绝嵌入时显示原因;外链默认在侧边栏打开
|
|
32
|
+
- **💻 终端**:xterm.js + node-pty 真实 shell、断线重连回放;可选为模型注入 `terminal_*` 工具;支持自定义字体(字体族 + 9–32px 字号,实时生效)
|
|
33
|
+
- **🌿 Git 面板**:真 diff + VSCode 式 diff tab、历史、右键暂存/提交/还原等
|
|
34
|
+
- **🧩 后台任务页**:主会话 agent 拓扑、点击直达执行记录;同页显示后台任务(类型徽标 + 退出码、实时输出 peek、可强制终止)
|
|
35
|
+
- **🪟 底部面板**:第二个独立工作台,只挤占中间输出区;首次展开自动开终端(可关)
|
|
36
|
+
- **📱 移动端**:窄屏(<768px)自动合并为全宽抽屉,底部面板标签页并入右侧栏;点文件/外链自动展开
|
|
37
|
+
- **🔧 分栏工作台**:拖 Tab 拆分/合并(可跨面板)、分隔线调比例;右上角按钮一键折叠/展开面板
|
|
38
|
+
- **🔁 会话隔离**:布局 / Tab / 面板状态按会话持久化,陈旧状态自动净化;「产出文件」在侧边栏打开
|
|
39
|
+
- **⚙️ 声明式设置**:设置页「侧边卡片」按注册表渲染开关网格,逐项独立开/关;二级设置(自动展开、终端工具、沙箱等)经齿轮弹窗编辑
|
|
40
|
+
- **🔌 服务化**:暴露 `ctx.betterSidebar`,其他插件可注册 tab 与文件预览器(内置 7 tab + 9 viewer 同走一服务,见 [AGENTS.md](./AGENTS.md))
|
|
41
|
+
- **🌏 多语言**:界面文案跟随 DSH 语言(zh/en)实时切换,无需刷新
|
|
35
42
|
|
|
36
43
|
## 🚀 安装
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
**前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
**macOS / Linux**(Windows 装了 Git Bash 或 WSL 也可):
|
|
41
48
|
|
|
42
49
|
```sh
|
|
43
|
-
|
|
44
|
-
# 或(本机无 dsh 命令时)
|
|
45
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@0.10.2
|
|
46
|
-
# 或安装最新发布版
|
|
47
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
50
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
**Windows(PowerShell 5.1+ / pwsh)**:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
|
|
57
|
+
```
|
|
51
58
|
|
|
52
|
-
|
|
59
|
+
装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
<details>
|
|
62
|
+
<summary><b>指定版本 / 装完自动重启(可选)</b></summary>
|
|
55
63
|
|
|
56
64
|
```sh
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
# macOS / Linux
|
|
66
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.11.0 --restart
|
|
67
|
+
|
|
68
|
+
# Windows PowerShell
|
|
69
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.11.0 -Restart
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
不确定的话,可先加 `--dry-run`(PowerShell 用 `-DryRun`)预览步骤再执行。
|
|
73
|
+
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary><b>手动安装(逐步命令,想看清每一步)</b></summary>
|
|
78
|
+
|
|
79
|
+
与一键脚本等价。**第 ③ 步可重复执行;①② 只需做一次。**
|
|
80
|
+
|
|
81
|
+
**macOS / Linux(bash)**:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
cd ~/.dsh/profiles/web
|
|
85
|
+
|
|
86
|
+
# ① 放行 node-pty / protobufjs 的构建脚本(pnpm 11 默认拦截;pnpm 10 可跳过)
|
|
87
|
+
pnpm approve-builds --all
|
|
88
|
+
|
|
89
|
+
# ② 放行「发布不足 24h」的新版本(装老版本可跳过;若已有该键,把下面那行并入其下即可)
|
|
90
|
+
cat >> pnpm-workspace.yaml <<'EOF'
|
|
91
|
+
minimumReleaseAgeExclude:
|
|
92
|
+
- dsh-better-sidebar
|
|
93
|
+
EOF
|
|
94
|
+
|
|
95
|
+
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.11.0)
|
|
96
|
+
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Windows(PowerShell)**:
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
cd ~\.dsh\profiles\web
|
|
103
|
+
|
|
104
|
+
# ① 放行构建脚本
|
|
105
|
+
pnpm approve-builds --all
|
|
106
|
+
|
|
107
|
+
# ② 放行新版本(一次性;若已有该键,把 - dsh-better-sidebar 并入其下即可)
|
|
108
|
+
Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
|
|
109
|
+
|
|
110
|
+
# ③ 安装并自动挂载
|
|
111
|
+
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
60
112
|
```
|
|
61
113
|
|
|
62
|
-
|
|
114
|
+
</details>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary><b>脚本内部做了什么(技术细节)</b></summary>
|
|
118
|
+
|
|
119
|
+
一键脚本自动完成 4 件事(全部幂等,可安全重复执行):
|
|
120
|
+
|
|
121
|
+
1. 预写 `allowBuilds`(node-pty / protobufjs),规避 pnpm 11 的构建脚本拦截;
|
|
122
|
+
2. 预写 `minimumReleaseAgeExclude`,放行「发布不足 24 小时」的新版本;
|
|
123
|
+
3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
|
|
124
|
+
4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
|
|
125
|
+
|
|
126
|
+
`curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.11.0` 发布,通过 `dsh.bundle.patch`(随包的 `cordis.patch.yml`)由官方 CLI 自动挂载,**不修改 DSH 源码**。
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
<details>
|
|
131
|
+
<summary><b>更新</b></summary>
|
|
63
132
|
|
|
64
133
|
```sh
|
|
65
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
134
|
+
dsh plugin --profile web add dsh-better-sidebar
|
|
66
135
|
```
|
|
67
136
|
|
|
68
|
-
|
|
137
|
+
或重跑一次一键脚本;也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary><b>常见问题</b></summary>
|
|
143
|
+
|
|
144
|
+
| 现象 | 原因与解决 |
|
|
145
|
+
|---|---|
|
|
146
|
+
| 报 `Ignored build scripts` | pnpm 11 拦截构建脚本。跑 `pnpm approve-builds --all`(一键脚本已自动处理)。 |
|
|
147
|
+
| 报 `minimum release age` / 版本不足 24h | 装的版本发布不足 24 小时。等 24h 或重跑一次(pnpm 会自动补 `minimumReleaseAgeExclude`);一键脚本已自动处理。 |
|
|
148
|
+
| 报「找不到 profile 目录」 | 先跑一次 `dsh web`,让它初始化 `~/.dsh/profiles/web`。 |
|
|
149
|
+
| 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`(一键脚本会自动清)。 |
|
|
150
|
+
| Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
|
|
151
|
+
| Windows 没有 bash / curl | 直接用 PowerShell 一键命令;或安装 Git Bash / WSL 再跑 bash 命令。 |
|
|
69
152
|
|
|
70
|
-
>
|
|
153
|
+
</details>
|
|
71
154
|
|
|
72
155
|
<details>
|
|
73
156
|
<summary><b>从源码安装 / 开发(可选,替代 npm 方式)</b></summary>
|
|
@@ -78,12 +161,15 @@ dsh plugin --profile web add dsh-better-sidebar@<新版>
|
|
|
78
161
|
1. git clone https://github.com/omdsh-dev/DSH-better-sidebar.git ~/Code/DSH-better-sidebar
|
|
79
162
|
cd ~/Code/DSH-better-sidebar && pnpm install && pnpm build
|
|
80
163
|
2. ~/.dsh/profiles/web/package.json 的 dependencies 写 "dsh-better-sidebar": "link:<克隆目录绝对路径>"
|
|
81
|
-
3. ~/.dsh/profiles/web/cordis.patch.yml
|
|
164
|
+
3. ~/.dsh/profiles/web/cordis.patch.yml 追加挂载行:
|
|
165
|
+
- insert:
|
|
166
|
+
- id: better-sidebar
|
|
167
|
+
name: 'dsh-better-sidebar'
|
|
82
168
|
4. 在 ~/.dsh/profiles/web 执行 pnpm install
|
|
83
|
-
5.
|
|
169
|
+
5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
|
|
84
170
|
```
|
|
85
171
|
|
|
86
|
-
更新:`git pull && pnpm install && pnpm build` →
|
|
172
|
+
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.11.0"` 再 `pnpm install`。
|
|
87
173
|
|
|
88
174
|
</details>
|
|
89
175
|
|
|
@@ -161,3 +247,7 @@ pnpm watch # tsdown --watch
|
|
|
161
247
|
## 🖥️ 平台支持
|
|
162
248
|
|
|
163
249
|
Windows / Linux / macOS 三平台适配(macOS 日常验证;其余经单元测试覆盖);`node-pty` 优先预编译二进制,失败需编译工具链(Windows VS Build Tools / Linux make+g+++python3 / macOS Xcode CLT)。
|
|
250
|
+
|
|
251
|
+
## 🔗 友情链接
|
|
252
|
+
|
|
253
|
+
- [dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui):DeepSeek Harness 交互式终端 UI 插件(渲染核心由自研 harness agent Tianshu-Tui 演进而来),在官方基础上增加 TDD 与证据门等工作流
|
package/README_EN.md
CHANGED
|
@@ -16,58 +16,141 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
16
16
|
|
|
17
17
|
<img width="2630" height="1794" alt="6c4293e1bec2e935031bf0e986d6ec65" src="https://github.com/user-attachments/assets/dfdb875e-a1a8-4d4b-8340-353736b1708f" />
|
|
18
18
|
|
|
19
|
+
## 🆕 Recent Updates
|
|
20
|
+
|
|
21
|
+
- **Custom terminal fonts**: font-family + 9–32px size settings on the terminal card, applied live
|
|
22
|
+
- **Side card settings redesign**: grouped container cards, count badges, custom toggles, wider settings dialog
|
|
23
|
+
- **Fix**: blank terminal after expanding the bottom panel on WKWebView (xterm initialized in a zero-size container, [#25](https://github.com/omdsh-dev/DSH-better-sidebar/issues/25))
|
|
24
|
+
- **Docs**: client changes take effect on a hard refresh — no DSH restart needed
|
|
25
|
+
|
|
19
26
|
## ✨ Features
|
|
20
27
|
|
|
21
|
-
- **🗂️ File Explorer**: lazy-loading directory tree (root = session cwd), click to open
|
|
22
|
-
- **📝 Edit & Preview**: CodeMirror 6
|
|
23
|
-
- **⚡ Client-side Lazy Loading**:
|
|
24
|
-
- **🌐 Browser**: embedded web
|
|
25
|
-
- **💻 Terminal**: xterm.js + node-pty real shell
|
|
26
|
-
- **🌿 Git Panel**: real diff + VSCode-style diff tabs,
|
|
27
|
-
- **🧩 Background Tasks**:
|
|
28
|
-
- **🪟 Bottom Panel**: an independent second workbench
|
|
29
|
-
- **📱 Mobile**:
|
|
30
|
-
- **🔧 Split-pane Workbench**: drag tabs to split/merge panes (cross-panel
|
|
31
|
-
- **🔁 Session Isolation**: layout/
|
|
32
|
-
- **⚙️ Declarative Settings**: the "Side Cards"
|
|
33
|
-
- **🔌 Service API**: exposes
|
|
34
|
-
- **🌏 i18n**: UI text follows DSH's language setting (zh/en) with live switching
|
|
28
|
+
- **🗂️ File Explorer**: lazy-loading directory tree (root = session cwd), click to open, `@file` reference, right-click to copy path
|
|
29
|
+
- **📝 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)
|
|
30
|
+
- **⚡ Client-side Lazy Loading**: only ~325KB core at startup; heavy deps (Office / terminal / editor) load on demand (see `docs/plans/2026-08-12-lazy-chunks-design.md`)
|
|
31
|
+
- **🌐 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
|
|
32
|
+
- **💻 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)
|
|
33
|
+
- **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage/commit/revert etc.
|
|
34
|
+
- **🧩 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)
|
|
35
|
+
- **🪟 Bottom Panel**: an independent second workbench that only squeezes the center output area; auto-opens a terminal on first expand (toggleable)
|
|
36
|
+
- **📱 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
|
|
37
|
+
- **🔧 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
|
|
38
|
+
- **🔁 Session Isolation**: layout / tabs / panel states persisted per session, stale state auto-purged; "produced files" open in the sidebar
|
|
39
|
+
- **⚙️ 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
|
|
40
|
+
- **🔌 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))
|
|
41
|
+
- **🌏 i18n**: UI text follows DSH's language setting (zh/en) with live switching, no refresh needed
|
|
35
42
|
|
|
36
43
|
## 🚀 Installation
|
|
37
44
|
|
|
38
|
-
Prerequisites
|
|
45
|
+
**Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
|
|
39
46
|
|
|
40
|
-
|
|
47
|
+
**macOS / Linux** (also works in Git Bash / WSL on Windows):
|
|
41
48
|
|
|
42
49
|
```sh
|
|
43
|
-
|
|
44
|
-
# or (no local dsh command):
|
|
45
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar@0.10.2
|
|
46
|
-
# or install the latest published version:
|
|
47
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
50
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
|
|
48
51
|
```
|
|
49
52
|
|
|
50
|
-
|
|
53
|
+
**Windows (PowerShell 5.1+ / pwsh)**:
|
|
54
|
+
|
|
55
|
+
```powershell
|
|
56
|
+
irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1 | iex
|
|
57
|
+
```
|
|
51
58
|
|
|
52
|
-
|
|
59
|
+
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).
|
|
53
60
|
|
|
54
|
-
|
|
61
|
+
<details>
|
|
62
|
+
<summary><b>Pin a version / auto-restart (optional)</b></summary>
|
|
55
63
|
|
|
56
64
|
```sh
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
65
|
+
# macOS / Linux
|
|
66
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.11.0 --restart
|
|
67
|
+
|
|
68
|
+
# Windows PowerShell
|
|
69
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.11.0 -Restart
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Not sure? Add `--dry-run` (`-DryRun` in PowerShell) to preview before running.
|
|
73
|
+
|
|
74
|
+
</details>
|
|
75
|
+
|
|
76
|
+
<details>
|
|
77
|
+
<summary><b>Manual install (step by step)</b></summary>
|
|
78
|
+
|
|
79
|
+
Equivalent to the one-click script. **Step ③ is repeatable; ①② only need to run once.**
|
|
80
|
+
|
|
81
|
+
**macOS / Linux (bash)**:
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
cd ~/.dsh/profiles/web
|
|
85
|
+
|
|
86
|
+
# ① Allow node-pty / protobufjs build scripts (pnpm 11 blocks them by default; skip on pnpm 10)
|
|
87
|
+
pnpm approve-builds --all
|
|
88
|
+
|
|
89
|
+
# ② Allow versions published less than 24h ago (skip for older releases; if the key already exists, merge the line under it instead)
|
|
90
|
+
cat >> pnpm-workspace.yaml <<'EOF'
|
|
91
|
+
minimumReleaseAgeExclude:
|
|
92
|
+
- dsh-better-sidebar
|
|
93
|
+
EOF
|
|
94
|
+
|
|
95
|
+
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.11.0)
|
|
96
|
+
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
**Windows (PowerShell)**:
|
|
100
|
+
|
|
101
|
+
```powershell
|
|
102
|
+
cd ~\.dsh\profiles\web
|
|
103
|
+
|
|
104
|
+
# ① Allow build scripts
|
|
105
|
+
pnpm approve-builds --all
|
|
106
|
+
|
|
107
|
+
# ② Allow fresh releases (once; if the key already exists, merge - dsh-better-sidebar under it instead)
|
|
108
|
+
Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
|
|
109
|
+
|
|
110
|
+
# ③ Install and auto-mount
|
|
111
|
+
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
60
112
|
```
|
|
61
113
|
|
|
62
|
-
|
|
114
|
+
</details>
|
|
115
|
+
|
|
116
|
+
<details>
|
|
117
|
+
<summary><b>What the script does (technical details)</b></summary>
|
|
118
|
+
|
|
119
|
+
The one-click script does four things, all idempotent (safe to re-run):
|
|
120
|
+
|
|
121
|
+
1. Pre-writes `allowBuilds` (node-pty / protobufjs) to dodge pnpm 11's build-script block;
|
|
122
|
+
2. Pre-writes `minimumReleaseAgeExclude` to allow versions younger than 24 hours;
|
|
123
|
+
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`;
|
|
124
|
+
4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
|
|
125
|
+
|
|
126
|
+
`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.11.0` and mounts via `dsh.bundle.patch` (the shipped `cordis.patch.yml`), so the DSH source is never modified.
|
|
127
|
+
|
|
128
|
+
</details>
|
|
129
|
+
|
|
130
|
+
<details>
|
|
131
|
+
<summary><b>Updating</b></summary>
|
|
63
132
|
|
|
64
133
|
```sh
|
|
65
|
-
dsh plugin --profile web add dsh-better-sidebar
|
|
134
|
+
dsh plugin --profile web add dsh-better-sidebar
|
|
66
135
|
```
|
|
67
136
|
|
|
68
|
-
or bump the version
|
|
137
|
+
or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.11.0"`) and run `pnpm install`. Then hard-refresh the browser (Cmd/Ctrl+Shift+R) — client changes do not need a DSH restart.
|
|
138
|
+
|
|
139
|
+
</details>
|
|
140
|
+
|
|
141
|
+
<details>
|
|
142
|
+
<summary><b>Troubleshooting</b></summary>
|
|
143
|
+
|
|
144
|
+
| Symptom | Cause & fix |
|
|
145
|
+
|---|---|
|
|
146
|
+
| `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all` (the one-click script handles it). |
|
|
147
|
+
| `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. |
|
|
148
|
+
| "profile directory not found" | Run `dsh web` once so it initializes `~/.dsh/profiles/web`. |
|
|
149
|
+
| 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). |
|
|
150
|
+
| 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. |
|
|
151
|
+
| No bash / curl on Windows | Use the PowerShell one-click command, or install Git Bash / WSL and run the bash commands. |
|
|
69
152
|
|
|
70
|
-
>
|
|
153
|
+
</details>
|
|
71
154
|
|
|
72
155
|
<details>
|
|
73
156
|
<summary><b>Install from source / develop (optional — alternative to the npm flow)</b></summary>
|
|
@@ -78,12 +161,15 @@ To debug local changes or track the dev branch, point the dependency at a local
|
|
|
78
161
|
1. git clone https://github.com/omdsh-dev/DSH-better-sidebar.git ~/Code/DSH-better-sidebar
|
|
79
162
|
cd ~/Code/DSH-better-sidebar && pnpm install && pnpm build
|
|
80
163
|
2. In ~/.dsh/profiles/web/package.json dependencies write "dsh-better-sidebar": "link:<absolute path of the clone>"
|
|
81
|
-
3. Append
|
|
164
|
+
3. Append this mount line to ~/.dsh/profiles/web/cordis.patch.yml:
|
|
165
|
+
- insert:
|
|
166
|
+
- id: better-sidebar
|
|
167
|
+
name: 'dsh-better-sidebar'
|
|
82
168
|
4. Run pnpm install in ~/.dsh/profiles/web
|
|
83
169
|
5. Restart DSH and hard-refresh
|
|
84
170
|
```
|
|
85
171
|
|
|
86
|
-
Update: `git pull && pnpm install && pnpm build` →
|
|
172
|
+
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.11.0"` and re-run `pnpm install`.
|
|
87
173
|
|
|
88
174
|
</details>
|
|
89
175
|
|
|
@@ -161,3 +247,7 @@ pnpm watch # tsdown --watch
|
|
|
161
247
|
## 🖥️ Platform Support
|
|
162
248
|
|
|
163
249
|
Windows / Linux / macOS (macOS validated daily; the rest covered by unit tests); `node-pty` prefers prebuilt binaries, otherwise a build toolchain is required (Windows VS Build Tools / Linux make+g+++python3 / macOS Xcode CLT).
|
|
250
|
+
|
|
251
|
+
## 🔗 Friends
|
|
252
|
+
|
|
253
|
+
- [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
|