跪拜 Guibai
← Back to the summary

dsh-file-manager turns DeepSeek Harness workspaces into an editable file tree

File Management (dsh-file-manager)

A workspace file management plugin that runs inside DSH (DeepSeek Harness). The left sidebar provides an entry point, and the central panel lets you browse the current workspace's files, preview and edit text, and perform basic file/folder create, delete, and modify operations.

Plugin Info

Tech Stack

Layer Technology
Plugin framework DSH Cordis scoped bundle (cordis.patch.yml)
Host side ESM apply(ctx), registers 7 API routes via ctx.connection.fetch.register
File system Node.js fs/promises (readdir/stat/readFile/writeFile/mkdir/rename/rm), zero third-party dependencies
Path safety resolveRoot + inside() validation, all operations restricted to registered workspaces
HTTP requests Client uses fetch with credentials: same-origin, responses explicitly UTF-8 decoded to avoid Chinese garbled text
Client side Registered via window.__ModuleLoader__.load, React without JSX (React.createElement)
UI styling Injects <style> into components, uses DSH theme tokens, independent scroll container
i18n ctx.locale.register / bind, bilingual (zh / en)

Features

1. Workspace Browsing

2. File Preview

3. File Editing

4. File and Folder Operations

Host API Routes

All routes are prefixed with /api/dsh-file-manager/:

Route Method Description
meta GET Get registered workspace list
list GET List directory contents (root + path)
read GET Read text file (supports encoding parameter)
mkdir POST Create folder (root + parent + name)
write POST Write/create file (root + path + content)
rename POST Rename (root + path + name)
remove POST Delete (root + path, recursive for directories)

Security and Limitations

Directory Structure

dsh-file-manager/
├── package.json          # Manifest (scoped package name), bundle config, client injection declaration
├── cordis.patch.yml      # Loader insertion line
├── index.js              # Host side: 7 file operation routes
├── client.js             # Client side: UI, file list, editing, scrolling, styles
├── locale/
│   ├── zh.json           # Chinese display metadata
│   └── en.json           # English display metadata
├── icon.svg              # Plugin icon
├── README.md             # English documentation
└── README.zh.md          # This document (Chinese)

Installation and Usage

  1. Install via the plugin manager

    1.1 Install from GitHub URL: https://github.com/gougou1993/dsh-file-manager.git

image.png

1.2 Install via npm package name: @oakzhong/dsh-file-manager

image.png

  1. Click "File Management" in the left sidebar
  2. Select a workspace, browse directories, click a file to preview
  3. Use the toolbar buttons to create files/folders, and the list item icons on the right to rename or delete
  4. Interface overview

image.png