Introduction¶
As a plugin platform, DeepSeek Harness (DSH) has limitations in its native workspace and session management, including cumbersome operations and restricted file interaction during intensive use. This plugin is released as a standard DSH plugin package and uses an overlay patch set to override 17 official bundles, enhancing session lifecycle management, file processing flows, and workspace sandbox capabilities. It aims to provide developers with more flexible session archiving, cross-workspace migration, and comprehensive file preview and Git operation support.
Core Features¶
Session Recycle Bin and Archiving¶
The plugin takes over the default behavior of session.delete and workspace.delete, turning them into soft deletion (moving items to the recycle bin).
* Soft deletion: Deletion only marks a session or workspace and does not immediately remove physical files.
* Permanent deletion: Physical deletion must be performed through the recycle bin UI by calling session.purge or workspace.purge.
* Session merging: New sessions already include the full workspace context. The plugin removes the original session merging feature, and the related buttons have been removed.
Workspace and Session Management¶
- Cross-workspace dragging: Supports dragging a session row directly onto another workspace row or the “Ungrouped” group. The relationship is persisted, while the session’s own directory and logs remain unchanged.
- Ungrouped workspace: Sessions created by the top “New Session” button are assigned to the “Ungrouped” group by default. This group is always displayed.
- Multiple folder mounting: Each workspace can mount multiple root directories (
additionalPaths), and sandbox permissions are synchronized across all mounted root directories. - Folder and file sections: The workspace sidebar is divided into two sections. The upper section is the folder area (blue background, listing the main directory and additional directories). The lower section is the file area (purple background, listing shared files or an empty-state prompt). The Ungrouped area does not render these two sections.
File Interaction and Preview¶
- Upload methods: Supports pasting (Ctrl+V) or dragging files into the file area. Files are written to the workspace
.dsh-uploads/directory viaworkspace.importFiles(duplicate names are automatically numbered, and single files must be ≤5MB). - Session files: Files pasted into a session are mounted with the session ID and displayed as green blocks (with a left vertical accent line). The title format is “Session files · N files · session title”. File rows support removal and preview.
- Attachment limits relaxed: Pasted or dragged files in any format can be added as attachments (images still use the image pipeline). Binary files are only marked as
[Attachment filename], and size limits apply only to transmitted content. - Built-in selector: On Windows, uses an in-app browsing-style selector (including a drive list) instead of the native dialog.
- Multi-selection support: The “+” button in the folder/file section title bar opens a multi-select browser, supporting checkbox multi-selection and retaining selections across directories.
File Preview Panel¶
Clicking a file in the sidebar folder tree slides out a 520px preview panel on the right.
* Rendering capability: The content is rendered using Markdown.
* Code highlighting: Supports syntax highlighting for .md files and 30+ code file types (.js/.ts/.vue/.java/.py/.xml/.yml/.css/.html, etc.).
* Limitations: Content is provided by the server-side host.readFile RPC, restricted to the workspace root directory, with a maximum of 256KB. Binary files are rejected for preview.
Folder Git Panel¶
In the folder area, Git repository folder rows display the current branch chip and three-color status dots:
* 🟡 Yellow = uncommitted changes
* 🔵 Blue = behind remote
* 🟢 Green = in sync with remote
Clicking the chip opens a menu that supports switching branches, creating branches, updating code (git pull --ff-only), and pushing code (automatic staging, AI-generated Chinese commit message, commit, and push). All operations directly affect the workspace files on disk.
Installation and Activation¶
Prerequisites¶
Ensure DeepSeek Harness is installed (target version @deepseek-ai/dsh@0.1.0-rc.6, Windows).
Installation Steps¶
Use npm to install the plugin into the DSH profiles directory. After installation, the postinstall script automatically applies the overlay patch set.
npm install --prefix "$env:USERPROFILE\.dsh\profiles" dsh-workspace-enhance
Activation and Effectiveness¶
After installation, restart the DSH service and refresh the browser page to make the patches take effect.
# 重启 DSH 服务(具体命令视宿主方式而定,如 npx -y @deepseek-ai/dsh web)
# 浏览器 Ctrl+Shift+R 强刷
Patch Mechanism Description¶
- Idempotency: The plugin host side automatically checks and applies the overlay each time it loads. Files that have already been patched will not be processed repeatedly.
- Persistence: The overlay is written to disk using a “delete then copy” approach, breaking hard links to the official package. Even if the service is restarted with
npx -y @deepseek-ai/dsh weband the official package is re-fetched, applied patches are not overwritten. - Version guard: The overlay only matches
@deepseek-ai/dsh@0.1.0-rc.6. If another version is detected, it is skipped with a warning. Directly overriding a new bundle will break runtime behavior. - Automatic recovery: If patches are lost due to an official package refresh or DSH upgrade, they will be automatically restored.
Notes and Compatibility¶
- Version lock: The current plugin is compatible only with
@deepseek-ai/dsh@0.1.0-rc.6(Windows). After upgrading DSH, the overlay patches must be updated accordingly; otherwise, features may fail or cause errors. - Directory permissions: The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installation.
- Rollback: If issues occur, verification or rollback can be performed using the provided scripts.
Ecosystem Links¶
- GitHub: yuanzehui313/dsh-workspace-enhance
- Plugin directory: dsh-workspace-enhance