dsh-hotwords: In-Session Hotword Completion

Introduction

When chatting with AI in DeepSeek Harness (DSH), the same set of proper nouns keeps cropping up: plugin name dsh-sidebar-entries, path C:\Users\...\cordis.patch.yml, function name scrubCards, package name @deepseek-ai/dsh-client-ui-slots. These terms appeared earlier in the very same session, yet your IME and dictionary have no memory of them. Typing letter by letter on a phone is slow and error-prone.

What This Is

ymf2317-tech/dsh-hotwords is a DSH client plugin that provides in-session hot-word autocompletion. It turns the proper nouns that have already appeared in the current conversation into a row of tappable thin bars above the input field — type half a word and it fills in the missing tail.

The plugin is developed by maintainer ymf2317-tech and categorized as “Client.” It makes no predictions; it does one thing only: words you’ve said or seen — type half and the rest is completed.

Core Features

Horizontal chips, not inline ghost text

Dimension Inline ghost text Horizontal chips (this plugin)
Touch accuracy 12px text vs. 44px finger — hard to hit 22px-tall blocks (26px on touch), reliably tappable
Multiple candidates Only one shown at a time Up to 4 at once, horizontally scrollable
Occlusion Overlays the body text / placeholder Pushes content up one line, never covers text
Readability Shows only the missing suffix Displays the full word

Installation & Activation

dsh plugin --profile web add dsh-hotwords

Restart DSH once after installing (a new bundle requires a restart to be mounted). If dsh-hotwords does not appear automatically in dsh.profile.bundles, add it manually:

{
  "bundles": [..., "dsh-hotwords"]
}

Then restart again.

Option B · Install from GitHub

dsh plugin --profile web add github:ymf2317-tech/dsh-hotwords

Option C · Local vendor

{
  "dependencies": {
    "dsh-hotwords": "file:vendor/dsh-hotwords"
  }
}

Typical Usage

  1. Chat normally in the session. The plugin silently harvests proper nouns from the conversation and renders nothing.
  2. Start typing. When the text before the cursor matches a prefix of a known word, a row of chips appears above the input field.
  3. Tap a chip (mobile) or press Tab (desktop) → only the missing suffix is inserted into the draft.
  4. Swipe the chip row horizontally to see more candidates; › N expands the remaining ones.

When there is no match, nothing is rendered and no height is occupied.

Where Words Come From

It recognizes only the “shape of a proper noun,” harvested from messages in the current session:

Shape Example
Backtick-wrapped `scrubCards`
Quoted phrase “knowledge base” / "cordis.patch"
File path C:\Users\...\vault
npm package name @deepseek-ai/dsh-client-ui-slots
Line-leading command /pua flavor
Identifier kebab-case, camelCase, PascalCase, SNAKE_CASE, contains digits
Filename with extension cordis.patch.yml (extension allowlist)
Chinese 2–4 character combinations, collected only after appearing ≥2 times

No built-in dictionary, no tokenization — autocompletion doesn’t need correct word boundaries, only prefix matching.

Noise-Reduction Rules

Early versions also pushed implementation details as candidates (touch-action, scroll-snap-type, pointerdown). Now sources are tiered:

Word source Eligibility
You typed it in a message One occurrence is enough
English/numeric proper nouns in assistant body text Must appear ≥2 times in the session
Content inside code blocks (CSS/JS) Weight lowered one tier; still needs 2 occurrences
Chinese Collected only from your messages
~80 property/API name blacklist entries Never listed; not even counted toward the quota

Technical Notes

  • Slot: conversation.input.dock (replaceRisk: none, officially guaranteed not to obscure host UI), order: -20
  • Text insertion uses only the official API: inputActions.insertText(text, captureInsertion()); the draftRev guard naturally prevents mis-insertion when a chip is tapped mid-typing
  • What gets inserted is the missing suffix, not the whole word (the prefix is already in the draft; inserting the full word would duplicate it)
  • Conversation reading uses useTrajectory from slot standard props — no DOM crawling
  • No host DOM nodes are moved or removed; rendering happens only within its own slot entry
  • Touch gestures: pointerdown records the start point, pointermove with displacement > 8px is classified as a swipe, pointerup without a swipe triggers insertion — horizontal swipes follow the finger, only a clean tap activates
  • phase !== 'plain' or IME composition state → no response, to avoid interrupting Chinese input
  • The host-side component is an empty shell; additionally provides a read-only diagnostic route GET /hotwords/probe (for troubleshooting, safe to ignore)

Known Limitations

  • Per-session: the word list is derived from the current session’s messages; it does not carry over across sessions.
  • Chinese requires two occurrences: 2-character Chinese combinations are inherently common (e.g., “this is,” “can not”), so the word must appear twice in the session to become a candidate; English/numeric proper nouns need only one.
  • Suffix completion only: it matches the prefix of the token before the cursor; mid-word completion is not supported.
  • Word list capped at 600 entries; overflow is evicted by weight.

Use Cases

Ideal for scenarios where you frequently type proper nouns (plugin names, paths, package names, commands, identifiers, file names, etc.) within a DSH session. The plugin runs with the current DSH process permissions. Review the source code and license (MIT) before installing.

Conclusion

dsh-hotwords provides a row of tappable hot-word chips above the input field, solving the problem of quickly completing proper nouns on mobile or desktop. It relies on no dictionary or tokenizer — it only harvests proper-noun shapes from the current session’s messages, applies tiered noise reduction by source, and uses the official API to insert only the missing suffix, avoiding duplication.

Plugin directory: https://www.skillhub.cn/plugins/ymf2317-tech/dsh-hotwords

GitHub: https://github.com/ymf2317-tech/dsh-hotwords

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye