Introduction¶
The philosophy of DSH is “everything is a plugin”. The Web UI side provides slots such as sidebar.panellist and main through ctx.slots, allowing third-party plugins to mount full-page panels. If your goal is to look up words and memorize new ones while reading English articles in the browser, looking them up one by one and manually copying them into tools like Anki is costly. The plugin introduced below puts this entire workflow into a sidebar entry of DSH.
This plugin is called dsh-wordlink, maintained by lukebest. It is categorized as a Client-side plugin. Currently, it has 0 stars on the community directory, version 1.1.0, and license MIT. In short, it adds a WordLink entry to the sidebar; when opened, it displays an independent reading/lookup/review panel, and all data is stored locally in the browser. Before installing, you should read the source code to ensure the slot injection method is compatible with the current DSH version.
Core Features¶
The following explains the capabilities listed in the README one by one. Each point represents an existing, verified feature; there are no undisclosed capabilities involved.
- Graded Meaning Annotation. Includes three graded English articles (A2/B1/B2) and a dictionary of approximately 110 high-frequency entries, annotating Chinese meanings for words according to CEFR levels (A1–C1). The dictionary itself is a curated small list; the README explicitly states it is mainly for demonstrating the annotation chain, and you can use the “Tap non-cataloged word to supplement meaning” feature later to expand it while reading.
- Difficulty Threshold. It does not fill the screen with annotations: it only annotates words above the selected difficulty level. Options include: All / A2+ / B1+ / B2+ / C1. The lower the threshold, the denser the annotations.
- Click to Lookup. Clicking any English word pops up a card displaying IPA, part of speech (POS), level, Chinese meaning, and example sentences, with a pronunciation button available.
- Self-Create Meanings for Non-cataloged Words. Tapping a word not in the dictionary allows you to directly input your own Chinese meaning and save it. Once saved, it immediately enters the dictionary and the vocabulary list. This is the formal entry for expanding the word list, not a hack.
- Paste Arbitrary Text. Paste English text from a webpage or article into “My Text”; the system performs real-time segmentation and applies the same annotation and lookup logic. This means it does not rely on built-in articles; your own materials can use the same chain.
- Batch Import Vocabulary. Paste text into the vocabulary list or select a
.txt/.csvfile to batch import “word + Chinese meaning”. Separators supported include Tab, comma, semicolon,=, and space. Rows containing only a word can be imported first, with meanings added later. - Vocabulary List and Sorting. Collect and remove words, sort by due time, and highlight due words.
- Spaced Repetition Review. An SM-2 variant with three levels of rating: Again / Hard / Good, corresponding to the keyboard keys
123. The spacebar reveals the meaning. The plugin schedules the next review automatically based on memory difficulty. - Learning Statistics. The panel displays the number of collections, due today, mastered, consecutive days, accuracy, a 7-day learning bar chart, and vocabulary difficulty distribution.
- Interface and Theme. Bilingual Chinese/English switches automatically with the DSH Client locale (en / zh / zh-CN / zh-Hans); the Light/Dark theme only uses the host-provided
--dsw-alias-*theme tokens, without a built-in color scheme. - Local Persistence. Learning data is written to the
wordlink.state.v1key inlocalStorage. There is no upload and no network requests. Clearing site data will clear the vocabulary list and statistics.
Installation and Enablement¶
First, a note: The README lists two installation commands—one for the npm package and one for source code—because the plugin declares both an npm name and a Git address. Both are from the original documentation, but the source code installation is preferred.
From source code installation (no npm package required):
dsh plugin --profile web add github:lukebest/dsh-wordlink
From npm installation (README notes “After publishing to npm”):
dsh plugin --profile web add dsh-wordlink
After installation, simply restart or refresh the DSH Web page. The WordLink icon will appear in the sidebar. If you don’t see the icon, there are two backup entries to look for: at the bottom of the sidebar and in the “Session Title Bar”. The plugin does not involve account permissions, template types, or basic parameters because it is a pure client-side plugin and does not request file, network, or command permissions.
The directory structure corresponds to several key files; take a look before making changes:
package.json # bundle manifest: dsh.bundle.patch + dsh.client
cordis.patch.yml # injects dsh-wordlink into the Host combination
index.js # Host half (pure Client plugin, empty implementation)
client.js # Web Client half: slot registration, UI, dictionary, SRS
locale/en.json # plugin metadata (English)
locale/zh.json # plugin metadata (Chinese)
icon.svg # sidebar icon
Typical Usage¶
This section does not use quotes; it directly describes reproducible operations. The following steps are taken from the functional paths described in the README.
- Install the plugin, refresh the page, and click the WordLink entry in the sidebar to open the full-page panel.
- In the difficulty threshold, switch from “All” to “B1+”. Only words higher than B1 in the three built-in articles will have Chinese meanings, avoiding a cluttered screen.
- Click any English word while reading; the pop-up card shows IPA, POS, level, Chinese meaning, and example sentences, and includes a pronunciation button.
- Click a word not in the dictionary, type your own Chinese meaning in the pop-up input box, and save. This meaning immediately enters the dictionary and vocabulary list.
- If you want to read your own materials, paste the English text into “My Text”; the annotation and click-to-lookup logic apply automatically, consistent with the built-in articles.
- Organize vocabulary: use batch import, paste “word + Chinese meaning” in the vocabulary list, and separate with Tab, comma, semicolon,
=or space; rows with only a word can be imported first, with meanings added later. After import, vocabulary sorts by due time, and due words are highlighted. - During review, rate each word with
1(Again),2(Hard), or3(Good), and press space to reveal the meaning. The learning statistics on the right side of the panel will update in real-time: collection count, due today, mastered, consecutive days, accuracy, and the 7-day bar chart.
After practicing, simply exit the chat; the plugin does not contain any chat-side behavior.
Implementation Points¶
This plugin registers as two roles simultaneously; understanding this will help with troubleshooting later.
- It is a pure Client-side plugin.
client.jsregisters viawindow.__ModuleLoader__.load({ id: 'dsh-wordlink', factory(require) {...} }). React is obtained only from the host module table viarequire('react')and does not import any Harness Client internal packages.index.jsis the Host half with an empty implementation; its only purpose is to allow thecordis.patch.ymlbundle patch to locate this package. Therefore, inpackage.json,dsh.bundle.patchpoints to./cordis.patch.yml, anddsh.clientdeclaresplatform: 'web'andinject: ['@deepseek-ai/dsh-client-ui-conversation', '@deepseek-ai/dsh-client-locale']. - Slot Registration. Slot registration happens in four places, all within
apply(ctx).ctx.get('locale')+ctx.effectfirst registers the Chinese and English dictionaries for thewordlinknamespace, then retrieves the translation function vialocale.bind('wordlink').ctx.slots.inject('sidebar.panellist', ...)registers the sidebar entry (id: 'wordlink',order: 30).ctx.slots.inject('main', ...)registers the full-page panel (key: 'wordlink'), and the sidebar dispatches opening by the same ID. Additionally,sidebar.footer.actionandconversation.session.header.utilitiesprovide two backup entries; clicking them callslayout.selectPanel('wordlink'). - Styles. Regarding styles, it does not manipulate the host DOM, does not use iframes, and uses inline
<style>within components. It only uses--dsw-alias-*theme tokens. It inherits the background and border levels of the host sidebar and main area; changing theme tokens causes the plugin’s colors to follow suit. Hardcodingbackground:color values in the plugin is not recommended.
Applicable Scenarios and Notes¶
Suitable for these types of people:
* Those who want to do vocabulary learning while reading English articles in the DSH Web UI.
* Those who do not want to export vocabulary to third-party tools and prefer the boundary to remain within the browser.
* Those who need SM-2 spaced repetition instead of a custom schedule.
The plugin’s positioning is a “Learning Panel”; it does not solve fluency issues, nor does it include AI intensive reading explanations beyond real human pronunciation.
Points to note:
* This is a client-side plugin, running under the user permissions of the current DSH process. It does not request file, network, or command permissions; learning data is written to the browser’s localStorage. Clearing site data will clear both the vocabulary list and statistics, so ensure you back up before exporting.
* The built-in dictionary contains only about 110 words. The README notes that it is “mainly for demonstrating the annotation chain.” For new words during cold start, meanings must be supplemented one by one via “Tap non-cataloged word to supplement meaning” or via batch import.
* Browser visual regression screenshots are currently not provided; the README suggests submitting an Issue if you encounter layout problems.
* Composition-wise, it only declares dependencies on @deepseek-ai/dsh-client-ui-conversation and @deepseek-ai/dsh-client-locale with loose version constraints. Check against your current project version before installing, and then confirm that the plugin source code and license (MIT) are acceptable.
* The development verification environment is DSH 0.2.1-rc.5 and Node 26.x.
* Architecturally, it is a platform: 'web', immediately: true plugin that only takes effect for the Web UI; it does not enter the server and CLI startup processes, so installing it in other environments will not provide an entry point.
* The plugin does not initiate external network requests and has no extra npm dependencies, meaning it can be used completely even if the network is disconnected.
Conclusion¶
A one-sentence summary: dsh-wordlink provides a complete chain of graded annotation, click-to-lookup, vocabulary list, and SM-2 review within the DSH Web UI, keeping data locally in the browser. It is suitable for consolidating daily English reading vocabulary into a single panel. Plugin information and source code are available at https://github.com/lukebest/dsh-wordlink, the directory page at https://www.skillhub.cn/plugins/lukebest/dsh-wordlink, license MIT, version 1.1.0.