Introduction¶
The DeepSeek Harness (DSH) web interface supports feature extension through plugins. dsh-session-mgr is a client-side plugin maintained by user mienfong, designed to address the inconvenience of session management in the web interface. It allows moving, archiving, restoring, backing up, and deleting sessions directly from the Settings page, and supports cross-workspace operations.
Core Features¶
The plugin provides the following capabilities:
- Move Sessions: Move any session (including archived sessions) to any workspace.
- Archive and Restore: Hide a session from the sidebar (archive) or unhide it (restore), while preserving its original position and order.
- Backup and Import:
- Backup: Generate a portable compressed archive (
.zipor.tar.gz) containingmanifest.json, full logs, and all attachments. - Import: Install a portable package into a specified workspace and reset the session’s
cwd(current working directory), enabling it to continue seamlessly on another machine.
- Backup: Generate a portable compressed archive (
- Delete Sessions: Permanently delete sessions with a red secondary confirmation dialog.
- Interface and Operations: Supports an interface in three languages (English, Simplified Chinese, and Traditional Chinese), and provides batch operations as well as quick action buttons in the title bar.
Installation and Enabling¶
This plugin must be installed in an environment that uses the Web profile. Run the following command:
dsh plugin --profile web add dsh-session-mgr
After installation, add the plugin to the startup list in the profile configuration (refer to the official documentation for the specific configuration item name) and restart the Web server to activate the plugin.
Usage¶
- Open Settings → Session Management.
- Sessions are grouped by workspace, and archived sessions are marked.
- Use the toolbar buttons to perform single or batch operations (move, archive, restore, backup, delete).
- In the title bar of an open session, click the “Move to Workspace” button to quickly operate on the current session.
- To switch between Chinese variants, use the Simplified/Traditional buttons in the toolbar (shown only when the Harness language is set to Chinese).
Technical Details and Limitations¶
- Cross-machine Migration Principle: Sessions are associated with a workspace through the
cwdvalue in the header, butcwdis a machine-specific absolute path. Therefore, after backing up, you must run Import on the target machine to resetcwdto an existing path before the session can continue to be used. - Version Compatibility: If the DSH version in a backup package is higher than the local version, unknown events are automatically marked as
ignorable: trueduring import, ensuring the session loads normally. - Performance and Memory: Backup and import operations are performed in memory; large attachments increase memory usage. Building the session list requires iterating over all sessions, but title reading has been optimized with caching.
- Safety Restrictions: Running sessions cannot be moved, archived, or deleted. Opened but idle sessions are unloaded before the operation. Deletion is irreversible.
Summary¶
dsh-session-mgr provides fine-grained control over sessions for DSH Web users. Through its backup and import mechanism, it addresses the pain point of cross-device data migration. Once installed and enabled, developers can manage all sessions directly from the Settings page, improving workflow efficiency.