原生 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 个值得优先安装的插件,覆盖各个分类。
