Introduction

The DeepSeek Harness (DSH) web client provides a basic model interaction interface. For frequent users, the default input box has room for improvement in key bindings, shortcuts, and auxiliary features. This plugin aims to address these issues and provide an enhanced experience for the Composer (input box) in web mode.

Plugin role

  • Name: dsh-composer-ux
  • Role: DeepSeek Harness web input experience enhancement plugin
  • Maintainer: fangwen9527
  • License: MIT

Core features

1. Key bindings and input safety

The plugin allows you to customize the send key and line break key for the input box (such as Enter / Ctrl+Enter / Alt+Enter, etc.). Recording supports custom key combinations, and one-click restore to defaults is available.
* IME safety: While a Chinese or Japanese input method is composing (during the isComposing state), the system lets input pass through and does not trigger accidental sending or accidental line breaks.
* Compatibility: Send/line-break actions are implemented by replaying the official key pipeline, preserving official protections such as busy-time queuing and repeated-send deduplication. If no Enter-family key is bound, official behavior is retained by default.

2. Right-click menu

The settings page provides three menu source options:
* Official: Fully handled natively by DSH and the browser, with no plugin intervention.
* Browser: Uses the browser’s built-in menu, and paste requires no authorization.
* Custom: Provides a fixed-style right-click menu with 7 items (Undo, Redo, Cut, Copy, Paste, Delete, Select All).
* Note: Firefox requires manual authorization for clipboard access, and clicking Paste each time triggers a confirmation dialog, which is a browser security mechanism.

3. Settings panel and global switch

  • Global switch: A master switch is provided at the top of the settings page, allowing all enhanced features to be enabled or disabled with one click.
  • Persistent size: The settings panel supports resizing. Size changes are saved automatically, and reopening it preserves the last state.
  • Restart DSH: The card header on the settings page provides a “Restart DSH” button. Clicking it restarts DSH through the helper process, freeing the port and reloading the configuration.

4. Shortcuts and prompt optimization

  • Shortcut panel: Includes a built-in list of common prompts and supports category-based management. Clicking a shortcut button inserts text, and each shortcut can independently configure the “always append when sending” mode.
  • Prompt optimizer: Automatically runs a separate model call before sending to optimize the input content, then executes the send operation.

5. Auxiliary features

  • OpenCode request header: Automatically injects the x-opencode-session request header to ensure OpenCode-related routes work correctly in DSH.
  • Windows terminal switching: On Windows, the default terminal for model calls can be switched from PowerShell to Git Bash.
  • Statistics line upgrade: Displays the cache hit percentage below the input box with precision to 3 decimal places (enabled by default starting from v0.7.0).
  • Cost capsule: Displays the estimated cost of the current session. It supports editing peak/off-peak prices by model and automatically fetching Chinese statutory holidays. Cost settlement is based on the specific time point of the event, not the time when the panel is viewed.

Installation and enablement

Installing this plugin requires the DSH Web Profile. Run the following commands:

# 安装
dsh plugin --profile web add dsh-composer-ux

# 更新
dsh plugin --profile web update dsh-composer-ux

After installation, restart DSH or refresh the page as prompted for the changes to take effect.

Typical usage

  1. Adjust key bindings: Go to “Input experience” in the settings page and change the send and line break keys according to your habits.
  2. Use shortcuts: Click the shortcut button in the input box toolbar to quickly insert preset prompts.
  3. Optimize input: Before sending, use the optimizer to polish long text.
  4. Configure prices: In the “Amount” settings, edit peak/off-peak prices for specific models or synchronize official pricing.

Notes

  • Default enabled items: In version v0.7.0, “Statistics line” is the only feature enabled by default; all other features are disabled by default.
  • Firefox limitation: Due to browser security policies, authorization dialogs cannot be avoided when using the custom clipboard feature in Firefox.
  • Permissions and licensing: The plugin runs with the current DSH process permissions. It is recommended to review the source code and license (MIT) before installing.
  • Data retention: Turning off a feature panel (for example, disabling key bindings) disables that feature, but saved configuration data is retained. Re-enabling the feature restores the previous behavior.