Preface¶
The philosophy of DeepSeek Harness (DSH) is “everything is a plugin.” For developers using ZCode, accumulated sessions are often scattered across local databases, making it difficult to manage them uniformly in DSH. This plugin, through a settings page entry, provides a visual import workflow that converts ZCode sessions into native DSH sessions.
Core Features¶
- Settings page entry: Adds a “Session Import” page in the settings panel, at the same level as “General / Models / Plugins”.
- Workspace list: Automatically aggregates ZCode workspaces by
session.directory, displaying the number of sessions and the last update time; directories that have been deleted are highlighted in yellow. - Conversation list: After selecting a workspace, lists its conversations, including title, update time, message count, and an imported marker; sub-agent conversations are collapsed by default.
- Import options: Supports selecting any number of conversations for “Import Selected Sessions”, or one-click “Import Entire Workspace”.
- Progress and details: The import process displays a progress bar and the current title; after completion, each item is listed as “Imported / Already Exists / Skipped / Failed” with reasons.
- Complete content: All text, thinking, tool calls, and results are restored as DSH
tool/callandtool/resultevents. - Auto-create workspace: When the target directory does not exist in DSH, it is automatically created and mounted.
- Hot reload: After modifying
impl.js, changes take effect viaPOST /__reloadwithout restarting DSH.
Installation¶
The plugin is open-sourced under the MIT license.
dsh plugin --profile web add github:BaiZhi967/dsh-plugin-zcode-import
After installation, refresh the page and open Settings → Session Import.
Usage¶
- Open Settings → Session Import; the recognized ZCode data directory will be displayed at the top.
- Click a workspace in the left column.
- In the right column, select the conversations to import and click Import Selected Sessions; or directly click Import Entire Workspace.
- Wait for the progress bar to complete and check Import Details.
- After closing settings, the sessions will appear in the left list and can be opened, continued, archived, or deleted as usual.
Limitations and Notes¶
- Read-only mode: The ZCode database is opened in
readOnlymode; the plugin will not write, delete, or migrate ZCode original data. - Images and attachments: The
filetype parts in ZCode only retain filename placeholder text; binary attachments will not be transferred. - Model provenance: Imported assistant messages retain the
provider/modelnames recorded by ZCode as source labels. - Sub-agent sessions: Not listed by default (ZCode has many sub-agent sessions); add the
?includeSubagents=1parameter in API calls when needed. - Duplicate import: Session IDs are derived from ZCode UUIDs; duplicate imports will be identified as “Already Exists” and skipped.
- New sessions: What is imported are existing records in the ZCode database; conversations newly created by ZCode afterwards need to be imported again.
Ecosystem Background¶
This plugin is maintained by community developers and is listed in the SkillHub plugin directory. DSH itself does not provide an official plugin store; all plugins are maintained by the community.