DeepSeek Harness (DSH) adopts an “everything-is-a-plugin” architecture. Browsing local files directly in the web interface is a common requirement. fsviewer takes over DSH’s native right-hand details pane and provides a Codex-style file tree and preview workspace.

This is a client plugin maintained by sunyuhuirong. It adds right-pane file management capabilities to DSH Web, including a directory tree, file preview, and side chat.

Installation and Configuration

  1. Clone the plugin source code into the specified directory:
   git clone https://github.com/sunyuhuirong/fsviewer.git YOUR_PLUGIN_PATH
  1. Edit the DSH Web profile’s package.json to add the dependency and configuration:
   {
     "dependencies": {
       "fsviewer": "link:YOUR_PLUGIN_PATH"
     },
     "dsh": {
       "profile": {
         "bundles": ["@deepseek-ai/dsh-base", "@deepseek-ai/dsh-web-app", "fsviewer"]
       }
     }
   }
  1. Enter the profile directory and install dependencies:
   cd ~/.dsh/profiles/web && pnpm install
  1. Restart dsh web to apply the configuration.

Core Features

  • Takeover of the native right pane: rendered inside DSH’s native details column (priority -10 shadow registration), consistent with the layout/theme; when the plugin is disabled, the native tool details automatically restore.
  • Directory tree + file list: Host routes actual directory and file listings (including type badges and hidden-item markers), with lazy loading and name filtering.
  • File preview: Markdown files are rendered using the official MarkdownText component with source-code switching; text files display source code; binary or oversized files show a notice and provide “open with system”.
  • Multiple file tabs: open files are presented as tabs, supporting switching and closing.
  • Copy content: the preview area supports one-click copying of the full file content.
  • Breadcrumb + smart default root: the default root first uses the current session working directory (cwd), falling back to the most recent workspace; the breadcrumb supports back navigation.
  • Complete workspace isolation: tabs, file tree expansion state, tree pane toggle and width, browser tabs, and side chat (including history) are all stored independently by workspaceId; switching workspaces switches the entire panel and restores state in place.
  • Session file reference redirection: intercepts workspaces.openPath; clicking a file within a session opens it directly in this panel for preview instead of launching the system picker.
  • Light/dark theme adaptation: all colors use DSH theme variables.

Typical Usage

  1. Enter any session, click the “right pane” icon button to the right of the Session log export button at the top; the panel takes over the native right-hand details pane and slides in.
  2. Right file tree pane: click ▸ to expand a directory, click a directory name to enter it; the filter box filters by name; drag the left edge to adjust the tree pane width (120–320px); click the folder icon to collapse/expand the tree pane.
  3. File preview: after clicking a file, the left preview area renders its content. Markdown files can switch between “View source / Rendered view”; text files display source code; binary or oversized files show a notice and provide “⧉ Open” to open with a system application.
  4. Action buttons: the top “⧉ Open” button opens the current file with the system default application; the “⤢” button toggles between default width (360px) and widened width (520px).
  5. Reference redirection: click a file reference in a session (such as a path produced by a tool), and it is redirected to this panel for preview.
  6. Close panel: click the top button again (or the × on the “Open file” pseudo-tab inside the panel) to collapse the panel; switching sessions automatically collapses it.

Applicable Scenarios and Caveats

  • Security notice: the Host side reads any local absolute path directly via Node fs through the /fsviewer-api route, with no authentication (same level as DSH’s native browse directory backend). Do not use this in multi-user or network-exposed environments.
  • Known limitations:
  • A single directory lists at most 1000 items; additional items are truncated.
  • File preview is capped at 1MB; excess content is truncated for display, and binary content is not returned.
  • “Select directory” uses DSH’s native directory picker, whose behavior is affected by the profile’s directory-picker backend configuration.

Summary

fsviewer addresses the need to manage local files directly in DSH Web. By taking over the native UI, it provides an immersive file browsing experience, and its workspace isolation mechanism ensures state management in multi-session scenarios.