When developing or debugging on DeepSeek Harness (DSH) Web, the input box is the core interaction area. With long conversations or continuous tasks, manually repeating the same prefix or guessing the next prompt can easily break your flow. Existing solutions usually rely on external tools and cannot be integrated directly into DSH’s native workflow.

Below is dsh-suggest-ghost. It is a client-side plugin maintained by WuJiaoJue that provides input prediction and auto-completion for the DSH input box by making helper LLM calls after a turn ends and matching prefixes from conversation history.

Core Capabilities

The plugin improves input efficiency through two modes:

  1. LLM Ghost Suggestion: After a turn ends, the plugin uses a helper LLM to predict the next sentence you are likely to enter. It is generated from the sanitized content of the last turn. The suggestion is displayed as ghost text and can be accepted in one piece using the Tab key.
  2. Historical Prefix Completion: While typing, the plugin searches the current conversation history for prefix matches. This behaves similarly to zsh autosuggestions and supports accepting the whole completion with the Tab key or accepting it word by word with the → key.
  3. Rendering Approach: Ghost text is rendered with an approximate DOM overlay, without relying on DSH’s official setGhost input mechanism, and does not intercept keystrokes during Chinese IME composition.
  4. Cross-session Management: Supports cross-session search and frequency management. The frequency table is persisted and restored after restart, and high-frequency phrases can be pinned or removed.

Installation and Enablement

The installation process is completed directly through DSH plugin commands. Ensure that DSH is installed in your current environment and that you are using the Web Profile.

dsh plugin --profile web add "github:WuJiaoJue/dsh-suggest-ghost"

After installation, restart the DSH Web client. Once the page finishes loading, the plugin can be found in Settings.

Configuration

All configuration options are centralized in the Suggest ghost card under the Settings → Plugins panel.

LLM Next Suggestion

Controls the automatic prediction behavior after a turn ends. Configurable options include:
- Enable toggle: Turn LLM prediction on or off.
- Max output tokens: Limits the maximum number of tokens used to generate a suggestion.
- Accept shortcut: Sets the shortcut for accepting a suggestion (default is Tab).
- Provider/Model routing: The suggestion model inherits the main request routing by default and can be overridden here.

Historical Prefix Completion

Controls the auto-completion behavior while typing. Configurable options include:
- Enable toggle: Turn historical completion on or off.
- Cross-session search: When enabled, historical completion searches records across sessions.
- Word-by-word acceptance: When enabled, the → key accepts the completion content word by word.

Frequency Management

Manages high-frequency phrases across sessions. Supports pinning a phrase (excluded from eviction), deleting it, or adding a new one. All operations take effect immediately.

You can also override the default configuration in cordis.patch.yml at the project root:

- id: suggest-ghost
  config:
    maxOutputTokens: 512       # 建议输出令牌上限
    acceptKey: Tab             # 采纳快捷键
    llmEnabled: true           # LLM 建议开关

Compatibility and Security

Compatibility

The plugin has been tested and is compatible with two generations of the DSH kernel:
- DSH kernel 0.1.1-rc.2
- DSH kernel 0.1.2-rc.1

Note: The plugin uses a strict enumeration for peer dependency versions (^0.1.1-rc.2 || ^0.1.2-rc.1), rather than a version range. This means that every time upstream releases a new rc generation, a new enumerated item must be added to the peer dependency; otherwise, installation may fail due to unsatisfied peer dependencies.

Security

The plugin includes built-in security mechanisms:
- Data sanitization: Common credentials are automatically sanitized before being sent to the suggestion model.
- Bounded limits: Input bytes, output tokens, and timeouts all have limits.
- Reentrancy prevention: Reentrant calls within the same turn are prevented, a new turn invalidates an old generation, and unloading aborts in-flight requests.

Use Cases

  • Development scenarios that require rapid, continuous input of similar prompts.
  • Interaction scenarios where the LLM’s context capabilities can be used to complete the next sentence automatically.
  • Scenarios that require maintaining common phrases in DSH (frequency management).