原生 DSH Web 外掛,在 better-sidebar 編輯器內預覽 Word / Excel / PowerPoint 檔案,並以獨立 bundle 形式讓核心保持精簡。
DSH 整合
原生執行環境
作者聲明
安全稽核
未稽核
最後核實
2026-09-03
授權條款
NOASSERTION
01它能幫你完成什麼?
Preview Office documents (.docx/.xlsx/.pptx) inside the better-sidebar file explorer
In-browser rendered viewers — docx-preview for Word, Univer sheets for Excel, @aiden0z/pptx-renderer for PowerPoint — auto-matched by file extension
better-sidebar users who receive Office attachments and want to preview them without leaving the editor
Keep the better-sidebar core client bundle small while still offering Office preview
Office renderers shipped as a separate plugin bundle instead of inlined into better-sidebar (~5.9MB full set → 2.2MB compressed)
better-sidebar operators/maintainers who want a slim core and let users opt into heavy viewers on demand
02如何將外掛接入 DeepSeek Harness?
先決條件
- better-sidebar `>= 0.6.0` (the release that removed the built-in office viewer); on older versions the plugin's `docx/xlsx/pptx` registration collides with the built-in one
- A DeepSeek Harness `web` profile — the plugin is added to `--profile web` and served by the `dsh web` process
安裝步驟
- 01
Run `dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office` to install the plugin into the web profile
$ dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office
- 02
Restart the `dsh web` process and hard-refresh the browser (`Ctrl+Shift+R`)
$ dsh web
驗證整合成功
- Confirm the plugin file exists: `Test-Path ~/.dsh/profiles/web/node_modules/@huanlin/dsh-plugin-better-sidebar-plugin-office/lib/client.js` should return True
- After restarting `dsh web` + hard refresh, open a `.docx`/`.xlsx`/`.pptx` from the sidebar — the preview should render normally
03DSH 整合程度與能力邊界
Native DSH web plugin: installed with `dsh plugin --profile web add` and registers file viewers through the `ctx.betterSidebar.registerFileViewer` API in the better-sidebar editor.
Word (.docx) viewer
`.docx` file opened in better-sidebar→Faithful in-browser render via docx-preview (styles / images / tables, Alt+wheel zoom)
Excel (.xlsx) viewer
`.xlsx` file opened in better-sidebar→Univer sheets preset (data + formulas + merged cells + column width / row height)
PowerPoint (.pptx) viewer
`.pptx` file opened in better-sidebar→Browser-native preview via @aiden0z/pptx-renderer with page navigation
Self-contained client component
registered viewer descriptor (mediaUrl strategy, priority 0, title/icon)→Viewers matching the original built-in descriptor shape, so existing file routing and the Side card toggle UI work unchanged
loads/renders failures fall back to a download link
04適合誰?何時不該用?
適合
- better-sidebar users who receive Office attachments and want to preview them without leaving the editor
- better-sidebar operators/maintainers who want a slim core and let users opt into heavy viewers on demand
不適合
- Requires better-sidebar `>= 0.6.0` (the release that removed the built-in office viewer); on older versions the plugin's `docx/xlsx/pptx` registration collides with the built-in one (`already registered`).
- Changing the versions of jszip / xlsx / pptx-renderer can reintroduce Node builtin references (SheetJS/JSZip CJS fallbacks, pptx-renderer's PDF.js probe); the client bundle must be verified to contain no Node builtin.
05相容性、維護與安全提醒
- Requires better-sidebar `>= 0.6.0` (the release that removed the built-in office viewer); on older versions the plugin's `docx/xlsx/pptx` registration collides with the built-in one (`already registered`).
- Changing the versions of jszip / xlsx / pptx-renderer can reintroduce Node builtin references (SheetJS/JSZip CJS fallbacks, pptx-renderer's PDF.js probe); the client bundle must be verified to contain no Node builtin.
- When a viewer fails to load or render, better-sidebar falls back to a download link instead of showing the preview.
NOASSERTION · not released as a git tag yet (latest_release: null); README references the npm package @huanlin/dsh-plugin-better-sidebar-plugin-office
06常見問題
如何在 DeepSeek Harness 中安裝這個外掛?
執行 `dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office` 將其加入 `web` 設定檔,接著重啟 `dsh web` 程序並硬重新整理瀏覽器(`Ctrl+Shift+R`)。
它支援預覽哪些檔案類型?
透過 `ctx.betterSidebar.registerFileViewer` 註冊三個預覽器:`docx`(docx-preview)、`xlsx`(Univer sheets)、`pptx`(@aiden0z/pptx-renderer)。在側邊欄開啟對應檔案時會依副檔名自動命中。
需要哪個版本的 better-sidebar?
需要 better-sidebar `>= 0.6.0`(已移除內建 office viewer 的版本)。在更早版本上,外掛的 `docx/xlsx/pptx` 註冊會與內建衝突並報 `already registered`。
為什麼做成獨立外掛而不是內建到 better-sidebar?
docx-preview / Univer / pptx-renderer 曾把 client bundle 撐到約 23MB。拆成本外掛後 better-sidebar 本體壓縮後約 2.2MB,需要 Office 預覽的使用者再單獨安裝。
預覽渲染失敗會怎樣?
載入/渲染失敗時會復原為「下載檢視」連結,且三個預覽器會在 Side card 設定頁顯示為可單獨啟用/停用的卡片。
07相關的 DSH 工作流程
dsh-web
作者 zhu1090093659
DeepSeek Harness(dsh)外掛聚合生態,萬物皆外掛,通過創意工坊分發。
petdex
作者 crafter-station
面向 Codex、Claude Code、DeepSeek Harness 等智慧體的動效寵物公共相簿。
j-space-cognition-suite-v3.7
作者 tiger3807861189
J-Space Cognition Suite V3.7 - AI cognitive-enhancement Skills based on Anthropic's J-space global workspace research. | 嗶哩嗶哩:Tiger380 (UID 3494375382321675) — https://space.bilibili.com/3494375382321675
dsh-deep-whale
作者 small-tailqwq
Whale Girl skin series for DeepSeek Harness. 適用於 DeepSeek Harness 的,鯨魚娘系列皮膚。
08資料與來源
DSH web 插件:为 better-sidebar 的编辑器提供 Office 三件套文件预览(`.docx` / `.xlsx` / `.pptx`)。
通过 `ctx.betterSidebar.registerFileViewer` 注册 3 个 viewer(id 与内置一致):
dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office
此頁面根據專案公開文件、儲存庫中繼資料與 DSH Plugins 的結構化解析所產生;最後核實於 2026-09-03。發現錯誤?提交更正。
最佳 DeepSeek Harness 外掛
從全目錄挑出的 12 個值得優先安裝的外掛,涵蓋各個分類。
