Back to home@cw1999mm

dsh-prompt-history

No description

Stars
0
Language
JavaScript
Created
Aug 18, 2026
Updated
Aug 18, 2026
GitHub repo

Introduction

dsh-prompt-history

English | 中文

DSH (DeepSeek Harness) community plugin: ↑/↓ prompt-history navigation for the composer. Recall the prompts you already sent in the current session without leaving the input box — press to pull back the last sent prompt, browse older ones with /, and always keep your original draft safe.

A small 历史 x/y badge appears in the composer's tool row while you browse.

Features

  • / browse the current session's sent prompts (user + steering nodes), newest first.
  • Consecutive duplicates are collapsed.
  • Multi-line drafts are respected: only starts browsing when the caret is on the first line.
  • Browsing exits automatically when you send the message or switch sessions; pressing past the newest prompt restores your saved draft.
  • Keydown is bound to the composer card ([data-composer-card]), not window. Sidebar search and other inputs never see the handler.

Requirements

  • A DeepSeek Harness web profile (any profile name; the examples below use web).

Installation

The package ships its compiled lib/ in the repo, so neither install path needs a build step.

Option A — tarball

cd dsh-prompt-history
npm pack                        # → dsh-prompt-history-0.1.0.tgz
dsh plugin --profile web add ./dsh-prompt-history-0.1.0.tgz

Option B — git (latest)

dsh plugin --profile web add github:cw1999mm/dsh-prompt-history

Then restart (or refresh) the web UI. The plugin loads as the dsh-prompt-history bundle layer; remove it with:

dsh plugin --profile web remove dsh-prompt-history

Manual / development install

Link the package into your profile's node_modules and add the bundle row:

# from the profile directory (e.g. ~/.dsh/profiles/web)
pnpm add link:<absolute path to this project>

Then append to the profile's cordis.patch.yml:

- insert:
    - id: dsh-prompt-history
      name: dsh-prompt-history

Usage

  1. Focus the composer and type — or don't: your draft is saved automatically.
  2. Press (with the caret on the first line) to load the most recent prompt you sent in this session.
  3. / move through older/newer prompts; the 历史 x/y badge shows where you are.
  4. Press past the newest prompt (or just send) to return to your original draft.

How it works

  • lib/index.js — host half. Deliberately empty: it exists only so the plugin is a valid, activating row in the cordis composition.
  • lib/client.js — browser half, discovered through the package's dsh.client declaration. It declares inject = ['slots'], waits for that service, then hooks conversation.input.right, binds ↑/↓ on the composer card, and reads the session's chat snapshot to build the prompt history.

License

MIT © 2026 cw1999mm