Introduction

DeepSeek Harness (DSH) adopts a plugin-based architecture. On the web UI, developers sometimes need finer interaction control—for example, quickly canceling the current turn during generation, or appending instructions without interrupting the ongoing generation stream. The dsh-esc-enter plugin addresses these needs and provides opencode-style UX support.

Plugin Overview

This plugin is maintained by Liangebra, classified as a client-side plugin, and released under the MIT License. It contains no host logic and is implemented purely on the client. It mainly solves two problems: first, canceling a running task with the Esc key; second, providing intuitive “Append” and “Stop” buttons in the input box dock slot.

Core Features

  1. Esc cancels the current task
    Pressing Esc while an agent is running immediately cancels the current turn. This mechanism is fully consistent with the “Stop” button: both call Session.cancel(), and queued work that has not yet been executed is retained for the next turn.
  2. Append and Stop buttons in the dock slot
    The plugin mounts to the conversation.composer.dock slot. When ConversationSnapshot.running is true, it renders “Append” and “Stop” buttons beside the input box.
    - Append button: Calls inputActions.submit() to submit the current input box draft as a queued instruction. If the draft is empty, the button is automatically disabled.
    - Stop button: Calls sessions.binding(sessionId).session.cancel() to interrupt the current task.
    The two buttons are visible only while running and are automatically hidden when idle to keep the interface clean.
  3. Enter behavior is not reimplemented
    The plugin does not override DSH’s built-in “press Enter while running” behavior. This behavior is determined by DSH’s built-in settings and may be “append instruction” or “interrupt.”
  4. Esc does not intercept events when idle
    When the agent is idle, Esc does not trigger the plugin logic, so command menus and popovers can be closed normally.

Installation and Enablement

Run the following command in the terminal to install the plugin:

dsh plugin --profile web add github:Liangebra/dsh-esc-enter

After installation, restart the dsh web service and perform a hard refresh in the browser (Ctrl / Cmd + Shift + R) to load the update.

Typical Usage

  • Cancel task: While the agent is generating a response, press the Esc key on your keyboard to cancel the current turn.
  • Append instruction: In the dock slot beside the input box, click “Append” to enqueue the current draft as a pending instruction; click “Stop” to interrupt the current turn.
  • Enter interaction: Pressing Enter while running triggers behavior—append or interrupt—depending on DSH’s built-in settings.

Use Cases and Notes

This plugin is suitable for developers who need clearer task control feedback in the web UI.

Notes:
- The plugin runs entirely on client-side logic and has no host backend logic.
- The Esc cancellation mechanism shares the same underlying path as the Stop button.
- Before downloading and using it, it is recommended to review the source code and license (MIT).

Conclusion

dsh-esc-enter improves the interaction experience of the DeepSeek Harness web UI by combining keyboard shortcuts and UI buttons. For more details, consult the community directory or the GitHub repository.