Che-Year/dsh-unidoc
DSH 插件 - 用于处理非结构化文档 (Unstructured Document Processing)
Project Overview项目介绍
This is a native plugin built exclusively for DeepSeek Harness that adds a full-screen VSCode-style document center workspace to DSH’s web GUI. It supports previewing and editing dozens of common file formats, including code files with syntax highlighting, Markdown with split edit-preview mode, images, PDFs, Jupyter Notebooks, and common office documents. It also registers three AI agent tools: doc_read for reading files, doc_edit for atomic string replacement, and doc_create for creating new files, all with path validation to prevent directory traversal.
Once activated, the plugin adds a small icon-only entry at the bottom of DSH’s sidebar. Clicking the entry opens the full-screen document center, which features a lazy-loaded file tree on the left and a preview/edit panel on the right. The file tree supports one-click expand all/collapse all for all directories including hidden ones, and automatically maps file icons by extension. Users can configure a list of external editors to open files directly from the preview panel, and the plugin remembers your last used editor by default.
The plugin is released under the MIT license, and retains all original copyright notices from the upstream dsh-better-sidebar project it is based on. You can install it directly as a DSH profile dependency via npm, or build it from source for local development and debugging. It comes with 42 automated tests to verify root directory resolution and workspace switching behavior, and follows DSH development guidelines that avoid modifying any official DSH source code.
这是一款专为 DeepSeek Harness 开发的原生插件,在 DSH 的网页图形界面中提供了类似 VSCode 的文档中心工作台。它支持多种常见格式文件的预览和编辑,包括代码、Markdown、图片、PDF、Jupyter 笔记本和常见办公文档,不支持的格式也会显示友好提示。同时它还为 AI 代理暴露了三个文档操作工具,允许模型通过自然语言安全读写当前会话工作区的文档。
激活后,插件会在 DSH 侧边栏底部添加一个纯图标入口,点击即可打开全屏文档中心工作台。工作台左侧为带懒加载的文件树,支持一键展开/折叠全部目录(包括隐藏目录),按文件扩展名自动匹配对应图标;点击文件即可在右侧面板打开预览或编辑,支持 Ctrl/Cmd+S 快速保存,适合需要在 DSH 中统一管理和预览工作区文档的开发者与文档写作者。
插件采用 MIT 许可证发布,复用了 dsh-better-sidebar 的架构能力,保留了上游完整的版权声明与许可条款。安装方式灵活,既可以直接作为 DSH profile 依赖通过 npm 安装,也可以本地构建后动态部署调试。插件自带 42 项根目录解析自动化测试,所有路径操作都经过安全校验,可彻底杜绝目录穿越风险。
请帮我安装这个 DSH 插件。安装前先完成【兼容性检查 + 安全性检查】,检查通过再动手。
插件:dsh-unidoc(Che-Year/dsh-unidoc)
仓库:https://github.com/Che-Year/dsh-unidoc
本站详情页:https://www.yhbd.top/plugins/che-year-dsh-unidoc/
本站登记:类型 plugin · 归类 原生 DSH 插件 · 许可证 NOASSERTION · ⭐ 2 · 最近提交 2026-08-23 · 主语言 JavaScript
按下面顺序执行,每步先把结论告诉我,再进入下一步:
【1 兼容性检查】
① 我这边:DSH 版本、Node 版本、操作系统、当前 profile(web / desktop)。
② 读它的 README、package.json、插件 manifest,列出它要求的 DSH 版本 / Node 版本 / 操作系统 / 外部依赖 / 需要另外先装的运行时。
③ 逐条比对,结论只写「满足 / 不满足 / 未知」三种;不满足的给出可行替代方案。
④ 检查是否和我已装的插件冲突:命令名重复、skill / tool 重名、端口占用、重复注册的 MCP server。
【2 安全性检查】
① 仓库可信度:和上面「本站登记」是否一致;star / fork 数、创建时间、最近提交,是否归档或长期停更。
② 安装脚本:逐行看 package.json 的 preinstall / install / postinstall,以及 install.sh、setup.ps1 之类脚本。出现 curl|bash、下载后直接执行、混淆代码、访问与插件功能无关的域名,立刻停下来告诉我,不要继续装。
③ 依赖:列出新增依赖,标出无人维护、或与知名包拼写近似的可疑包(typosquatting)。
④ 权限与副作用:它会读写哪些目录、访问哪些域名、需要哪些 DSH 权限(filesystem / network / shell / clipboard 等),以及怎么卸载和回滚。
⑤ 如果它要求 sudo / 管理员权限,或权限明显超出功能所需,先停下来问我。
【3 安装】
上面两步没有「不满足」和「高危项」时才执行;用官方推荐方式安装,不要自行提权。
【4 汇报】
用表格输出:检查项 / 结论 / 依据 / 是否需要我决策。拿不准的一律写「未知」并说明要我怎么确认——不要猜,也不要替我决定。
Send this message to DSH in your current session: it verifies compatibility and security first (answering met / not met / unknown item by item) and only installs once everything checks out — it will stop and ask you if it finds a high-risk item. The box scrolls; the copy is the full prompt. CLI install commands may not be accurate across systems, so DSH is the safer route.把上面这条消息直接发给当前会话里的 DSH:它会先核对兼容性与安全性(逐条给「满足 / 不满足 / 未知」),确认没问题再安装,有高危项会停下来问你。框内可滚动,复制到的是完整提示词;安装命令不一定准确,发给 DSH 更稳。
- Only 2 stars - very few users, little community feedback星标只有 2,几乎没人在用,遇到问题缺少社区反馈
DSH walks through these 9 checksDSH 会逐条核对这 9 项
Compatibility兼容性
- DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
- External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
- Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册
Security安全性
- Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
- Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
- curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
- Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
- Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
- Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式
Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。
Or use CLI install (for developers)或使用命令行安装(适合开发者)
CLI Install命令行安装
dsh plugin --profile web add github:Che-Year/dsh-unidoc
把 Che-Year/dsh-unidoc 加入你的 DSH 配置(web profile)即可启用。
READMEREADME
dsh-unidoc — 通用文档中心(Universal Document Center)
🌐 中文 | English
DeepSeek Harness 的文档预览 / 编辑 / 管理插件。在 DSH Web GUI 中提供一个 VSCode 风格的「文档中心」工作台:左侧文件树,点击即预览,代码与 Markdown 支持编辑与
Ctrl/Cmd+S保存;同时为 Agent 暴露doc_read/doc_edit/doc_create三个文档工具,让模型可以通过自然语言读写工作区文档。
功能总览
1. 文件预览与编辑(验收标准对照)
| 类别 | 格式 | 实现方式 |
|---|---|---|
| 办公文档(只读) | .docx .xlsx .pptx |
元数据 + 「暂不支持在线预览」友好提示卡(Office 预览内核未加载) |
| 代码与配置 | .py .java .go .rs .cpp .c .js .ts .jsx .tsx .json .yaml .yml .toml .xml .ini .conf 等 |
轻量语法高亮(关键词/字符串/注释/数字)+ 编辑 + Ctrl/Cmd+S 保存 + Tab 缩进 + 括号自动配对 |
| 标记语言与富文本 | .md .html |
Markdown:编辑/预览双模式,预览渲染标题/列表/代码块/表格/图片,支持相对图片与相对链接跳转;HTML:沙箱预览(CSP 禁脚本 + iframe sandbox 属性双重隔离)+ 源码视图 + 新标签页打开(unidoc.openExternal) |
| 静态资源与版式 | .png .jpg .jpeg .gif .svg .webp .pdf |
图片自适应缩放;PDF 内嵌浏览器查看器(翻页/缩放由浏览器原生提供) |
| 数据科学(探索性) | .ipynb |
只读 Notebook 预览:Markdown 单元渲染 + 代码单元高亮 + 文本输出 |
| 纯文本兜底 | .log .csv .txt 及任意未归类文本 |
CSV 渲染为表格;其余以只读纯文本打开——未知扩展名绝不崩溃 |
| 明确不支持 | 音视频(.mp4 .mp3 等)、iWork(.pages .numbers .key)、CAD(.dwg)、OpenPencil(.op) |
UI 给出友好「暂不支持预览」提示与文件信息 |
2. 界面入口
- 侧边栏底部「📝 铅笔文件」图标按钮(
sidebar.footer.action,纯图标无文字,Font Awesomefa-file-pen)——打开/关闭工作台; - 全屏工作台(
shell.overlay):- 顶部显示标题与当前工作区根目录路径(自动识别当前 DSH 会话工作区,切换 Agent / 会话时自动感知——打开时先刷新根目录并重载文件树,运行期每 5s 感知切换;每次上报「当前选中会话」工作区作为权威信号(
hintCwd),切换到任意工作区(含早已创建的历史会话)都能精确命中,不再残留旧根;切换后文件树完全重置:清空缓存、重置展开状态、选中路径与滚动位置到根目录、关闭预览,顶部路径与文件树内容始终一致); - 左侧为文件区:
- 文件树顶部显示工作区根目录;文件树支持懒加载、点击目录展开/折叠、文件大小,文件图标按扩展名映射 Font Awesome 标准图标(代码/文档/图片/PDF/Office/压缩包/音视频等);
- 「展开全部」:一键递归展开工作区全部目录(含
.git、.github、.vscode、node_modules等隐藏目录),异步分批加载并每层让出主线程,超大仓库不卡页面;**「折叠全部」**一键收起并释放缓存; - 刷新 / 展开全部 / 折叠全部 / 选项 / 关闭操作键统一排列在文件区下方(左下角),从布局上避免与其他插件悬浮按钮(如 better-sidebar 的折叠侧边栏图标)在右上角位置重合;
- 右侧为预览/编辑面板:所有视图工具栏均有「外部打开」按钮(点击 → 浮现编辑器选择菜单 → 选择 → 跳转打开,并记住上次选择的编辑器),HTML 预览另有「新标签页」按钮(
window.openraw 路由 URL);
- 顶部显示标题与当前工作区根目录路径(自动识别当前 DSH 会话工作区,切换 Agent / 会话时自动感知——打开时先刷新根目录并重载文件树,运行期每 5s 感知切换;每次上报「当前选中会话」工作区作为权威信号(
- 运行卡片(
tool.view.cordis):显示插件激活状态与一键打开按钮; - Toast 反馈:加载 Loading 状态、保存成功/失败提示;
- 选项面板(会话级内存配置,从文件区下方「⚙ 选项」键向上弹出):代码编辑开关、Markdown 双模式开关、「暂不支持」提示卡开关、外部编辑器列表(增删改,自定义名称与命令,默认 VS Code / Sublime Text / Atom / Notepad++ / Vim / Neovim / Typora)。
Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →
yogsoth-ai/de-anthropocentric-research-engine
ZSeven-W/dsh-openpencil
HanaAyane/dsh-reasoning-effort
HuanLinOTO/dsh-plugin-better-sidebar-plugin-office
joeseesun/qiaomu-rss-dsh