dsh-prompt-history-plugin
Manifest validdsh prompt navigation plugin for the input field, supports up/down keys to view input history
dsh-prompt-history-plugin
Prompt history navigation for DeepSeek Harness (dsh) web. In the conversation composer, press ↑ / ↓ to browse prompts you have submitted before and fill them back into the input — just like shell history. History is stored locally in your browser (localStorage) and shared across sessions.

Installation
From npm (recommended)
dsh plugin --profile web add dsh-prompt-history-plugin
From GitHub
dsh plugin --profile web add github:hotpot-labs/dsh-prompt-history-plugin
Usage
- Open any conversation in dsh web.
- With the composer empty — or with the caret at the very beginning — press ↑ to fill in your most recent prompt; keep pressing ↑ to walk further back, and ↓ to walk forward again.
- With text in the composer, the first ↑ simply moves the caret to the beginning (default behavior); press ↑ again to enter history navigation. Your unfinished draft is stashed on entry.
- Press ↓ past the newest entry to restore the stashed draft (or an empty composer) and leave history navigation.
- While navigating, pressing any printable key, Enter, Backspace or Escape exits navigation mode (the key itself still works as usual).
Features
- Shell-style history navigation: ↑ for older, ↓ for newer, with readline-style stashing — your in-progress draft survives a round trip through history.
- Automatic recording: every prompt actually accepted by the host is recorded — regardless of whether you submitted it with Enter or the send button.
- Cross-session persistence: history lives in
localStorage(keydsh-prompt-history:v1), capped at 100 entries, deduplicated with most-recent-use first. - Zero conflicts: navigation only starts from an empty draft or with the caret at the very beginning, so it never steals ↑/↓ from the
/and@trigger menus or from normal caret movement in a multi-line draft. IME composition input is always left untouched. - No UI chrome: the plugin renders nothing visible; it only adds behavior to the existing composer.
Development
How it works
The plugin is a pure web client bundle. Its client entry registers a component (rendering null) into the conversation.composer.dock slot, which grants access to the session-scoped standard props:
useConversation(newer cohorts) oruseSession(0.1.1-rc.2, whose snapshot is the sameConversationSnapshot) — subscribed to diff newly appearedusernodes; their text blocks are extracted and pushed into the history store. Only submissions accepted by the host are recorded.useInput— mirrors the current draft so the key handler can read it synchronously.inputActions.setDraft(text)— writes a history entry back into the composer.
A document keydown listener in the capture phase intercepts ↑/↓ before the host's own handlers whenever the focus is inside the composer (newer cohorts: the [data-composer-input] Lexical contenteditable; 0.1.1-rc.2: the native <textarea> inside [data-composer-card]) and the navigation preconditions are met.
Build and test
npm install
npm run build # host (tsc) + client (tsdown, lazy-CJS wrapper)
npm run typecheck
npm test
npm pack --dry-run # verify the tarball only contains lib/ + patch + READMEs
Local install into a dsh profile:
dsh plugin --profile web add ./dsh-prompt-history-plugin
FAQ
The first ↑ just moves my caret to the beginning — is that expected?
Yes. With text in the composer, ↑ keeps its default caret movement until the caret reaches the very beginning; the next ↑ enters history navigation. This keeps ↑/↓ from ever conflicting with caret movement or the / and @ trigger menus. Your in-progress draft is stashed on entry and restored when you press ↓ past the newest entry.
Where is my history stored?
In your browser's localStorage under the key dsh-prompt-history:v1. Clearing site data removes it. Nothing is sent anywhere else.
Are slash commands recorded too?
Yes — any message that appears as a user node in the conversation is recorded, including messages starting with /.
Compatibility
Versions
| Latest version | Published | Size |
|---|---|---|
| 0.1.0 | — | — |
Comments
Loading…
Similar plugins
by lhh010
DSH Web 输入历史插件:Ctrl+Up / Ctrl+Down 像终端一样召回与切换已发送消息,零核心改动
★ 3
BSD-3-Clause
TypeScript
Oct 28, 2026
dsh plugin --profile web add @dsh-external/dsh-input-historyby HandsYe
为 DSH 提供持久化输入历史,支持使用键盘上下方向键切换历史记录并恢复未发送草稿。Persistent input history for DSH with Arrow Up and Arrow Down navigation, draft recovery, deduplication, and local storage.
★ 0
MIT
JavaScript
Oct 28, 2026
dsh plugin --profile web add dsh-input-historyby 904915452
DeepSeek Harness plugin: configurable keyboard shortcuts (settings UI + input history + approval/plan hotkeys)
★ 0
MIT
JavaScript
Aug 17, 2026
dsh plugin --profile web add @zhangqingyu/dsh-keyboard-shortcutsby Frog755
Prompt Vault: 输入框上方的提示词库(DSH 插件)— 📚 按钮展开面板,点条目一键填入 prompt。DeepSeek Harness prompt library plugin.
★ 5
↓ 109/wk
MIT
JavaScript
Sep 10, 2026
dsh plugin --profile web add @frog755/dsh-prompt-vaultby SodaZheng
为 DeepSeek Harness Web 补齐上下文与历史控制能力的一组实用补丁;每个补丁都可以独立启停。
★ 0
MIT
TypeScript
Sep 23, 2026
dsh plugin --profile web add dsh-moreby cdredfox
为你的 DSH 增加快捷指令的操作,把常用提示词存成输入框上方的一排快捷按钮,点击即填入。支持置顶、搜索、自动收纳溢出。
★ 0
MIT
JavaScript
Oct 17, 2026
dsh plugin --profile web add @cdredfox/dsh-prompt-shortcuts