Introduction¶
When developing agents or scripts in DeepSeek Harness (DSH), the workspace often contains files such as PDFs, Office documents, images, archives, CAD drawings, or 3D models. The default workflow often involves downloading these to the local machine and opening them with system software, which interrupts the workflow within the browser. The community plugin dsh-open-file-viewer (Maintainer: wenhongquan, Category: Client) integrates universal preview capabilities into the DSH Web sidebar. Based on the npm package @open-file-viewer/core, it renders various formats directly in the right sidebar without requiring local disk storage first.
The following sections cover the plugin’s positioning, capability boundaries, installation methods, and its division of labor with dsh-better-sidebar.
What is this¶
dsh-open-file-viewer is a universal file preview plugin for the DSH right sidebar. It claims dsh-resource://file/** resources through the client module system, reads workspace file bytes in pages within the browser, and passes them to various format renderers for display. The repository’s build artifacts are committed with Git, so the plugin is ready to use immediately after installation without needing a local build (unless you intend to modify the source code).
The plugin is for read-only preview: editing and saving text-based files should be handled by the CodeMirror editor in dsh-better-sidebar. This plugin does not occupy editable scenarios.
Supported Formats and Preview Capabilities¶
The README lists main extensions by category, covering common office and engineering scenarios:
| Category | Representative Formats |
|---|---|
| Images | png, jpg, jpeg, gif, webp, avif, svg, bmp, ico, tif/tiff, heic/heif |
| Video / Audio | mp4, webm, mov, mp3, wav, ogg, aac, flac, m3u8, etc. |
| Documents | pdf, epub, doc/docx, xls/xlsx, ppt/pptx, csv, odt, wps, etc. |
| Text / Code | txt, md, json, yaml, xml, js/ts, py, go, rs, java, html, css, etc. (50+) |
| Archives | zip, rar, 7z, tar, gz, tgz, bz2, xz |
| eml, msg, mbox | |
| Drawing / Mind Maps | drawio, dio, excalidraw, tldraw, xmind |
| CAD / Engineering | dxf, dwg, step/stp, iges/igs, ifc, skp, gds/gdsii, etc. |
| 3D Models | gltf, glb, obj, stl, fbx, dae, ply, 3mf, usd, usdz |
| GIS | geojson, topojson, kml, kmz, gpx, shp |
| Assets | ttf, otf, woff/woff2, psd, ai, eps |
The preview toolbar supports zoom, rotate, fullscreen, and download; PDFs additionally support printing and full-text search. PDF rendering uses the bundled built-in pdfjs and does not depend on external CDNs.
Installation and Version Requirements¶
The official recommendation is to install directly from GitHub (--profile web indicates the Web browser sidebar environment):
dsh plugin --profile web add https://github.com/wenhongquan/dsh-open-file-viewer.git
It requires DSH 0.1.7-rc.1 or higher and must run in the Web (browser) sidebar. The current version in package.json is 0.1.0, and the license is MIT.
If you need to install from source and build locally, the README provides steps for cloning, building with pnpm, and adding local paths; general users can simply follow Method 1.
Typical Usage¶
- Complete the installation described above and restart or refresh the DSH Web client (follow the plugin activation method of your current DSH).
- Open or select a supported file in the workspace; the plugin claims the
dsh-resource://file/**address as anextensionpriority tab type and opens the preview panel in the right sidebar. - Use the toolbar for zooming, rotating, fullscreen, or downloading; PDFs support printing and full-text search.
When dsh-better-sidebar is not installed, all files entering via the native tab claiming system are handled by this plugin, and functionality remains unaffected.
Collaboration with dsh-better-sidebar¶
If dsh-better-sidebar is installed simultaneously, this plugin registers a previewer via its registerFileViewer extension point. The division of labor is as follows:
- Binary formats such as 3D, CAD, GIS, media, archives, email, and drawings: Rendered within this plugin when opened from the better-sidebar file tree, replacing the “cannot preview / download” fallback page.
- Images, PDFs, spreadsheets, Office documents (better-sidebar’s concession list): Still claimed by the system, and this plugin renders them using native tabs.
- Text, code, Markdown, HTML: Left to the editable editor in better-sidebar; this plugin does not take over these.
How it Works (Briefly)¶
- Registers an
extensionpriority tab with the client via thedsh.clientmanifest and mounts the preview panel. - File bytes are read in pages via the host’s
remote.workspaceFiles.readBytes(2 MiB window) and passed to the respective format plugins for rendering within the browser. - Activates only after waiting for the
remote.workspaceFilesnamespace to be ready, avoiding activation races with remote assembly.
In terms of dependencies, the runtime core consists of @open-file-viewer/core (0.1.49 in the README’s package.json) and pdfjs-dist.
Use Cases and Notes¶
Suitable for: Quickly viewing workspace attachments, documents, models, and GIS data within the DSH Web environment, reducing the need to switch to local software.
Notes:
- The plugin reads workspace files under the permissions of the current DSH process; please read the repository source code and the MIT license before installation to ensure it meets your security and compliance requirements.
- Only supports the Web sidebar profile; combinations with pure terminal or non-Web clients depend on your actual DSH version.
- The community directory SkillHub Plugin Page and the GitHub repository are maintained by the community and have no official affiliation with DeepSeek or High-Flyer; the DSH ecosystem follows “everything is a plugin,” and the installation source is subject to the README.
Links¶
- Community Directory: https://www.skillhub.cn/plugins/wenhongquan/dsh-open-file-viewer
- Source Code & Documentation: https://github.com/wenhongquan/dsh-open-file-viewer