Preface¶
The ecosystem philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” When developing or debugging agents, file operations are a common requirement. Developers need to browse workspace files, view the results generated in the current session, and pass file paths to the AI for analysis without leaving the DSH interface. The dsh-file-preview plugin provides these fundamental capabilities.
Plugin Overview¶
This plugin is maintained by developer ld-1101 and licensed under the MIT License. It is a client plugin that provides services through host-side routing. Main features include: browsing workspace files in the left sidebar, previewing Markdown/PDF/images/CSV/code text, displaying files generated or modified by the AI in the current session, and dragging files into the conversation to insert their paths.
Installation and Enablement¶
The plugin has not yet been published to npm. Please install it from local source.
- Clone the repository:
git clone https://github.com/ld-1101/dsh-file-preview.git
-
Configure it in the
package.jsonfile under your DSH profile directory:
* Add the following to thedependenciesfield:
"dsh-file-preview": "file:<absolute path after cloning>"
* Append the following to thedsh.profile.bundlesarray:
"dsh-file-preview" -
After installing dependencies, completely quit and restart the DSH application.
Core Features¶
Left Sidebar and File Browsing¶
The plugin adds a “📁 Files” button to the bottom of the DSH left sidebar. When clicked, the file list panel expands on the right (the conversation area automatically yields space). The panel width can be adjusted by dragging between 320px and 900px, and it supports width memory. Double-click the left-edge handle of the panel to restore the default width.
Session Output File List¶
The top of the panel lists files generated or modified by the AI in the current session. This data comes from tool/result events in the session event log, extracting locations[].path. The list supports switching sessions. After switching, it automatically locates the workspace directory for that session.
Dragging into Conversation¶
You can drag a file or folder to any position in the session interface (without needing to align with the input box). The plugin intercepts the drop event and inserts a single-line plain path at the cursor position in the input box. After sending, the AI can read the file contents under that path.
Preview Capabilities¶
Clicking any file causes the plugin to render it within the panel:
* Supported formats: Markdown (rendered), PDF (embedded), images, CSV (table), code text.
* Unsupported formats: Clicking opens them in a new tab, and the browser determines the display method.
Security Restrictions¶
- Workspace isolation: The plugin can only access workspaces registered in DSH. Paths outside a workspace (including path traversal attempts) are always denied.
- Text read limit: Text reading is limited to 5 MiB. Files larger than this size are truncated, and a notice is shown in the panel.
Usage¶
- Open the file panel: Click the “📁 Files” button at the bottom of the left sidebar to expand the file list panel.
- View session outputs: Switch sessions using the dropdown at the top of the panel to view the list of files modified in the current session.
- Browse directories: Use breadcrumb navigation or click directory items to browse the workspace tree structure.
- Adjust width: Hold and drag the left-edge handle of the panel to adjust its width.
- Insert a file path: Drag a file or folder directly to the area above the conversation input box. A single-line path string appears at the cursor position.
- Preview a file: Click a file in the file list to render an instant preview in the panel.
Notes¶
- npm publication status: Currently, only local source installation is supported, and the
dsh plugin addcommand is not available yet. - Empty session output list: If the agent performs file operations through wrapper tools such as
run_code(which do not generate alocationsfield), the list will be empty. This is platform behavior and is consistent with DSH native deliverables. - Text truncation: Text files larger than 5 MiB are truncated. Please check the notice in the panel.
- Platform limitations: The plugin relies on the client injection mechanism of the Web shell, and is currently mainly for the Web platform.
Ecosystem and Links¶
This plugin is an open-source project. The repository includes 25 client unit tests, smoke tests, and integration tests. For more details, visit:
* GitHub repository
* Community directory