Introduction¶
In the DeepSeek Harness Web environment, developers or users in long conversations often need to repeatedly enter specific terms, variable names, or function names. Manual typing is not only inefficient but can also interrupt the thought flow. dsh-word-complete aims to address this pain point by providing an intelligent completion solution based on the context of the current session.
Plugin Positioning¶
This is a word auto-completion plugin for the DSH Web client environment. It does not rely on an external dictionary; instead, it counts word frequency based on the historical messages in the current session and provides completion suggestions when a prefix is typed. The plugin is maintained by tuogusa and is licensed under the MIT license.
Core Features¶
- Prefix matching rules: Suggestions pop up only for text that meets length requirements during input. English prefixes require ≥ 2 characters; Chinese, Japanese, and Korean prefixes require ≥ 1 character. Typing slash
/or backslash\does not trigger completion. - Sorting logic: The suggestion list is sorted in ascending order by closeness. Exact matches (the currently typed word itself) come first, followed by words with fewer additional characters, and finally words with higher frequency.
- Interaction: Supports keyboard ↑/↓ selection, Enter to confirm, and ESC to close. Supports mouse hover highlighting and click to confirm.
- Cursor following: The suggestion window follows the cursor character by character. It appears above the current input character; if there is insufficient space above, it automatically flips below the cursor.
- Technical implementation: The Host side is responsible for counting word frequency and persisting the most recent 30 sessions, while the Client side is responsible for rendering the UI. Text insertion is implemented through the official event
actx.bail("slash/input-insert-text")and supports undo operations.
Typical Usage¶
- Input association: When you type
dsin the input box, the system suggests historical words that start withds, such asdsh,dsh_workspace, anddsh-word-complete. - Enter and editing: After confirming insertion, the cursor automatically moves to the end of the word. At this point, if you press Backspace to delete the just-inserted word, the window immediately pops up suggestions again.
- Special character handling: Typing
/or\does not trigger completion. The space key passes straight through and does not affect normal typing.
Installation and Enablement¶
This plugin only supports the Web Profile. The installation command is as follows:
dsh plugin --profile web add github:tuogusa/dsh-word-complete
After installation, restart DSH and use Ctrl+Shift+R to refresh the browser.
Update¶
# 方式一:CLI 更新(推荐)
dsh plugin --profile web update dsh-word-complete
# 方式二:重新从 GitHub 源安装/更新
dsh plugin --profile web add github:tuogusa/dsh-word-complete
Notes¶
- The plugin follows the MIT license.
- If the current session vocabulary list is empty, the plugin falls back to the locally persisted index (the cumulative vocabulary of the most recent 30 sessions).
- It is recommended to review the source code and license before installation to ensure compliance with your work environment requirements.
Summary¶
dsh-word-complete leverages context information from the current session to provide lightweight and efficient input assistance. For users who frequently need to type specific terms in DSH Web, this is a practical tool.
Official catalog: https://www.skillhub.cn/plugins/tuogusa/dsh-word-complete
GitHub: https://github.com/tuogusa/dsh-word-complete