Introduction¶
The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” For text-based Agents, if the interface consists solely of a chat area, viewing workspace files, editing text, and referencing file paths within messages requires additional operations.
dsh-file-explorer is an MIT-licensed plugin maintained by cxzrdxy. It equips DSH’s text-based Agents with a “file browser”: it opens the current workspace directory tree in the bottom right corner and provides a “Preview/Edit” tab on the same level as “Chat” and “Trace,” allowing file viewing, text editing, and path referencing to be completed within the chat interface.
What is it¶
One-sentence positioning: Provides a file browser for DeepSeek Harness’s text-based Agents.
It targets developers using the DSH Web profile, addressing the need to quickly view workspace files, preview text and images, edit text, create or delete files, and insert file paths into messages during conversation.
Core Features¶
File Tree¶
- Open the current workspace directory tree via the button in the bottom right corner; it can be expanded layer by layer.
- The root path of the file tree follows the current session’s
cwdand refreshes after switching workspaces. - The current workspace itself, i.e., the tree root directory, cannot be deleted.
Preview and Edit¶
- The “Preview/Edit” tab is on the same level as “Chat” and “Trace.”
- Automatically switch to the “Preview/Edit” tab upon clicking a file.
- Text files can be edited in the preview tab, supporting Save (Ctrl+S), Undo (Ctrl+Z), and Redo (Ctrl+Y).
- Double-clicking a file in the file tree directly enters edit mode.
- Text files and images can be previewed; text file limit is 512 KB, image limit is 8 MB.
- Other binary files only display size hints and do not preview content.
Drag and Drop to Insert into Message¶
- Supports dragging files or directories from the file tree into the message input box, automatically inserting the file path.
- Dragging into the message box only supports dragging out from file tree nodes; browsers cannot obtain the absolute path of files from the operating system’s file manager.
Create and Delete¶
- Supports creating new files in the workspace root directory.
- Supports creating new files within a directory by hovering over the directory row and clicking the plus sign on the right side of that row.
- Supports deleting files or folders; folder deletion uses DSH’s native style confirmation popup and deletes recursively.
- The server always refuses to delete the file system root path.
- Non-empty directories are rejected when the recursive flag is not provided.
- Creating a new file rejects overwriting files with the same name and returns 409.
Security Restrictions¶
The plugin provides security restrictions such as same-origin checking, path normalization, and entry/byte limits. Delete and create operations also follow these restrictions to prevent accidental deletion, overwriting, and unauthorized access.
Installation and Activation¶
Requires DeepSeek Harness’s Web profile and pnpm. The following lists the local path installation method provided in the documentation:
git clone https://github.com/cxzrdxy/dsh-file-explorer.git
cd dsh-file-explorer
dsh plugin --profile web add file:.
After installation, restart the Web profile. The package includes pre-compiled lib/; installing from a checkout does not require the consumer to build.
Typical Usage¶
- Open the file tree: Click the button in the bottom right corner.
- View files: Click a file, and automatically switch to the “Preview/Edit” tab to view the content.
- Edit text: Click the “Edit” button, or double-click the file in the file tree to enter edit mode directly.
- Save file: Click “Save” or press Ctrl+S after editing.
- Reference file path: Drag a file from the file tree into the message input box; release the mouse to automatically insert the file path into the message text.
- Create a new file in the workspace root directory: Click the plus sign in the panel header, enter the file name, and press Enter.
- Create a new file in a specific directory: Hover over a directory row, click the plus sign on the right side of that row, and create a file in that directory.
- Delete a file: Hover over a file row, click the delete button, and confirm to delete the file.
- Delete a folder: Hover over a directory row (excluding the tree root), click the delete button, check the confirmation box, and recursively delete the folder.
Use Cases and Considerations¶
Suitable for the following situations:
- Using the DSH Web profile and wanting to view workspace files directly within the chat interface.
- Needing to quickly preview text, images, and edit text files.
- Needing to quickly insert file paths into messages to reduce manual path entry.
- Needing to perform lightweight create and delete operations within the current workspace.
Please note:
- The plugin runs with the permissions of the current
dshprocess, allowing access to workspace files and performing create, delete, and other operations. It is recommended to check the source code and license before installing. - Dragging and dropping to insert into messages only supports dragging out from file tree nodes; files cannot be dragged from the operating system’s file manager.
- The current workspace itself cannot be deleted; the server always refuses to delete the file system root path.
- When the recursive flag is not provided, delete operations will reject non-empty directories.
- Creating a new file will reject overwriting files with the same name and return 409.
- The text preview limit is 512 KB, and the image preview limit is 8 MB; other binary files only display size hints.
Related Links¶
- GitHub: https://github.com/cxzrdxy/dsh-file-explorer
- Directory Page (Plugin Link): https://www.skillhub.cn/plugins/cxzrdxy/dsh-file-explorer