dsh-better-workspace-file-manager
为工作区「文件」标签页和文件预览添加上传、下载、新建文件夹、删除、拖拽移动、拖入对话,以及支持自动保存的原地文本编辑。
安装
dsh plugin --profile web add dsh-better-workspace-file-manager
沙箱测试
这个插件还没测过。提交测试 →
README
Better Workspace File Manager
<p align="center">
<img src="icon.svg" width="72" height="72" alt="Better Workspace File Manager icon">
</p>
A file manager for the DeepSeek Harness (DSH) Web Files tab and the file preview panel. It adds the everyday file operations the shipped tree leaves out — upload, multi-select, download as a ZIP, new folder, delete, drag-to-move, drag-to-chat, and in-place text editing — without modifying the shipped Files tab's DOM.
Features
Files tab
- Upload by button, drag-and-drop from the computer, or a dropped folder (recreated recursively, keeping both copies on a name clash).
- Multi-select with click, ⌘/Ctrl-click, Shift-click, or a marquee drag over empty tree space.
- Download one file, several selected items, or a whole folder as a ZIP. Archives are streamed, so large folders are not held in memory.
- New folder from the right-click menu, with keep-both naming for folders created on your behalf.
- Delete files and folders after a confirmation dialog. Directories are removed with everything inside them.
- Drag to move rows onto a folder. A name already taken at the destination becomes
name (1).ext, never an overwrite. - Drag workspace rows into a conversation to add
@pathchips, or image attachments for PNG/JPEG/WebP/GIF.
File preview
- Download in the preview's opening menu, next to the shipped Open / Show location actions.
- Edit text files in place for the text, code, and Markdown viewers. The editor keeps the file's line endings (LF/CRLF) and byte-order mark, and saves through a version guard: if the agent or another editor changed the file meanwhile, the save reports a conflict instead of overwriting it.
- Save manually with the Save button (or ⌘/Ctrl-S), or turn on auto-save every 5 seconds in Settings.
Settings
The plugin contributes a Text editing → Auto-save row to the Plugins settings page. The choice is stored by the DSH Settings service, not in browser storage.
Requirements
- DSH Web profile, version 0.2.1-rc.3 or newer. Verified against:
0.2.1-rc.30.2.1-rc.50.2.2-rc.1- A Host-local filesystem backend (
fs-local/fs-sandbox), which is what Web profiles mount. - Node.js 20.15+ on the Host (the plugin uses the built-in Web Streams bridge; DSH itself may require a newer Node).
Install
From the DSH Plugins page
Open Plugins in the sidebar, find Better Workspace File Manager, and install or enable it. The page adds the package to the current profile and enables its bundle.
From the profile manifest
Install the package in the profile and add it to the ordered bundle list:
cd ~/.dsh/profiles/web pnpm add dsh-better-workspace-file-manager
{
"dependencies": {
"dsh-better-workspace-file-manager": "^1.3.0"
},
"dsh": {
"profile": {
"bundles": [
"@deepseek-ai/dsh-base",
"@deepseek-ai/dsh-web-app",
"dsh-better-workspace-file-manager"
]
}
}
}
Restart DSH (or let a live profile recompose) after changing the profile.
Usage
Selecting and acting on rows
Gesture · Result
Click a row · Selects it, then opens or toggles the row as usual
⌘/Ctrl-click · Adds or removes that row from the selection
Shift-click · Selects the range from the last anchor
Drag from empty tree space, or Alt-drag anywhere · Draws a selection box
Right-click a row or empty tree space · Opens the file menu
Drag rows onto a folder · Moves them there
Drag rows onto the composer · Adds file/folder references or image attachments
Escape · Clears the selection, or cancels an active box/drag
Right-click menu
The menu adapts to what was clicked:
- Files — Download, Delete (and, on DSH 0.2.1, the plugin's own menu).
- Folders — Download as ZIP, New folder, Delete.
- Several selected items — Download N items as ZIP, Delete N items.
- Empty tree space — New folder in the folder under the pointer.
Editing text
1. Open a text, code, or Markdown file in the preview panel.
2. Press Edit in the preview header.
3. Change the text. Press Save (manual mode) or wait for the 5-second auto-save (Settings).
4. Press Done to leave the editor. Unsaved manual edits ask before closing.
Edits are limited to the Session workspace. A preview outside the workspace stays read-only.
Compatibility notes
DSH 0.2.2 introduced a shared right-click menu (@deepseek-ai/dsh-client-ui-context-menu) and shipped file actions. The plugin detects that service at runtime:
- On 0.2.2+, rows use the shared menu. The plugin contributes Download as ZIP / Download N items, New folder, and Delete to it. A single file's Download stays with the shipped file-actions plugin, so there is no duplicate entry. The plugin's own overlay is still used for right-clicking empty tree space.
- On 0.2.1, where the shared menu does not exist, the plugin keeps its own right-click menu and all of its actions.
The integration is discovered through the contextMenus service; the plugin does not declare a hard dependency on the 0.2.2-only client packages, so the same build loads on 0.2.1 and 0.2.2.
How it works
- Host half (
index.js) registers authenticated Connection Fetch routes under/api/better-workspace-files. Every path resolves throughctx.fs.resolve+ctx.fs.contains, so symlinks that leave the workspace are refused. Moves and deletes act on the entry itself, not on what a symlink points at. - Browser half (
client.js) is one prebuilt client module. It reads the shipped Files tree through its stabledata-files-*attributes and renders all of its own UI from its own slot entries. It never mutates the shipped tab's rows. - Downloads are split into a validation step (
POST selection/file-ticket) that returns a short-lived ticket, then a plainGET download?ticketthat the b
…(truncated)
以上内容来自 npm 上的 README,我们只做格式化,不改内容。
版本
npm 上共发布:2,最后更新 2026-11-04