dsh-better-sidebar 0.12.2 → 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.
- package/README.md +36 -90
- package/README_EN.md +36 -90
- package/lib/client-editor.js +1368 -279
- package/lib/client-registry.js +513 -404
- package/lib/client-terminal.js +1156 -757
- package/lib/client.js +513 -404
- package/lib/index.js +330 -43
- package/lib/types/agent-pty.d.ts +8 -3
- package/lib/types/client/TerminalView.d.ts +18 -2
- package/lib/types/client/api.d.ts +30 -3
- package/lib/types/client/locales.d.ts +6 -0
- package/lib/types/client/paths.d.ts +16 -0
- package/lib/types/client/produced-files.d.ts +5 -9
- package/lib/types/client/service.d.ts +1 -1
- package/lib/types/client/settings-nav-icon.d.ts +19 -0
- package/lib/types/client/theme.d.ts +17 -0
- package/lib/types/config.d.ts +9 -0
- package/lib/types/fs-tree.d.ts +11 -1
- package/lib/types/html-route.d.ts +15 -4
- package/lib/types/pty-deps.d.ts +78 -0
- package/lib/types/pty-manager.d.ts +40 -10
- package/lib/types/wire.d.ts +1 -1
- package/package.json +14 -16
- package/scripts/install.ps1 +87 -49
- package/scripts/install.sh +85 -44
- package/src/agent-pty.ts +9 -4
- package/src/client/DiffTab.tsx +1 -1
- package/src/client/ExplorerView.tsx +6 -4
- package/src/client/GitView.tsx +1 -1
- package/src/client/SideCardSection.module.css +16 -14
- package/src/client/Sidebar.tsx +51 -49
- package/src/client/TerminalView.tsx +88 -7
- package/src/client/TextEditor.tsx +2 -2
- package/src/client/api.ts +32 -3
- package/src/client/index.tsx +11 -0
- package/src/client/lang.ts +8 -0
- package/src/client/layout.css +19 -0
- package/src/client/locales.ts +12 -0
- package/src/client/paths.ts +19 -0
- package/src/client/plugins-tabs.ts +7 -0
- package/src/client/plugins-viewers.ts +7 -0
- package/src/client/produced-files.ts +7 -3
- package/src/client/service.ts +1 -1
- package/src/client/settings-nav-icon.ts +45 -0
- package/src/client/sidebar.module.css +113 -13
- package/src/client/theme.ts +66 -0
- package/src/config.ts +11 -0
- package/src/fs-tree.ts +51 -8
- package/src/html-route.ts +43 -16
- package/src/index.ts +64 -16
- package/src/pty-deps.ts +240 -0
- package/src/pty-manager.ts +91 -13
- package/src/wire.ts +1 -0
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## ✨ 功能一览
|
|
23
23
|
|
|
24
|
-
- **🗂️
|
|
24
|
+
- **🗂️ 文件工作台**:资源管理器(懒加载目录树;软链接按目标类型展示——目录软链接可展开、失效链接标红)+ CodeMirror 编辑器;图片 / Markdown / HTML / PDF / Office 内联预览
|
|
25
25
|
- **🌐 内嵌浏览器**:多开网页 tab,后退 / 前进 / 刷新;内容运行在沙箱 iframe;外链默认按协议分流——HTTP 在侧边栏打开、HTTPS 走系统浏览器(设置页可分别调整)
|
|
26
26
|
- **💻 真实终端**:xterm.js + node-pty 真实 shell,断线重连回放;可选为模型注入 `terminal_*` 工具
|
|
27
27
|
- **🌿 Git 面板**:真 diff + VSCode 式 diff tab、历史、右键暂存 / 提交 / 还原
|
|
@@ -36,104 +36,49 @@
|
|
|
36
36
|
|
|
37
37
|
## 🆕 最近更新
|
|
38
38
|
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| 功能 | 说明 | 截图 |
|
|
44
|
-
|---|---|---|
|
|
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> |
|
|
48
|
-
| 🖱️ 标签页滚轮 | 标签页栏支持鼠标滚轮横向滚动 | |
|
|
49
|
-
| 🐛 修复 | 远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径 | |
|
|
50
|
-
|
|
51
|
-
## 🚀 安装
|
|
52
|
-
|
|
53
|
-
**前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
|
|
54
|
-
|
|
55
|
-
**macOS / Linux**(Windows 装了 Git Bash 或 WSL 也可):
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
|
|
59
|
-
```
|
|
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>
|
|
60
43
|
|
|
61
|
-
|
|
44
|
+
### v0.12.3
|
|
62
45
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
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 即自动发布
|
|
66
48
|
|
|
67
|
-
|
|
49
|
+
### v0.12.2
|
|
68
50
|
|
|
69
|
-
|
|
70
|
-
|
|
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 预览盘符路径
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
# macOS / Linux
|
|
74
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
|
|
57
|
+
### v0.12.1
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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 预览盘符路径
|
|
79
63
|
|
|
80
|
-
|
|
64
|
+
> 📝 说明:0.12.0 正式版因 npm 判定版本已发布无法复用,正式发布改用 0.12.1,两者内容一致。
|
|
81
65
|
|
|
82
|
-
|
|
66
|
+
### v0.12.0
|
|
83
67
|
|
|
84
|
-
|
|
85
|
-
|
|
68
|
+
- 🔌 **服务化基座**:完整类型导出 + `version`/`features` 能力探测、状态订阅、tab 角标、生命周期回调、定向打开、`meta` 跨刷新持久化、插件自有设置
|
|
69
|
+
- ➕ **添加插件**:设置页「推荐插件目录」+ 一键复制安装命令;内置 Office 预览迁至推荐插件
|
|
70
|
+
- 🖱️ **标签页滚轮**:标签页栏支持鼠标滚轮横向滚动
|
|
71
|
+
- 🐛 **修复**:远程访问 403(信任栅栏改用 `trustedHosts`)、侧边栏崩溃 [#31](https://github.com/omdsh-dev/DSH-better-sidebar/issues/31)、Windows 下 HTML 预览盘符路径
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
## 🚀 安装
|
|
88
74
|
|
|
89
|
-
|
|
75
|
+
**前置**:已装好 DSH(`dsh web` 能正常运行),Node.js ≥ 20、pnpm ≥ 10。
|
|
90
76
|
|
|
91
77
|
```sh
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# ① 放行 node-pty / protobufjs 的构建脚本(pnpm 11 默认拦截;pnpm 10 可跳过)
|
|
95
|
-
pnpm approve-builds --all
|
|
96
|
-
|
|
97
|
-
# ② 放行「发布不足 24h」的新版本(装老版本可跳过;若已有该键,把下面那行并入其下即可)
|
|
98
|
-
cat >> pnpm-workspace.yaml <<'EOF'
|
|
99
|
-
minimumReleaseAgeExclude:
|
|
100
|
-
- dsh-better-sidebar
|
|
101
|
-
EOF
|
|
102
|
-
|
|
103
|
-
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.2)
|
|
104
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Windows(PowerShell)**:
|
|
108
|
-
|
|
109
|
-
```powershell
|
|
110
|
-
cd ~\.dsh\profiles\web
|
|
111
|
-
|
|
112
|
-
# ① 放行构建脚本
|
|
113
|
-
pnpm approve-builds --all
|
|
114
|
-
|
|
115
|
-
# ② 放行新版本(一次性;若已有该键,把 - dsh-better-sidebar 并入其下即可)
|
|
116
|
-
Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
|
|
117
|
-
|
|
118
|
-
# ③ 安装并自动挂载
|
|
119
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
78
|
+
dsh plugin --profile web add dsh-better-sidebar
|
|
120
79
|
```
|
|
121
80
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<details>
|
|
125
|
-
<summary><b>脚本内部做了什么(技术细节)</b></summary>
|
|
126
|
-
|
|
127
|
-
一键脚本自动完成 4 件事(全部幂等,可安全重复执行):
|
|
128
|
-
|
|
129
|
-
1. 预写 `allowBuilds`(node-pty / protobufjs),规避 pnpm 11 的构建脚本拦截;
|
|
130
|
-
2. 预写 `minimumReleaseAgeExclude`,放行「发布不足 24 小时」的新版本;
|
|
131
|
-
3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
|
|
132
|
-
4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
|
|
133
|
-
|
|
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 源码**。
|
|
135
|
-
|
|
136
|
-
</details>
|
|
81
|
+
装完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可看到侧边栏(DSH 对 client 改动热加载,无需重启;仅 host 半更新时需要重启)。
|
|
137
82
|
|
|
138
83
|
<details>
|
|
139
84
|
<summary><b>更新</b></summary>
|
|
@@ -142,7 +87,7 @@ npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sideba
|
|
|
142
87
|
dsh plugin --profile web add dsh-better-sidebar
|
|
143
88
|
```
|
|
144
89
|
|
|
145
|
-
|
|
90
|
+
也可把 `~/.dsh/profiles/web/package.json` 里的版本号改高后 `pnpm install`。改完**硬刷新浏览器**(Cmd/Ctrl+Shift+R)即可(client 改动无需重启 DSH)。
|
|
146
91
|
|
|
147
92
|
</details>
|
|
148
93
|
|
|
@@ -151,12 +96,13 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
151
96
|
|
|
152
97
|
| 现象 | 原因与解决 |
|
|
153
98
|
|---|---|
|
|
154
|
-
| 报 `Ignored build scripts` | pnpm 11
|
|
155
|
-
| 报 `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`)。 |
|
|
156
101
|
| 报「找不到 profile 目录」 | 先跑一次 `dsh web`,让它初始化 `~/.dsh/profiles/web`。 |
|
|
157
|
-
| 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar
|
|
102
|
+
| 页面出现**两个侧边栏** | 双挂载:`~/.dsh/profiles/web/cordis.patch.yml` 还留着旧的手动挂载行,删掉那段 `- insert: ... better-sidebar ...`。 |
|
|
158
103
|
| Windows 下终端无法使用 | `node-pty` 依赖预编译二进制;若当前 Node 版本没有对应产物,需装编译工具链(VS Build Tools)。主流 Node 版本一般已有预编译。 |
|
|
159
|
-
|
|
|
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`。 |
|
|
160
106
|
|
|
161
107
|
</details>
|
|
162
108
|
|
|
@@ -177,7 +123,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
177
123
|
5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
|
|
178
124
|
```
|
|
179
125
|
|
|
180
|
-
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.
|
|
126
|
+
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.3"` 再 `pnpm install`。
|
|
181
127
|
|
|
182
128
|
</details>
|
|
183
129
|
|
package/README_EN.md
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
|
|
22
22
|
## ✨ Features
|
|
23
23
|
|
|
24
|
-
- **🗂️ File Workbench**: file explorer (lazy-loading tree) + CodeMirror editor; inline preview for images / Markdown / HTML / PDF / Office
|
|
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
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
26
|
- **💻 Real Terminal**: xterm.js + node-pty real shell, reconnect with transcript replay; optionally injects `terminal_*` tools for the model
|
|
27
27
|
- **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage / commit / revert
|
|
@@ -36,104 +36,49 @@
|
|
|
36
36
|
|
|
37
37
|
## 🆕 Recent Updates
|
|
38
38
|
|
|
39
|
-
<
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
| Feature | Description | Screenshot |
|
|
44
|
-
|---|---|---|
|
|
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> |
|
|
48
|
-
| 🖱️ Tab-bar scroll | Mouse-wheel horizontal scrolling on the tab bar | |
|
|
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 | |
|
|
50
|
-
|
|
51
|
-
## 🚀 Installation
|
|
52
|
-
|
|
53
|
-
**Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
|
|
54
|
-
|
|
55
|
-
**macOS / Linux** (also works in Git Bash / WSL on Windows):
|
|
56
|
-
|
|
57
|
-
```sh
|
|
58
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash
|
|
59
|
-
```
|
|
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>
|
|
60
43
|
|
|
61
|
-
|
|
44
|
+
### v0.12.3
|
|
62
45
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
```
|
|
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
|
|
66
48
|
|
|
67
|
-
|
|
49
|
+
### v0.12.2
|
|
68
50
|
|
|
69
|
-
|
|
70
|
-
|
|
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
|
|
71
56
|
|
|
72
|
-
|
|
73
|
-
# macOS / Linux
|
|
74
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.2 --restart
|
|
57
|
+
### v0.12.1
|
|
75
58
|
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
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
|
|
79
63
|
|
|
80
|
-
|
|
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.
|
|
81
65
|
|
|
82
|
-
|
|
66
|
+
### v0.12.0
|
|
83
67
|
|
|
84
|
-
|
|
85
|
-
|
|
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
|
|
86
72
|
|
|
87
|
-
|
|
73
|
+
## 🚀 Installation
|
|
88
74
|
|
|
89
|
-
**
|
|
75
|
+
**Prerequisites**: DSH installed (`dsh web` boots), Node.js ≥ 20, pnpm ≥ 10.
|
|
90
76
|
|
|
91
77
|
```sh
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
# ① Allow node-pty / protobufjs build scripts (pnpm 11 blocks them by default; skip on pnpm 10)
|
|
95
|
-
pnpm approve-builds --all
|
|
96
|
-
|
|
97
|
-
# ② Allow versions published less than 24h ago (skip for older releases; if the key already exists, merge the line under it instead)
|
|
98
|
-
cat >> pnpm-workspace.yaml <<'EOF'
|
|
99
|
-
minimumReleaseAgeExclude:
|
|
100
|
-
- dsh-better-sidebar
|
|
101
|
-
EOF
|
|
102
|
-
|
|
103
|
-
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.2)
|
|
104
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
105
|
-
```
|
|
106
|
-
|
|
107
|
-
**Windows (PowerShell)**:
|
|
108
|
-
|
|
109
|
-
```powershell
|
|
110
|
-
cd ~\.dsh\profiles\web
|
|
111
|
-
|
|
112
|
-
# ① Allow build scripts
|
|
113
|
-
pnpm approve-builds --all
|
|
114
|
-
|
|
115
|
-
# ② Allow fresh releases (once; if the key already exists, merge - dsh-better-sidebar under it instead)
|
|
116
|
-
Add-Content -Path pnpm-workspace.yaml -Value "`nminimumReleaseAgeExclude:`n - dsh-better-sidebar"
|
|
117
|
-
|
|
118
|
-
# ③ Install and auto-mount
|
|
119
|
-
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
78
|
+
dsh plugin --profile web add dsh-better-sidebar
|
|
120
79
|
```
|
|
121
80
|
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<details>
|
|
125
|
-
<summary><b>What the script does (technical details)</b></summary>
|
|
126
|
-
|
|
127
|
-
The one-click script does four things, all idempotent (safe to re-run):
|
|
128
|
-
|
|
129
|
-
1. Pre-writes `allowBuilds` (node-pty / protobufjs) to dodge pnpm 11's build-script block;
|
|
130
|
-
2. Pre-writes `minimumReleaseAgeExclude` to allow versions younger than 24 hours;
|
|
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`;
|
|
132
|
-
4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
|
|
133
|
-
|
|
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.
|
|
135
|
-
|
|
136
|
-
</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).
|
|
137
82
|
|
|
138
83
|
<details>
|
|
139
84
|
<summary><b>Updating</b></summary>
|
|
@@ -142,7 +87,7 @@ The one-click script does four things, all idempotent (safe to re-run):
|
|
|
142
87
|
dsh plugin --profile web add dsh-better-sidebar
|
|
143
88
|
```
|
|
144
89
|
|
|
145
|
-
or
|
|
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.
|
|
146
91
|
|
|
147
92
|
</details>
|
|
148
93
|
|
|
@@ -151,12 +96,13 @@ or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/pack
|
|
|
151
96
|
|
|
152
97
|
| Symptom | Cause & fix |
|
|
153
98
|
|---|---|
|
|
154
|
-
| `Ignored build scripts` | pnpm 11 blocked build scripts. Run `pnpm approve-builds --all`
|
|
155
|
-
| `minimum release age` / version `< 24h` | The release is younger than 24 hours. Wait, or re-run once (pnpm auto-adds `minimumReleaseAgeExclude`)
|
|
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`). |
|
|
156
101
|
| "profile directory not found" | Run `dsh web` once so it initializes `~/.dsh/profiles/web`. |
|
|
157
|
-
| 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
|
|
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. |
|
|
158
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. |
|
|
159
|
-
|
|
|
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`. |
|
|
160
106
|
|
|
161
107
|
</details>
|
|
162
108
|
|
|
@@ -177,7 +123,7 @@ To debug local changes or track the dev branch, point the dependency at a local
|
|
|
177
123
|
5. Restart DSH and hard-refresh
|
|
178
124
|
```
|
|
179
125
|
|
|
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.
|
|
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`.
|
|
181
127
|
|
|
182
128
|
</details>
|
|
183
129
|
|