DeepSeek Harness Plugin

sunshaobei/dsh-input-history

Stars ★ 0 Downloads (30d) 1,929 Category UI Enhancements Added 2026-08-18 npm @sunshaobei/dsh-input-history

Input history switcher for the DSH composer that locally persists every submitted prompt (text plus attachments, max 50) and re-fills the empty composer with ArrowUp/ArrowDown, re-attaching file references and image previews.

Install

# from npm (prebuilt)

dsh plugin --profile web add @sunshaobei/dsh-input-history

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:sunshaobei/dsh-input-history

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

Input history switcher for the DeepSeek Harness (DSH) composer.

Every submitted prompt — text plus attachment bytes — persists locally (localStorage metadata + IndexedDB blobs, newest first, capped at 50 entries; the oldest is dropped together with its blobs). With an empty composer, ↑ recalls the previous entry and continues to older ones, ↓ goes back; going past the newest clears the composer and ends the cycle. Any real edit ends the switching session, and a non-empty user-authored draft is never overwritten by accident.

Restore fidelity

Restored entries go through the product's own draft pipeline (conversation.createDrafts + the session input shell's setDraft/addAttachments actions), so:

  • images come back as real thumbnails (fresh object-URL previews),
  • files restart the background upload like a hand-picked attachment,
  • @references in the text are preserved verbatim.

Entries whose blobs are gone restore text-only.

Install

dsh plugin --profile web add dsh-input-history
# restart dsh web / the desktop app (bundle layer applies at boot)

How it works

  • Capture — wraps ConversationController.prototype.sendSession (the single funnel for composer submissions) and snapshots the ordered draft attachments (live File objects) before the original send consumes them. Capture is async and failure-swallowing: storage problems never break sending.
  • Storage — metadata in localStorage["dsh-input-history:entries:v1"], bytes in IndexedDB dsh-input-history/blobs (key <entryId>:<index>).
  • Active session — tracked via a conversation.composer.dock slot whose inject(sessionId) runs for the mounted composer, falling back to the most recently updated session.

Configuration

None. Zero npm dependencies.

License

MIT

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.