In DeepSeek Harness (DSH) usage scenarios, developers often need to switch between different conversation sessions or quickly reuse previous inputs. Relying on global history often results in old input content interfering with the current session upon switching, leading to input pollution. dsh-session-input-history solves this problem.
This is a pure client-side plugin maintained by czhzz, designed to provide Shell-style input history navigation capabilities for the current session.
Core Features¶
The plugin primarily provides the following capabilities:
- Session-isolated input history navigation: History records are strictly confined to the current session and are not polluted by inputs from other sessions or workspaces. After switching sessions, the history automatically resets to reflect the content of the new session.
- Shell-style interaction: In the conversation input box, use the
↑and↓arrow keys to traverse messages sent in the current session. - Pure client-side implementation: No backend interaction, no persistent UI components.
- No disk storage: History data exists only in memory and is cleared when the page is closed.
Installation and Configuration¶
Installing this plugin requires executing a command via the DSH CLI tool.
dsh plugin --profile web add dsh-session-input-history
Once installed, the plugin automatically mounts to the conversation.input.left slot on the left side of the input box and depends on the @deepseek-ai/dsh-client-ui-conversation component.
Interaction¶
The plugin takes over the arrow key logic as follows:
- ↑ (Up Arrow): When the draft is empty, loads the most recent history message. Pressing again continues backwards (to older messages).
- ↓ (Down Arrow): Pages backward through history when browsing. When the latest message is reached and pressed again, the input box is cleared and the browsing state is exited.
- Edit and Send: While browsing history, you can directly edit the current message content or send the currently loaded message. Sending or editing immediately exits the browsing state.
Technical Implementation and Notes¶
- Dependencies: The plugin depends on
@deepseek-ai/dsh-client-ui-conversation; ensure this dependency is correctly installed. - Keyboard Events: The plugin only intercepts arrow keys when the input box has focus and does not handle any modifier keys (such as Ctrl, Alt, Shift, etc.), ensuring the editor’s native functionality is unaffected.
- Implementation Architecture: The plugin is divided into a Host side (empty apply, no additional behavior) and a Client side. The Client side contains a pure logic history extraction module and a state machine responsible for handling keyboard input and reading/writing the input box draft.
- Uninstallation: To remove, execute:
dsh plugin --profile web remove dsh-session-input-history
Conclusion¶
dsh-session-input-history provides a lightweight, stateless way to manage input history in DSH, making it particularly suitable for developers who frequently switch sessions. Installation is completed via the command line without requiring additional configuration files.