返回目錄

dsh-plugin-better-sidebar-plugin-office

編輯精選維護狀態: 活躍

huanlinoto/dsh-plugin-better-sidebar-plugin-office

為 better-sidebar 提供 Office 三件套預覽(.docx/.xlsx/.pptx),獨立 bundle 瘦身主體 | Provides Office-suite preview (.docx/.xlsx/.pptx) for better-sidebar as a separate bundle to slim the core

前往 GitHub
$ dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office

36

星數

2

Fork

JavaScript

語言

NOASSERTION

授權條款

2026-08-12

建立於

2026-09-03

最近推送

原生 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

安裝步驟

  1. 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

  2. 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 整合程度與能力邊界

DSH 整合原生執行環境

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-sidebarFaithful in-browser render via docx-preview (styles / images / tables, Alt+wheel zoom)

  • Excel (.xlsx) viewer

    `.xlsx` file opened in better-sidebarUniver sheets preset (data + formulas + merged cells + column width / row height)

  • PowerPoint (.pptx) viewer

    `.pptx` file opened in better-sidebarBrowser-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.
2026-08-122026-09-03作者未說明

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 設定頁顯示為可單獨啟用/停用的卡片。

08資料與來源

  • 作者聲明github.comfbafdc6f8b1b…

    DSH web 插件:为 better-sidebar 的编辑器提供 Office 三件套文件预览(`.docx` / `.xlsx` / `.pptx`)。

  • 作者聲明github.comfbafdc6f8b1b…

    通过 `ctx.betterSidebar.registerFileViewer` 注册 3 个 viewer(id 与内置一致):

  • 作者聲明github.comfbafdc6f8b1b…

    dsh plugin --profile web add @huanlin/dsh-plugin-better-sidebar-plugin-office

此頁面根據專案公開文件、儲存庫中繼資料與 DSH Plugins 的結構化解析所產生;最後核實於 2026-09-03。發現錯誤?提交更正。

🏆

最佳 DeepSeek Harness 外掛

從全目錄挑出的 12 個值得優先安裝的外掛,涵蓋各個分類。

DSH Plugins 是獨立的 DeepSeek Harness 外掛市集,與 DeepSeek 官方無關,也不代表官方背書。第三方外掛未經安全稽核,安裝前請審查原始碼。

每週取得最新的 DeepSeek Harness 外掛,絕不濫發。