Preface¶
When reading model responses in DSH, encountering technical terms or formula fragments often leads to two common practices: sending a follow-up message like “What does this term mean?”—which enters the session log and consumes the main conversation context, requiring users to scroll up as the context grows—or looking up information externally, which interrupts the reading flow.
Here, we introduce the community plugin dsh-explain-selection (Maintainer: KLAX54ix, Category: Client). By selecting text within the response body and right-clicking to “Explain,” a commentary card pops up adjacent to the selection. You can continue selecting or clicking on terms within the card to ask follow-up questions, supporting dragging, pointer lines, and multi-level nesting. Explanations are generated via streaming by the host through ctx.llm and are not written to the session log or the main conversation context.
What is this?¶
dsh-explain-selection is a client plugin for DeepSeek Harness (DSH), currently at version 0.1.1, licensed under MIT. Source repository: https://github.com/KLAX54ix/dsh-explain-selection; Community Directory Page: https://www.skillhub.cn/plugins/KLAX54ix/dsh-explain-selection.
It solves the core problem of disambiguating terms in situ without treating explanation Q&A as conversational messages. Cards float above the response. When switching sessions or projects, the cards and any in-progress requests are destroyed together; answer caches exist only in memory and are invalidated upon refresh or restart.
Core Features¶
In-place Explanation and Nested Follow-ups¶
- Select text in the response → Right-click → Explain; a card pops up adjacent to the selection.
- Terms with dotted underlines in the explanation are clickable, opening a new card nearby. You can also select any text within the card body to explain it further; the nesting depth is unlimited.
- Each card may display light gray text at the bottom, such as
Context included (172 chars)orContext included (Parent term "Magnetic susceptibility" + 68 chars), indicating the actual disambiguation information carried into this explanation.
Top-level explanations include 120 characters before and after the selection. Follow-up questions within a card include the parent card’s explanation segment + the parent term. Answers are constrained to within two sentences and a maximum of 80 characters. If the same term in the same sentence is explained repeatedly, an in-memory cache is used to avoid sending duplicate requests.
Card Interaction¶
| Action | Operation |
|---|---|
| Copy | Copy in the right-click menu |
| Move | Drag the ⣿ handle on the left side of the header; after dragging, ⤺ appears on the header to return to original position, or double-click the handle |
| Pointer Line | During dragging, a faint dashed line points back from the card to the explained text |
| Page Scroll | Holding the card allows scrolling the conversation with the mouse wheel |
| Collapse / Expand | Header – collapses into a small capsule attached to the original text; click the capsule to expand |
| Close | Header ×; closing a parent card closes child cards together |
| Close Right-click Menu | Esc, click elsewhere, scroll, or resize window |
When the page scrolls or zooms, undocked cards follow the original text; dragged (docked) cards stay where the user placed them. Collapsing a parent card hides child cards together; expanding returns them to their original positions.
Relationship with Main Conversation¶
- Explanations do not enter the session log: The host-side process calls the model directly via its own route, bypassing the agent loop.
- When not using the default session’s model switching logic, the plugin uses the current default model (Known limitation in README).
- If the selection crosses word boundaries, the plugin will explain that this is not a single word and identify the original words it belonged to; it will not fabricate meanings.
Performance and Implementation Details¶
The plugin queries the model’s supported reasoning effort tiers and selects the cheapest one (usually off). This avoids the DeepSeek adapter’s default high reasoning consuming max_tokens, which could cause card truncation. The maximum selected text length is 400 characters, and the output limit is 256 tokens. Client-side text is currently hardcoded in Chinese and does not support ctx.locale.
Installation and Activation¶
Command-line installation (when not in a Desktop-exclusive profile):
dsh plugin add github:KLAX54ix/dsh-explain-selection
DSH Desktop: The desktop profile is managed by the Electron application, so command-line additions will be rejected. Please go to Settings → Plugins → Add Plugin within the app and enter:
github:KLAX54ix/dsh-explain-selection
Restart the application once after installation: index.js is a host-side script loaded only at startup; client.js will hot-reload automatically.
The plugin runs with the permissions of the current DSH process. It is recommended to review the repository source code and MIT license before installation. This plugin was developed during the DSH developer preview (README mentions 0.2.0-rc.2). Official breaking changes may occur. If the plugin fails after an upgrade, please submit an issue on GitHub.
Typical Usage¶
- Open a response containing technical terms.
- Select an unfamiliar word (e.g., “Critical Exponent”) → Right-click → Explain, and wait for the stream to complete (the interface may show
Explaining...). - Continue selecting terms like “Magnetic susceptibility” or “Power law” within the card, or click on dotted-underlined terms to drill down layer by layer. The main conversation list should not show any new explanation messages throughout this process.
- Drag the handle to adjust position; when reading long responses, you can collapse the card into a capsule or close it with
×to end the explanation chain.
Whether a term is clickable depends on whether the model outputs the [[Term]] marker as agreed. If there is no marker, you can still use “Select + Right-click” for nesting. The plugin does not perform bulk paragraph explanation; caches are not persistent.
Use Cases and Notes¶
Suitable for: Developers or heavy users reading long responses in the DSH client/Web who need to quickly disambiguate terms or formula fragments and want to keep the main conversation containing “only original task messages.”
Notes:
- Explanations depend on the current default model and network; if clues are insufficient, the model will admit uncertainty.
- Cards are not retained after switching projects or sessions.
- The Community Directory (SkillHub) has no official affiliation with DeepSeek or 幻方 (High-Flyer); the DSH ecosystem philosophy is “Everything is a plugin,” and this plugin is a community-maintained client extension.
Conclusion¶
dsh-explain-selection implements “Select → Explain → Nested follow-up within card” as a reading aid that does not write to the main conversation context, making it suitable for digesting technical answers in DSH. Directory Page: https://www.skillhub.cn/plugins/KLAX54ix/dsh-explain-selection; Source Code & Full Documentation: https://github.com/KLAX54ix/dsh-explain-selection.