Introduction¶
When engaging in back-and-forth conversations with agents in DSH, the input box is often the place you spend the most time. You might want to continue a half-finished sentence or send the next message immediately after the assistant finishes replying, but you often have to type the entire thing from scratch. Common workarounds involve copying the previous context elsewhere to let a model help draft the text, or relying on auto-completion in general editors—neither of which can typically see the current session or integrate into DSH’s sending pipeline.
Below is an introduction to the community plugin dsh-input-prediction (Maintainer: fishcg, Category: Client). It hooks directly into DSH’s composer to do two things: predict the next sentence you might type as gray text after a pause (accept with Tab), and provide 1–3 candidates above the input box that can be sent with one click after each assistant response. Predictions are based on the current conversation context and use your recent messages as style samples.
What is this¶
dsh-input-prediction is an input prediction plugin for DeepSeek Harness (DSH), version 0.2.0 (MIT © 2026 fishcg). The host half registers prediction and recommendation routes and calls llm.stream; the client half interfaces with the Lexical input box and official UI slots, requiring zero build steps and supporting hot reload. It requires DSH >= 0.2.0-rc.2 and Node >= 20.
Directory Page: SkillHub - dsh-input-prediction
Source Code & Docs: GitHub - fishcg/dsh-input-prediction
Core Features¶
Ghost completion¶
In the input box, the model “paints” the “most likely next segment” in gray text behind the cursor without altering your existing draft.
- The draft must have at least one character; a prediction is sent after a pause of approximately 320ms. Adjacent requests are spaced at least 650ms apart.
- When conditions are met (cursor at the end, focused, not in a slash/
@menu, not in a Chinese IME composition, suggestion is non-empty, etc.), gray text appears after the cursor. Press Tab to accept; the text enters the input box via the official DSH insertion channel (captureInsertion+insertText), acting as a normal, undoable edit. - While the assistant is still streaming output or running tools, gray text can still be predicted as long as the draft is non-empty; if the draft is empty, it will not arbitrarily guess the “next message.”
- If the model is uncertain, it returns an empty string; the interface prefers not to show a suggestion rather than guessing wildly.
Follow-up suggestions¶
Every time an assistant response finishes (running in uiSession.sessionStatus changes from true to false) and the draft is empty, 1–3 candidate next messages are displayed immediately above the input box (in the official conversation.input.dock slot).
- No candidates are requested or displayed while the response is in progress; they collapse if you start typing, switch sessions, or click the × in the bottom right corner.
- Clicking a candidate is equivalent to typing it yourself and pressing Enter: write draft → submit. Requests are made only once per conversation version, and expired results are discarded based on
contextEpoch. - The length of a single candidate defaults to no more than 40 characters (
chipMaxChars).
Settings Panel¶
Entry point: Settings → Built-in Plugins → “Input Prediction”.
| Item | Default | Description |
|---|---|---|
| Input Box Ghost Completion | On | If off, no requests are made, no gray text is drawn, and Tab does not intercept |
| Follow-up Suggestions | On | If off, no requests are made, and existing bubbles collapse immediately |
| Number of Suggestions | 3 | 1 / 2 / 3 |
Preferences are written to $DSH_HOME/input-prediction.settings.json (path can be overridden by settingsFile) and take effect immediately without requiring a restart. Values modified by the user in the panel take precedence over the factory defaults in cordis.patch.yml.
Installation and Activation¶
In the DSH ecosystem, plugins extend functionality via an “everything is a plugin” approach. The community directory SkillHub is an independent site with no official affiliation with DeepSeek or High-Flyer. Please review the repository source code and MIT license before installing; the plugin runs under the permissions of the current DSH process.
Install from the Plugin Market (Settings → Plugin Market → Search “input-prediction”) or via the command line:
dsh plugin --profile desktop add dsh-input-prediction
Or add directly from GitHub:
dsh plugin --profile desktop add https://github.com/fishcg/dsh-input-prediction
Both halves support hot reload with no build steps or additional dependencies. If you modify model-related items in cordis.patch.yml, you need to reload the patch layer (saving the profile’s patch triggers a live reload) or restart the DSH desktop app.
Typical Usage¶
- Open any conversation, type a few words in the composer, and pause briefly to see if gray text continuation appears after the cursor; if suitable, accept with Tab, then continue editing or send directly.
- Wait for the assistant’s current response to fully finish and the input box to be empty, then check if 1–3 suggestions appear above the input box; click one to send it.
- In Settings → Built-in Plugins → Input Prediction, turn off gray text or suggestions as needed, or change the number of suggestions to 1 or 2.
If you need to verify if the pipeline is loaded, you can enable debugLog and check the logs (disabled by default):
tail -f /tmp/dsh-input-prediction.log
Common events include client:ready (client loaded), predict / predict-done (gray text prediction), client:chips (received recommendation candidates), client:accept (Tab accepted). The browser DevTools console also outputs entries prefixed with [input-prediction].
Configuration Essentials¶
Advanced items are written in cordis.patch.yml (or overridden under the profile with the same id). A common snippet is shown below; for a full explanation of keys, see the repository README.
- insert:
- id: dsh-input-prediction
name: dsh-input-prediction
config:
enabled: true
provider: ''
model: ''
reasoningEffort: 'off'
maxTokens: 160
temperature: 0.3
contextMessages: 16
contextChars: 600
maxSuggestionChars: 60
styleHint: ''
completionEnabled: true
chipsEnabled: true
chipCount: 3
chipMaxChars: 40
chipsMaxTokens: 320
chipsTemperature: 0.7
settingsFile: ''
debugLog: ''
It is crucial to keep reasoningEffort: 'off': gray text continuations are usually only a dozen characters long. If reasoning is enabled, the token budget will be consumed by “thinking,” and the completion may easily become empty text. If provider / model are left blank, it follows DSH’s default model settings.
Use Cases and Notes¶
Suitable for: Developers who write dialogues in the DSH desktop app long-term, wish to minimize typing repetitive follow-up sentences, and want completions and recommendations aligned with the current session and their own tone.
Notes:
- Depends on a network-connected or locally configured LLM; prediction quality varies with the model and context length.
- Switching sessions invalidates gray text, candidates, and cache; recommendations from the previous session are not carried over to the new one.
- If there is no gray text at all, check the logs for
client:ready,client:host-contact, and confirm that ghost completion is not turned off in the settings and thatenabledis true.
Conclusion¶
dsh-input-prediction integrates “what to write next” directly into the input box: gray text handles draft continuation, while recommendation bubbles handle quick follow-ups after responses. Settings and preference files are separated, and changes take effect immediately. To try it out in DSH, refer to the installation commands and configuration tables on the SkillHub directory page or the GitHub README.
- Directory Page: https://www.skillhub.cn/plugins/fishcg/dsh-input-prediction
- GitHub: https://github.com/fishcg/dsh-input-prediction