Introduction¶
When writing multi-turn conversations in DeepSeek Harness (DSH), unsent text in the input box often fails to become a “visible” session in the sidebar. Switching to another session and returning may result in the loss of unsent content, or reliance solely on the kernel’s internal recovery logic. Repeatedly clicking “New Session” can also easily accumulate a string of empty placeholder rows. Clients like Cursor treat unsent input as draft rows attached to the list, which can be previewed by title, clicked to return, or discarded.
The following is an introduction to the community plugin dsh-cursor-sessions (Maintainer: Allenbyz, GitHub: Allenbyz/dsh-cursor-sessions). It is a pure web client plugin that implements “draft as session row,” empty draft reuse, and one-click discarding in the DSH Desktop / Web sidebar, without modifying kernel files. The design concepts and partial implementation are adapted from ne-ilyxa/dsh-session-drafts (BSD-3-Clause), with adjustments made for patch point migration and title timing for DSH 0.2.1-rc.2. Directory page: skillhub.cn/plugins/Allenbyz/dsh-cursor-sessions.
What is this¶
dsh-cursor-sessions adds Cursor-style draft chat management to the DSH sidebar: unsent input is no longer “invisible” but becomes a visible, clickable, and discardable session row; when creating a new session, it prioritizes reusing existing empty drafts to avoid the accumulation of empty rows. It is implemented as a Web client plugin with a stub host-side implementation, requiring no additional runtime dependencies; its original code is MIT licensed, and adapted parts are detailed in the repository’s THIRD-PARTY-NOTICES.md.
The package.json declares the engine range as dsh >=0.2.1-rc.1 <0.3.0-0; the README states that it has been verified on DSH 0.2.1-rc.2, and is unverified on 0.2.0-rc.2 and earlier versions.
Core Features¶
Draft as Session Row¶
- Unsent text becomes the list title in real-time (up to a 60-character preview).
- When there are unsent edits, the title turns gray, and an “Editing” pencil icon appears at the beginning of the row (with a subtle breathing animation); empty placeholders retain the standard color.
- After clearing the input, the title immediately falls back to “New Session,” and the gray color and pencil icon disappear simultaneously.
No Accumulating Empty Placeholders¶
When clicking “New Session,” if an empty draft already exists in the current workspace, it will jump to that draft and adopt the same sessionId; a truly blank session is only created when all drafts contain text. The shortcut Ctrl+Alt+N follows the same rule as the button.
Retain on Switch, Resume on Return¶
Draft rows remain in the list after switching sessions; when clicking back on a draft row, unsent text is automatically restored by the kernel, and the title continues to update with input (the README notes that this differs from the behavior of @ne-ilyxa/dsh-session-drafts 0.6.1).
One-Click Discard and “Graduation”¶
Hovering over a draft row reveals a unique × action at the end, which performs an archive discard (session log is retained). After sending a message, the draft transforms into a standard chat, and the ⋯ menu on the row is restored.
Runtime Implementation (Read-only, Reversible)¶
The plugin performs only three tasks at runtime, without modifying kernel files:
- List Projection: Shadows
sessions.list.getSnapshot, projecting sessions with “no sent turns” asblank:falsewith real-time titles. - New Session Rule: Shadows
uiWorkspace.connectBlank; standard creation adopts empty drafts first, and only mints a new one if all are occupied; entries withoptionsretain kernel semantics. - Row Marking:
MutationObserver+data-dcs-draftattributes and CSS inline styles.
Internal derivations are read-only to the raw snapshot; it does not write to editors or create new persistence. Shadow properties are reversible and are restored item-by-item upon uninstallation. There are no network requests or telemetry; it only reads kernel localStorage keys and the DOM.
Installation and Enablement¶
In an environment with the DSH CLI installed, use the commands provided in the README (Desktop profile):
# From GitHub
dsh plugin --profile desktop add github:Allenbyz/dsh-cursor-sessions
# Uninstall
dsh plugin --profile desktop remove dsh-cursor-sessions
After installation, it enters the Web boot graph upon Host restart or HMR; if the interface does not change, refresh once (Ctrl+R).
Typical Usage and Interaction Comparison¶
Daily operations can be understood as follows (consistent with the README’s interaction table):
| Action | Behavior |
|---|---|
| New Session (Empty draft exists in workspace) | Jumps to the empty draft, does not add new |
| New Session (All drafts have text) | Creates a new blank session |
| Type in draft | Title updates key-by-key, row turns gray and shows pencil |
| Switch to another session | Draft row and title are retained |
| Click back on draft row | Unsent text is automatically restored by kernel |
| Delete all input | Title immediately returns to “New Session” |
| Hover draft row → Click × | Archive discard (log retained) |
| Send a message | Draft “graduates” to normal chat |
Ctrl+Alt+N |
New session anywhere (Same rules as above) |
The maintainer provides syntax checking and test entry points in the repository for local verification during secondary development:
node --check client.js
node tests/core.test.mjs # 21/21
node tests/apply.test.mjs # 7/7
Use Cases and Notes¶
Target Audience: Desktop / Web users (Baseline 0.2.1-rc.2) who frequently draft multiple unsent messages in parallel within DSH and wish for sidebar behavior to resemble Cursor’s draft list.
Known Limitations (From README):
- Empty and non-current historical blanks are not listed (to avoid dirty rows), but they are still reused during creation.
- Image/file attachments are not persisted (Kernel behavior); only text is restored.
- Draft text is stored in the browser’s
localStorage, isolated by origin; desktop and remote web ends do not share it.
Pre-installation Advice: The plugin runs on the client with the permissions of the current DSH process, hooking into the workspace UI and reading the DOM / localStorage. Before installation, you should review the GitHub Source Code and licenses (Original MIT + Adapted parts BSD-3-Clause) yourself. The DSH community directory sites (such as skillhub.cn) are independent ecosystem indexes and have no official affiliation with DeepSeek / HSAI.
Conclusion¶
dsh-cursor-sessions uses a pure client-side patch to turn “unsent input” into manageable draft session rows and tightens the empty placeholder logic for “New Session.” If you are already using DSH on 0.2.1-rc.2, you can install it via the commands above, and combine Ctrl+Alt+N with the hover × to complete the drafting and discarding loop.
- Directory Page: https://www.skillhub.cn/plugins/Allenbyz/dsh-cursor-sessions
- Repository: https://github.com/Allenbyz/dsh-cursor-sessions