dsh-better-sidebar 0.11.0 → 0.12.1
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 +30 -13
- package/README_EN.md +31 -14
- package/lib/client-editor.js +174 -182
- package/lib/client-registry.js +989 -482
- package/lib/client-terminal.js +172 -180
- package/lib/client.js +984 -477
- package/lib/index.js +14 -23
- package/lib/types/bundle-route.d.ts +4 -5
- package/lib/types/client/RenderBoundary.d.ts +32 -0
- package/lib/types/client/SideCardSection.d.ts +35 -1
- package/lib/types/client/TabBar.d.ts +3 -0
- package/lib/types/client/add-plugin-modal.d.ts +15 -0
- package/lib/types/client/builtins/viewers.d.ts +1 -1
- package/lib/types/client/chunk-loader.d.ts +7 -5
- package/lib/types/client/icons.d.ts +0 -6
- package/lib/types/client/index.d.ts +7 -0
- package/lib/types/client/locales.d.ts +13 -11
- package/lib/types/client/plugins-shared.d.ts +24 -0
- package/lib/types/client/plugins-tabs.d.ts +3 -0
- package/lib/types/client/plugins-viewers.d.ts +3 -0
- package/lib/types/client/service.d.ts +145 -13
- package/lib/types/client/split-pane.d.ts +1 -0
- package/lib/types/client/state.d.ts +18 -3
- package/lib/types/context-types.d.ts +43 -16
- package/lib/types/index.d.ts +2 -2
- package/lib/types/prefs-shared.d.ts +9 -0
- package/lib/types/wire.d.ts +5 -5
- package/package.json +6 -11
- package/scripts/install.ps1 +14 -5
- package/scripts/install.sh +1 -1
- package/src/bundle-route.ts +5 -6
- package/src/client/EditorHost.tsx +5 -2
- package/src/client/RenderBoundary.tsx +49 -0
- package/src/client/SideCardSection.module.css +215 -0
- package/src/client/SideCardSection.tsx +245 -18
- package/src/client/Sidebar.tsx +69 -16
- package/src/client/TabBar.tsx +28 -3
- package/src/client/add-plugin-modal.tsx +154 -0
- package/src/client/builtins/viewers.tsx +21 -47
- package/src/client/chunk-loader.ts +7 -5
- package/src/client/icons.tsx +0 -27
- package/src/client/index.tsx +14 -40
- package/src/client/locales.ts +26 -22
- package/src/client/plugins-shared.ts +26 -0
- package/src/client/plugins-tabs.ts +27 -0
- package/src/client/plugins-viewers.ts +23 -0
- package/src/client/prefs.ts +18 -0
- package/src/client/service.ts +314 -24
- package/src/client/sidebar.module.css +32 -145
- package/src/client/split-pane.tsx +10 -3
- package/src/client/state.ts +63 -6
- package/src/config.ts +5 -0
- package/src/context-types.ts +47 -14
- package/src/html-route.ts +10 -1
- package/src/index.ts +20 -24
- package/src/prefs-shared.ts +10 -0
- package/src/wire.ts +8 -6
- package/lib/client-docx.js +0 -7667
- package/lib/client-pptx.js +0 -63456
- package/lib/client-xlsx.js +0 -359773
- package/lib/types/client/PptxView.d.ts +0 -6
- package/lib/types/client/chunks/docx.d.ts +0 -8
- package/lib/types/client/chunks/pptx.d.ts +0 -8
- package/lib/types/client/chunks/xlsx.d.ts +0 -9
- package/lib/types/client/docx-view.d.ts +0 -8
- package/lib/types/client/office-shared.d.ts +0 -33
- package/lib/types/client/office-types.d.ts +0 -36
- package/lib/types/client/office-view.d.ts +0 -12
- package/lib/types/client/xlsx-to-univer.d.ts +0 -33
- package/lib/types/client/xlsx-view.d.ts +0 -10
- package/src/client/PptxView.tsx +0 -131
- package/src/client/chunks/docx.tsx +0 -8
- package/src/client/chunks/pptx.tsx +0 -8
- package/src/client/chunks/xlsx.tsx +0 -9
- package/src/client/docx-view.tsx +0 -113
- package/src/client/office-shared.tsx +0 -40
- package/src/client/office-types.ts +0 -48
- package/src/client/office-view.tsx +0 -12
- package/src/client/xlsx-to-univer.ts +0 -260
- package/src/client/xlsx-view.tsx +0 -116
package/README.md
CHANGED
|
@@ -18,16 +18,20 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
18
18
|
|
|
19
19
|
## 🆕 最近更新
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 预览盘符路径 | |
|
|
25
29
|
|
|
26
30
|
## ✨ 功能一览
|
|
27
31
|
|
|
28
32
|
- **🗂️ 资源管理器**:懒加载目录树(根 = 会话 cwd),点击打开、`@文件` 引用、右键复制路径
|
|
29
33
|
- **📝 编辑与预览**:CodeMirror 6 编辑(Ctrl/Cmd+S 原子保存,切 Tab 不丢草稿);图片 / Markdown / HTML / PDF / Word / Excel / PPT 内联预览(HTML 走沙箱 iframe)
|
|
30
|
-
- **⚡ 客户端懒加载**:启动只拉 ~325KB
|
|
34
|
+
- **⚡ 客户端懒加载**:启动只拉 ~325KB 核心,终端 / 编辑器等重依赖用到才按需拉取(详见 `docs/plans/2026-08-12-lazy-chunks-design.md`)
|
|
31
35
|
- **🌐 浏览器**:多开内嵌网页 tab,后退/前进/刷新;内容运行在沙箱 iframe(无法访问界面数据与本地文件,拒绝本机地址),可临时解锁(红色警示);被站点拒绝嵌入时显示原因;外链默认在侧边栏打开
|
|
32
36
|
- **💻 终端**:xterm.js + node-pty 真实 shell、断线重连回放;可选为模型注入 `terminal_*` 工具;支持自定义字体(字体族 + 9–32px 字号,实时生效)
|
|
33
37
|
- **🌿 Git 面板**:真 diff + VSCode 式 diff tab、历史、右键暂存/提交/还原等
|
|
@@ -37,7 +41,8 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
37
41
|
- **🔧 分栏工作台**:拖 Tab 拆分/合并(可跨面板)、分隔线调比例;右上角按钮一键折叠/展开面板
|
|
38
42
|
- **🔁 会话隔离**:布局 / Tab / 面板状态按会话持久化,陈旧状态自动净化;「产出文件」在侧边栏打开
|
|
39
43
|
- **⚙️ 声明式设置**:设置页「侧边卡片」按注册表渲染开关网格,逐项独立开/关;二级设置(自动展开、终端工具、沙箱等)经齿轮弹窗编辑
|
|
40
|
-
- **🔌
|
|
44
|
+
- **🔌 服务化(基座)**:暴露 `ctx.betterSidebar`,其他插件可注册 tab 与文件预览器(内置 7 tab + 9 viewer 同走一服务);v0.12.1 起支持角标/生命周期回调/状态订阅/定向打开/插件自有设置(见 [AGENTS.md](./AGENTS.md) 与 [外部插件接入指南](./docs/external-plugin-guide.md))
|
|
45
|
+
- **➕ 添加插件**:设置页「侧边卡片」两个网格(侧边栏内容 / 文件预览)末尾的虚线卡片分别打开 Tab / 预览插件弹窗:声明扩展点、「在 GitHub 上浏览更多插件」按钮、推荐插件目录(「跳转」直达仓库、「复制」安装命令到剪贴板);弹窗不打开终端、无失败路径,不阻塞启动与侧边栏
|
|
41
46
|
- **🌏 多语言**:界面文案跟随 DSH 语言(zh/en)实时切换,无需刷新
|
|
42
47
|
|
|
43
48
|
## 🚀 安装
|
|
@@ -63,10 +68,10 @@ irm https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/
|
|
|
63
68
|
|
|
64
69
|
```sh
|
|
65
70
|
# macOS / Linux
|
|
66
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.
|
|
71
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.1 --restart
|
|
67
72
|
|
|
68
73
|
# Windows PowerShell
|
|
69
|
-
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.
|
|
74
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.1 -Restart
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
不确定的话,可先加 `--dry-run`(PowerShell 用 `-DryRun`)预览步骤再执行。
|
|
@@ -92,7 +97,7 @@ minimumReleaseAgeExclude:
|
|
|
92
97
|
- dsh-better-sidebar
|
|
93
98
|
EOF
|
|
94
99
|
|
|
95
|
-
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.
|
|
100
|
+
# ③ 安装并自动挂载(不带 @版本 = npm 的 latest;固定版本写 dsh-better-sidebar@0.12.1)
|
|
96
101
|
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
97
102
|
```
|
|
98
103
|
|
|
@@ -123,7 +128,7 @@ npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sideba
|
|
|
123
128
|
3. 执行 `dsh plugin --profile web add dsh-better-sidebar`:登记依赖 → 识别包内 `dsh.bundle.patch` → 自动注册进 `dsh.profile.bundles` 挂载;
|
|
124
129
|
4. 清理旧版残留的手动挂载行,避免「双挂载」(页面出现两个侧边栏)。
|
|
125
130
|
|
|
126
|
-
`curl | bash` / `irm | iex` 会执行远程代码——脚本已随仓库开源(`scripts/install.sh` / `scripts/install.ps1`),可先下载审阅。插件以 npm 包 `dsh-better-sidebar@0.
|
|
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 源码**。
|
|
127
132
|
|
|
128
133
|
</details>
|
|
129
134
|
|
|
@@ -169,7 +174,7 @@ dsh plugin --profile web add dsh-better-sidebar
|
|
|
169
174
|
5. 硬刷新浏览器(Cmd/Ctrl+Shift+R)即可看到效果(client 改动无需重启 DSH;host 半改动才需重启)
|
|
170
175
|
```
|
|
171
176
|
|
|
172
|
-
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.
|
|
177
|
+
更新:`git pull && pnpm install && pnpm build` → 硬刷新浏览器即可(client 改动热加载生效,无需重启 DSH;host 半改动才需重启)。切回 npm 通道时,把依赖改回 `"dsh-better-sidebar": "^0.12.1"` 再 `pnpm install`。
|
|
173
178
|
|
|
174
179
|
</details>
|
|
175
180
|
|
|
@@ -215,7 +220,17 @@ export function apply(ctx: Context) {
|
|
|
215
220
|
}
|
|
216
221
|
```
|
|
217
222
|
|
|
218
|
-
|
|
223
|
+
v0.12.1 补齐基座能力(完整类型导出、能力探测、状态订阅、tab 角标、生命周期回调、定向打开、插件自有设置等),详见下方接入文档。
|
|
224
|
+
|
|
225
|
+
完整接入文档:
|
|
226
|
+
- **[`AGENTS.md`](./AGENTS.md)**——仓库内维护的接入文档(全字段、匹配算法、HMR 陷阱、声明式设置、版本探测);
|
|
227
|
+
- **[`docs/external-plugin-guide.md`](./docs/external-plugin-guide.md)**——面向外部插件开发者的接入指南(含完整最小示例)。
|
|
228
|
+
|
|
229
|
+
### ➕ 添加插件(推荐插件目录)
|
|
230
|
+
|
|
231
|
+
设置页「侧边卡片」两个网格末尾的**虚线卡片**分别打开 Tab / 预览插件弹窗:声明扩展点、「**在 GitHub 上浏览更多插件**」按钮([GitHub topic `dsh-better-sidebar`](https://github.com/topics/dsh-better-sidebar))、推荐插件目录(名字 / 仓库 / 简介 / 安装脚本),每个条目「**跳转**」直达仓库、「**复制**」把安装命令写入剪贴板。
|
|
232
|
+
|
|
233
|
+
**收录新插件**:向 [`src/client/plugins-tabs.ts`](./src/client/plugins-tabs.ts)(Tab 注册)或 [`src/client/plugins-viewers.ts`](./src/client/plugins-viewers.ts)(文件预览注册)追加一条 `PluginEntry`,并把仓库打上 `dsh-better-sidebar` topic;数据完整性由 `tests/plugin-list.spec.ts` 守护。
|
|
219
234
|
|
|
220
235
|
## 🛠️ 开发与构建
|
|
221
236
|
|
|
@@ -239,7 +254,7 @@ pnpm watch # tsdown --watch
|
|
|
239
254
|
|
|
240
255
|
- Git 无 push/pull/fetch;无文件 watcher(手动刷新);工具行内文件打开按钮不可拦截
|
|
241
256
|
- 终端 Tab 拖到另一分栏会重挂载(shell 重开)
|
|
242
|
-
-
|
|
257
|
+
- Office 三件套预览(.docx/.xlsx/.pptx)已移至「推荐插件」(Office 预览插件,见设置页「添加插件」弹窗);未安装时此类文件走代码/下载查看兜底
|
|
243
258
|
- 浏览器沙箱无登录态/第三方 Cookie 受限,部分站点登录需走弹窗;被 `X-Frame-Options`/`frame-ancestors` 拒绝嵌入的站点(如 arxiv.org)显示原因面板(含「在浏览器中打开」);iframe 内部跳转不进后退栈
|
|
244
259
|
- HTML 预览渲染的是已保存文件(不反映未保存草稿)
|
|
245
260
|
- 移动端(<768px)无底部面板:进入窄屏时其标签页一次性并入右侧栏(迁移后回桌面仍保留在右侧栏),桌面端的底部面板只在宽视口下可用;移动端底部首展自动开终端不触发
|
|
@@ -251,3 +266,5 @@ Windows / Linux / macOS 三平台适配(macOS 日常验证;其余经单元
|
|
|
251
266
|
## 🔗 友情链接
|
|
252
267
|
|
|
253
268
|
- [dsh-tianshu-tui](https://github.com/huiliyi37/dsh-tianshu-tui):DeepSeek Harness 交互式终端 UI 插件(渲染核心由自研 harness agent Tianshu-Tui 演进而来),在官方基础上增加 TDD 与证据门等工作流
|
|
269
|
+
- [dsh-TUI](https://github.com/ccch1mneyyy/dsh-TUI):Claude Code 风格全屏交互终端插件——像素鲸鱼顶栏、实时工作状态行、思考流式展开、双击 Esc 回滚、上下文进度条 + TPS 仪表,npm 一键安装
|
|
270
|
+
- [dshfind 插件超市](https://dshfind.com/zh/plugins):三方插件市场——GitHub topic `dsh-plugin` 下的公开仓库清单,每日同步 star、贡献者与增长数据
|
package/README_EN.md
CHANGED
|
@@ -18,16 +18,20 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
18
18
|
|
|
19
19
|
## 🆕 Recent Updates
|
|
20
20
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
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 | |
|
|
25
29
|
|
|
26
30
|
## ✨ Features
|
|
27
31
|
|
|
28
32
|
- **🗂️ File Explorer**: lazy-loading directory tree (root = session cwd), click to open, `@file` reference, right-click to copy path
|
|
29
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)
|
|
30
|
-
- **⚡ Client-side Lazy Loading**: only ~325KB core at startup; heavy deps (
|
|
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`)
|
|
31
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
|
|
32
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)
|
|
33
37
|
- **🌿 Git Panel**: real diff + VSCode-style diff tabs, history, right-click to stage/commit/revert etc.
|
|
@@ -37,7 +41,8 @@ https://github.com/user-attachments/assets/23187822-047e-45cc-b480-fe997bd55b86
|
|
|
37
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
|
|
38
42
|
- **🔁 Session Isolation**: layout / tabs / panel states persisted per session, stale state auto-purged; "produced files" open in the sidebar
|
|
39
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
|
|
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))
|
|
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
|
|
41
46
|
- **🌏 i18n**: UI text follows DSH's language setting (zh/en) with live switching, no refresh needed
|
|
42
47
|
|
|
43
48
|
## 🚀 Installation
|
|
@@ -63,10 +68,10 @@ Then **hard-refresh the browser** (Cmd/Ctrl+Shift+R) to see the sidebar (DSH hot
|
|
|
63
68
|
|
|
64
69
|
```sh
|
|
65
70
|
# macOS / Linux
|
|
66
|
-
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.
|
|
71
|
+
curl -fsSL https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.sh | bash -s 0.12.1 --restart
|
|
67
72
|
|
|
68
73
|
# Windows PowerShell
|
|
69
|
-
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.
|
|
74
|
+
& ([scriptblock]::Create((irm 'https://raw.githubusercontent.com/omdsh-dev/DSH-better-sidebar/main/scripts/install.ps1'))) -Version 0.12.1 -Restart
|
|
70
75
|
```
|
|
71
76
|
|
|
72
77
|
Not sure? Add `--dry-run` (`-DryRun` in PowerShell) to preview before running.
|
|
@@ -92,7 +97,7 @@ minimumReleaseAgeExclude:
|
|
|
92
97
|
- dsh-better-sidebar
|
|
93
98
|
EOF
|
|
94
99
|
|
|
95
|
-
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.
|
|
100
|
+
# ③ Install and auto-mount (no @version = npm's latest; pin with dsh-better-sidebar@0.12.1)
|
|
96
101
|
npx -y --package @deepseek-ai/dsh dsh plugin --profile web add dsh-better-sidebar
|
|
97
102
|
```
|
|
98
103
|
|
|
@@ -123,7 +128,7 @@ The one-click script does four things, all idempotent (safe to re-run):
|
|
|
123
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`;
|
|
124
129
|
4. Removes any leftover hand-written mount line to avoid double-mounting (two sidebars on the page).
|
|
125
130
|
|
|
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.
|
|
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.
|
|
127
132
|
|
|
128
133
|
</details>
|
|
129
134
|
|
|
@@ -134,7 +139,7 @@ The one-click script does four things, all idempotent (safe to re-run):
|
|
|
134
139
|
dsh plugin --profile web add dsh-better-sidebar
|
|
135
140
|
```
|
|
136
141
|
|
|
137
|
-
or re-run the one-click script; or bump the version in `~/.dsh/profiles/web/package.json` (e.g. `"^0.
|
|
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.
|
|
138
143
|
|
|
139
144
|
</details>
|
|
140
145
|
|
|
@@ -169,7 +174,7 @@ To debug local changes or track the dev branch, point the dependency at a local
|
|
|
169
174
|
5. Restart DSH and hard-refresh
|
|
170
175
|
```
|
|
171
176
|
|
|
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.
|
|
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`.
|
|
173
178
|
|
|
174
179
|
</details>
|
|
175
180
|
|
|
@@ -215,7 +220,17 @@ export function apply(ctx: Context) {
|
|
|
215
220
|
}
|
|
216
221
|
```
|
|
217
222
|
|
|
218
|
-
|
|
223
|
+
v0.12.1+ base capabilities (complete type exports, capability detection, state subscription, tab badge, lifecycle callbacks, targeted open, plugin-owned settings, etc.) — see the integration docs below.
|
|
224
|
+
|
|
225
|
+
Full integration docs:
|
|
226
|
+
- **[`AGENTS.md`](./AGENTS.md)** — the in-repo integration doc (full fields, matching algorithm, HMR pitfalls, declarative settings, version detection);
|
|
227
|
+
- **[`docs/external-plugin-guide.md`](./docs/external-plugin-guide.md)** — the external-plugin guide (with a complete minimal example).
|
|
228
|
+
|
|
229
|
+
### ➕ Add Plugins (recommended plugin catalog)
|
|
230
|
+
|
|
231
|
+
The dashed cards at the end of the "Sidebar content" / "File viewers" grids in the "Side Cards" settings section open the **Add tab plugins** / **Add preview plugins** modals: each declares its open extension point, offers a "**Browse more plugins on GitHub**" button (the [GitHub topic `dsh-better-sidebar`](https://github.com/topics/dsh-better-sidebar)), and lists the recommended catalog (name / repo / description / install script) — "**Open**" jumps to the repo, "**Copy**" writes the install command to the clipboard.
|
|
232
|
+
|
|
233
|
+
**Curating a new plugin**: append a `PluginEntry` to [`src/client/plugins-tabs.ts`](./src/client/plugins-tabs.ts) (tab registrations) or [`src/client/plugins-viewers.ts`](./src/client/plugins-viewers.ts) (file-previewer registrations) and tag your repo with the `dsh-better-sidebar` topic; data integrity is guarded by `tests/plugin-list.spec.ts`.
|
|
219
234
|
|
|
220
235
|
## 🛠️ Development & Build
|
|
221
236
|
|
|
@@ -239,7 +254,7 @@ pnpm watch # tsdown --watch
|
|
|
239
254
|
|
|
240
255
|
- Git has no push/pull/fetch; no file watcher (manual refresh); tool inline file-open buttons cannot be intercepted
|
|
241
256
|
- Dragging a terminal tab to another pane remounts it (shell restarts)
|
|
242
|
-
-
|
|
257
|
+
- Office-suite preview (.docx/.xlsx/.pptx) moved to the recommended office plugin (see the "Add plugins" modals in settings); without it these files fall through to the code/download fallbacks
|
|
243
258
|
- Browser sandbox has no login state / third-party cookies are restricted; some sites need popup login; sites that refuse embedding via `X-Frame-Options`/`frame-ancestors` (e.g. arxiv.org) show a reason panel (with "Open in browser"); in-iframe navigation does not enter the back stack
|
|
244
259
|
- HTML preview renders the saved file (not unsaved drafts)
|
|
245
260
|
- No bottom panel on mobile (<768px): on narrow screens its tabs merge into the right sidebar once (after migrating back to desktop they stay in the right sidebar); the desktop bottom panel is only available on wide viewports; auto-open terminal on first bottom-panel expand does not trigger on mobile
|
|
@@ -251,3 +266,5 @@ Windows / Linux / macOS (macOS validated daily; the rest covered by unit tests);
|
|
|
251
266
|
## 🔗 Friends
|
|
252
267
|
|
|
253
268
|
- [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
|
+
- [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
|
+
- [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
|