How to use dsh-annotation
DSH Web browser annotation plugin: mark selected assistant reply text with labels, press Enter to send the message to the model, and replies respond to each numbered item sequentially.
This article is auto-derived from indexed fields (wiki / faq / compatibility_json), not freshly AI-generated.
This article is derived from the plugin's already-indexed fields (wiki / faq / compatibility_json / readme), not freshly generated by AI. Source field is noted at the end of each section.
Quick start
dsh-annotation
— source: plugin_wiki.wiki_content
Install & verify
dsh plugin --profile web add @changfenhuang/dsh-annotation
Run the command above in your DSH Web Profile. Then enable the plugin in the plugin list.
— source: plugins.install
Key points
- Pure browser-side: everything lives in
client.js(a hand-written CJS bundle, no build step, served no-cache per request) - Message format (the literal protocol block sent to the model; follows the DSH
localepreference — zh or en): - Locale-aware: UI copy and the protocol block follow DSH's
localeservice (zh/en, live switch); historical bubbles stay parseable across languages; missing locale service falls back to zh - Linux.do
— source: plugin_wiki.readme_en (fallback readme_raw)
FAQ
Does this plugin require additional configuration after installation?
No. The installation command is one-time, the plugin has no configuration items; if you need to uninstall, simply follow the standard DSH plugin removal process.
Will annotation blocks be displayed in the message bubbles I send?
No. Annotation blocks are hidden from the user bubble's DOM before the browser renders it. The bubble only contains your question and the 'Annotations ×N' label. Hovering over the label lets you view the original text and content of each annotation. After refreshing, historical messages will be automatically restored.
Will annotations be preserved when switching to other conversation windows?
No. Annotations only exist within the current session. When switching sessions or creating a new session, the plugin automatically clears collected annotations to avoid cross-session contamination.
Is it compatible with focus view plugins like dsh-focus-chat?
Compatible. The plugin recognizes assistant rows in DSH main view (with data-time-hover-root) and assistant rows in focus-chat focus view (with data-focus-flow and container class containing 'assistant'). Annotation selection and reply chips work properly in both views.
Will the plugin intercept Enter when using Chinese input method?
No. The plugin's Enter interception has triple protection via isComposing / keyCode 229 / compositionend 50ms delay. Enter keys during Pinyin or third-party input method composition or on-screen confirmation won't be incorrectly judged as submission.
Will it modify the DSH core code?
No. cordis.patch.yml only inserts one line with its own id, profile patch keeps empty array, DSH core files remain untouched; Node side is empty implementation, all logic runs client-side in browser.js.
— source: plugin_wiki.faq_json
Compatibility
- DSH: 未声明
- Node: >=20
- Platforms: 跨平台
— source: plugin_wiki.compatibility_json
Pitfalls
Review the upstream repo before installing. This guide is auto-derived from indexed fields and may lag the latest release. If anything contradicts the official docs, treat the upstream source as authoritative.
— source: general rule