Introduction¶
The plugin system of DeepSeek Harness (DSH) allows developers to attach various capabilities as modules to the desktop shell. However, in practice, conversation history accumulated on the web (chat.deepseek.com) often cannot be directly imported into the desktop session library, requiring manual export or copy-paste, which is inefficient. The dsh-chat-migrate plugin provides a panel that directly migrates web-based conversation titles and message content into DSH, or exports them as Markdown and JSON files.
What It Is¶
dsh-chat-migrate is a memory-type DSH plugin maintained by kxx-python. It opens a migration panel via the “Web Chat Migration” entry in the left sidebar, supporting token retrieval from a logged-in chat.deepseek.com session, fetching the conversation list, filtering records, and importing selected conversations as DSH sessions (real sessions), or exporting them as Markdown + JSON files.
Core Features¶
1. Account Login¶
The panel offers two login methods:
- Grab from current login: Click “Grab from Browser” — the panel displays a line of code. Copy it and paste it into the Console of a logged-in chat.deepseek.com tab, then press Enter. The token is delivered back to the local panel via
POST /chat-migrate/api/token. The panel polls for it, then automatically validates and logs in — no manual token copying required. - Paste token manually: Directly paste the web token into the input field on the right. Optionally specify a service address (defaults to
https://chat.deepseek.com). Clicking “Login” first validates against/api/v0/users/current. The token is stored only in host memory, becomes invalid after a restart, and is never persisted to disk.
2. Conversation List & Filtering¶
- Refresh list: Fetches conversation titles and timestamps page by page.
- Export selected: Fetches messages one by one and writes a JSON archive to the downloads directory. Default path is
~/Downloads/dsh-chat-migrate/dsh-chat-migrate-<timestamp>.json. - Download & open: “Save to Local” triggers a browser download of the archive; “Open Folder” hands the containing directory to the system file manager.
- Conversation filtering: Supports keyword search (title / session ID), update time (All / Last 7 days / Last 30 days / Custom range), minimum message count, and import status (All / Not imported / Imported), combined with “Select All Current Results”. Filter controls use segmented buttons to avoid the white-on-white issue of native dropdowns under dark themes.
3. Import as Session (Real Session)¶
Check the desired conversations and click “Import as Session” — the plugin writes them directly as DSH sessions:
- Generates seed events following the construction pattern of
@deepseek-ai/dsh-deepseek-chat-import:turn/start,step/start, emptysystem/messageheader,user/message,assistant/message,step/end,turn/end,session/title. - First runs the same seed validation via
Session.create(), then writes throughsessionPersistence, callssessionProjectionCache.coldSnapshot()to refresh the title and other summaries, and finally callsattachSessionto mount into the workspace. - The session is written directly into the session library, but the sidebar list won’t show the new entry until the UI is reloaded. The panel includes a “Reload UI” button; the most reliable approach is to finish all imports and then restart DSH.
4. Import as Files¶
Check the desired conversations and click “Import as Files” — only files are written to disk:
- Each conversation generates a
<title>__<id>.md(full Markdown) and a same-named.json. - Import location is selectable:
Workspace→<workspace>/chat-imports/<date>/,Downloads, orCustom. - No new session entries are created. Ideal for simply archiving chat records as files.
5. Offline Import & Demo Data¶
- Import from exported file: Accepts
conversationsJSON in this plugin’s or the official export format. - Load demo data: Writes three clearly labeled demo conversations for UI preview. No network access required.
Boundary Notes¶
- Only writes to the downloads directory (configurable in the panel). Does not touch DSH’s session logs and does not fabricate DSH sessions.
- Web API paths follow
/api/v0/chat_session/fetch_pageand/api/v0/chat/history_messages. If the API changes, the panel displays the raw error rather than silently succeeding. - Login state and the conversation list reside in host memory. After a host restart, you must log in again and refresh.
Installation & Enablement¶
The plugin is published as a public package and can be installed via the official plugin manager. Before installing, ensure the host environment meets the following requirements:
- Node.js version >= 20
- Plugin version 1.1.1 (MIT License)
After installation, the plugin is automatically injected into the client and adds a “Web Chat Migration” entry to the left sidebar.
Typical Usage¶
- Open the “Web Chat Migration” panel in the left sidebar.
- Click “Grab from Browser”, copy the console code, paste it into the chat.deepseek.com Console, and press Enter to complete automatic login.
- Click “Refresh List” to fetch the conversation list.
- Use the filter conditions to select the conversations you want to migrate.
- To see new sessions appear in the sidebar, click “Import as Session”; to only export files, click “Import as Files”.
- After import is complete, restart DSH or click “Reload UI” to refresh the sidebar list.
Use Cases & Cautions¶
- Suitable for developers who need to transfer web-accumulated conversations to the desktop for continued use or archiving.
- The plugin runs with the current DSH process privileges. It is recommended to review the source code and license before installing.
- Note that login state and the conversation list are stored in host memory. A restart requires re-login and refresh.
Summary¶
dsh-chat-migrate provides a migration path from the web to the desktop: it can import conversations directly as real DSH sessions, or export them as Markdown and JSON files. For users who prefer the web interface but need a complete desktop session library, this plugin reduces the manual copying and organizing workload.