Preface¶
When chatting with agents in DeepSeek Harness, you often have to repeatedly write follow-ups, modify requirements, and paste paths into the input box. The IDE-style “guess the next line as you type” experience is not available by default in Harness. Products like Codex Pro implement “next-input prediction” as gray ghost text, filled in with Tab; dsh-tab-complete brings the same interaction to DSH, running predictions through your own model routing without consuming subscription quota.
The following covers the plugin’s positioning, trigger rules, installation and configuration, and usage notes. Facts are subject to the README of the GitHub repository; the community directory page is at SkillHub.
What Is This¶
dsh-tab-complete is published by maintainer dingchenhui0618-arch and classified as a client-side plugin (current GitHub stars: 0). Using the current conversation and the draft you have already typed, it predicts what you want to type next: gray ghost text appears right after the cursor, filled in with one press of Tab, ignored with Esc.
The plugin is a standard DSH bundle: the host side registers HTTP routes, and the client side hooks into the conversation.input.overlay slot. Version 0.2.0, License MIT.
Core Features¶
When Suggestions Appear¶
| Timing | Behavior |
|---|---|
| Typing in the input box | About 0.28 s after you stop, it tries to complete the current sentence |
| Just sent a message, input box is empty | Based on the conversation, predicts your next sentence (in the user’s voice, not the assistant’s) |
| Candidate is a repetition of what the assistant just said | Discarded directly, never shown |
| Typing with an input method (IME) | No prediction, to avoid conflicting with the candidate bar |
Input box starts with / |
No prediction (command palette) |
The completion target is a full sentence rather than half a sentence: one Tab to send or continue editing. Files, functions, and version numbers mentioned in the conversation will be carried over; the prompt suppresses the model from fabricating non-existent paths (such as src/plugins, index.ts). The content sent to the model only contains “what you and the assistant have said” — framework injections like the skill directory and runtime context are filtered out by isScaffolding(), so they don’t crowd out the context and distort predictions.
Interaction and Implementation Notes¶
- Streaming generation: ghost text is drawn as soon as the first token arrives, then grows character by character, instead of waiting for the whole sentence to finish before displaying.
- After pressing Tab, the ghost text becomes a real draft with the cursor at the end, ready for further editing.
- Tab is intercepted at the capture phase to avoid triggering editor indentation; insertion goes through
inputActions.insertTextwith a CAS check ondraftRev, and continuing to type invalidates the in-flight completion. - The client is a zero-height overlay positioned by cursor measurement, with font and line height matching the editor.
Cost and Privacy (per README)¶
- Each prediction is an independent small-model call (default
maxTokens: 96), not written into the session log, and does not consume the Harness main context. - Only loopback requests are accepted; the request body cap is 64 KB.
- Results for the same “session + draft” are cached for 2 minutes; empty results are cached for 20 seconds.
- Only one in-flight request is kept per session; a new request interrupts the old one.
Installation and Activation¶
Configure the dependency and bundle in the profile directory (~/.dsh/profiles/<profile>/), for example:
// package.json
{
"dependencies": {
"dsh-tab-complete": "link:D:/Projects/dsh-tab-complete" // 或 npm 版本号
},
"dsh": {
"profile": {
"bundles": ["...", "dsh-tab-complete"]
}
}
}
Then install dependencies under the corresponding profile and restart the Harness (the README example uses the desktop profile):
cd $env:USERPROFILE\.dsh\profiles\desktop
pnpm install
After restart, the input box gains completion capability; running session logs are already persisted to disk and will not be lost. Before installing, review the repository source code and the MIT license yourself; the plugin runs with the permissions of the current DSH process.
Configuration¶
Host-side configuration is written under the corresponding entry in the bundle’s cordis.patch.yml; all fields are optional:
- id: dsh-tab-complete
config:
enabled: true
debounceMs: 280 # 停手多久后请求
maxTokens: 96 # 生成上限(整句比半句要更多 token)
maxCompletionChars: 180
contextMessages: 6 # 送给模型的历史消息条数
contextChars: 2200
minDraftChars: 0 # 空输入框也预测,设成 2 就要求先打两个字
provider: "" # 留空则用当前会话的默认模型路由
model: ""
If the main-session model is slow, you can point completion at a faster model without affecting the main session, for example:
- id: dsh-tab-complete
config:
provider: chenyuzhiyun
model: glm-5.3-flash
At runtime you can query status or toggle it temporarily (in-memory state, resets on restart); requests require the same cookie as your browser:
curl.exe http://127.0.0.1:3080/dsh-tab-complete/state
curl.exe -X POST http://127.0.0.1:3080/dsh-tab-complete/enabled -d '{\"enabled\":false}'
curl.exe "http://127.0.0.1:3080/dsh-tab-complete/transcript?sessionId=<id>"
curl.exe "http://127.0.0.1:3080/dsh-tab-complete/prompt?sessionId=<id>&draft=<草稿>"
The wait time for a single suggestion is roughly the default 280 ms of silence plus the model’s first-token latency; on a cache hit for the same “session + draft” the latency is 0, and lastMs in GET /dsh-tab-complete/state reports the actual duration of the last call.
Typical Usage¶
- Type normally in the Harness chat input box; about 0.28 s after you stop, observe the gray ghost text after the cursor.
- If the suggestion fits, press Tab to accept; otherwise press Esc to ignore it.
- After sending a message, wait in the empty input box to get a context-based prediction of your “next user message” (again, Tab / Esc).
- When you need to debug what the model actually sees, use the
transcriptandpromptendpoints above to cross-check against the sessionId and draft.
Suitable Scenarios and Caveats¶
Suitable for: long-running multi-turn follow-ups, repetitive instructions, or descriptions involving paths/version numbers in DSH, where you want to reduce pauses of “figuring out how to phrase the next sentence”, and are willing to let your own model routing absorb the small number of completion calls.
Caveats:
- It depends on the editor’s
data-composer-card/data-composer-inputmarkers; if Harness heavily reworks the input box structure, the plugin may need follow-up. - Ghost text positioning is optimized for “cursor at the end of the draft”; for multi-line drafts with the cursor in the middle, completion still sticks to the end of the last line.
- The model occasionally produces irrelevant suggestions; just ignore them with Esc. Prediction is inherently lossy.
- The DSH ecosystem emphasizes “everything is a plugin”; SkillHub and similar sites are community directories with no official affiliation to DeepSeek / High-Flyer.
Conclusion¶
dsh-tab-complete brings the “gray ghost text + Tab fill-in” input prediction to DeepSeek Harness. Predictions are separated from the main conversation and can be routed to a dedicated model, making it a good fit for users willing to trade a little latency and call cost for their own routing. See the GitHub README for details and screenshots; installation and bundle lists follow the package.json in the profile and the pnpm install workflow.
- Directory page: https://www.skillhub.cn/plugins/dingchenhui0618-arch/dsh-tab-complete
- GitHub: https://github.com/dingchenhui0618-arch/dsh-tab-complete