Introduction¶
DeepSeek Harness (DSH) follows an “everything is a plugin” architecture: capabilities are extended through plugins, which also share sessions and tools. In practice, developers often want to separate “casual chat” from their “workspaces”: chat logs shouldn’t clutter project directories, yet there’s a desire for unified session management, search, and historical archiving. dsh-chat-lite is a plugin designed precisely for this use case.
Plugin Positioning¶
- Maintainer: wth373737
- Category: Client
- Core value: Adds a daily chat area to DSH, providing a desktop sidebar panel and a mobile page installable as a PWA, along with a self-managed history library (grouping, full-text search, attachments).
Core Features¶
Desktop & Mobile¶
- Desktop side: Open a chat panel in the DSH sidebar; conversations are stored in a dedicated directory, keeping them out of your workspace. Supports month/year grouping in the history library, full-text search, inline attachments, and resuming conversations.
- Mobile side: A standalone page under
/chat-lite/m/, installable as a PWA (independent window, no address bar). Supports Tailscale for access outside the local network.
Conversation & Message Management¶
- Conversation list: DSH sessions mixed with the self-managed history library, grouped by “Today / Yesterday / 7 days / 30 days / Earlier.” Load more history at the bottom.
- Conversation actions: The inline
⋯menu supports renaming, pinning, and deleting (archiving). Pinning is server-authoritative. - Message stream: Streaming output, collapsible thinking, token usage display, expandable tool calls (arguments + results).
- Message actions: Copy, edit (fork from a previous segment and resend), read aloud (grayed out), regenerate, branch, delete the segment.
Documents & Attachments¶
- Sending: Text + up to 4 images (auto-compressed to 1600px on the long edge, JPEG 0.85) + regular files.
- Document reading: Text-based files are inlined (<200KB); PDFs have text extracted and reconstructed; docx/pptx/xlsx are unzipped to extract XML text; images go through the official attachment channel; scanned PDFs cannot have text directly extracted, and the user is prompted to send a screenshot instead.
- Supported file types:
.txt .md .json .csv .logand common code extensions: decoded and inlined directly.pdf: zlib decompression of FlateDecode streams, lines reconstructed via positioning operators.docx: zip +word/document.xml.pptx: zip +ppt/slides/slideN.xml.xlsx: zip +sharedStrings.xml+ worksheets
Search & History¶
- Search: Dual tabs for “Title / Full-text.” Full-text search scans chunks from newest to oldest, stopping once enough matches are found.
- Read-only history: Clicking a history entry opens a read-only view; “Continue Conversation” at the bottom creates a new session based on it.
Offline & Appearance¶
- Offline: Service Worker caches the app shell + API responses and images from the last 3 days.
- Appearance: Font size in 5 steps from 90%–130%, with saved preference. Follows system light/dark mode.
Connection & Pairing¶
- The mobile port is set via the
mobilePortconfig (default 8787), a fixed port. Changes to DSH’s own port do not affect this one. - One-time pairing: Token is exchanged for a device Cookie, valid for one year. The settings panel shows device count, access address, cache clearing, and re-pairing.
- Device limit is 20; supports revoking all devices and resetting the token with one click.
Installation & Enablement¶
Install from GitHub¶
In DSH, open “Plugins → + Add Plugin” and enter:
github:wth373737/dsh-chat-lite
After installation, restart DSH once.
Install from a Local Directory (for development)¶
dsh plugin --profile desktop add link:<absolute-path-to-this-directory>
After installation, two config entries need to be added:
- chat-lite — the plugin itself (index.js desktop host + client.js desktop client + mobile.js mobile host + ui/ mobile pages)
- preset-chat-zh — the agent preset chat-zh
Changes to host code require a DSH restart; front-end files under
ui/take effect immediately (asset URLs carry a content version hash).
Typical Usage¶
Mobile Access Steps¶
- Open the page
http://<local-LAN-IP>:8787/chat-lite/m/
- Pairing
- Copy the pairing link from Desktop “Settings → Chat Area → Mobile Access”
- Or open
<address>/chat-lite/m/?t=<token>in a browser; the Cookie will be set automatically and the page will redirect - Once installed as a PWA, the App will show a “Connect this device” input field — just paste the link
- Install as an App (PWA)
Browsers require HTTPS or localhost to allow “Install.” On a local network over HTTP, only bookmarking is available. Tailscale is recommended:
tailscale status # Confirm logged in, get <machine>.<tailnet>.ts.net
tailscale serve --bg 8787 # Expose local 8787 at https://<machine>.ts.net/
Then verify that HTTPS Certificates is enabled in the tailnet admin DNS page. After that:
- Open
https://<machine>.ts.net/chat-lite/m/in Chrome on your phone - Menu → Install App
- You get a standalone, address-bar-free App
Configuration¶
Set the following in the config section of the chat-lite line in cordis.patch.yml:
| Key | Default | Description |
|---|---|---|
enabled |
true |
Whether the plugin is enabled |
chatDir |
'' |
Dedicated directory for chat conversations; also the history library directory. If empty, no auto-archiving is performed and the history library is not bound to a directory. After installation, it’s recommended to set a dedicated directory (e.g., D:\chat) |
mobilePort |
8787 |
Fixed mobile port; auto-increments by 1 if occupied |
publicBaseUrl |
'' |
External domain (e.g., https://xxx.ts.net). If empty, pairing links are generated using the LAN address |
chatDir is recommended to be an empty directory: it serves as the working directory for chat conversations, and <chatDir>/.chat-lite/ holds the history library. The plugin only writes to this subdirectory and does not touch any other content.
Self-Managed History Library Structure¶
<chatDir>/.chat-lite/
index.jsonl One metadata entry per line: {id,title,inserted,updated,messages,turns,chars,first,source}
sessions/<id>.jsonl First line is meta, subsequent lines are {role,ts,text,thinking,files}
files/<id>/<name> Original attachments from imported packages
search/cNNNN.jsonl Full-text chunks, each line {id,t}, t ≤ 2000 chars
search/live.jsonl Rebuilt by the host during archiving; only contains chunks from real sessions in the chat directory
search/manifest.json {"chunks": N}
Import a DeepSeek Export Package¶
node tools/build-history.mjs --zip <export-package.zip> --out <chatDir>/.chat-lite
| Parameter | Description |
|---|---|
--zip |
deepseek_data-*.zip (contains chat_sessions/*.json and attachments) |
--out |
Target directory, typically <chatDir>/.chat-lite |
--no-files |
Skip attachments |
--limit N |
Import only the first N entries |
Auto-Archiving¶
The host scans sessions where cwd === chatDir every 60 seconds, writing them to the history library and search/live.jsonl. Deduplication is done by revision.
Use Cases & Notes¶
- Suitable for users who need to isolate daily chat from their workspace, and for developers who want a self-managed history library with search and mobile access.
- Chat sessions still carry the host’s global tools (e.g.,
win_bash,terminal_open), but the sandbox blocks execution. The persona has been configured to prohibit tool calls for reading attachments. - Scanned PDFs cannot have text extracted directly; users need to send a screenshot. The image model can view images directly.
- PWA Cookies are separate from the browser’s: after installing as an App, you need to pair again within the App. Cookies are stored per origin, so changing the domain or path requires re-pairing.
- The desktop panel and mobile page use two separate front-ends; feature parity is not guaranteed.
Brief Conclusion¶
dsh-chat-lite adds a daily chat area and a self-managed history library to DSH, supporting a desktop sidebar and a mobile PWA. It’s ideal for developers who need conversation isolation, historical archiving, and mobile access. See the steps above for installation and configuration, and visit GitHub for full documentation and source code.
References¶
- GitHub: https://github.com/wth373737/dsh-chat-lite
- Directory page: https://www.skillhub.cn/plugins/wth373737/dsh-chat-lite