dsh-at-file
FSMargoo/dsh-at-fileCodex 风格的 `@file` 文件引用,输入框里直接搜索并引用工作区文件。
在 DSH Web 的助手回答完成后,额外调用一次模型,自动高亮其中的关键点、定义、警告和问题。
English | 简体中文
Automatic key-point, definition, warning, and question highlighting for AI answers in DSH Web. The main answer keeps streaming as usual; annotations are generated after the answer completes and rendered in place.
Highlights answers like PDF annotations. In long AI responses, important information is often buried in sentences rather than headings. This plugin makes those sentences easy to scan.
After an answer completes, the plugin makes one additional model call to identify notable passages. It uses deepseek-official/deepseek-flash by default. This call only produces annotations; it does not affect the main answer or rewrite the original session log.
| Type | Color | Use |
|---|---|---|
key-point | Bright yellow | Conclusions, core facts, and the most important information |
definition | Blue | Concept explanations, terminology, and boundary conditions |
warning | Bright red | Risks, limitations, deprecations, and counterintuitive caveats |
question | Green | Open questions, unresolved points, and user decisions |
Colors above describe the light theme. Dark theme automatically adjusts brightness and opacity for readability.
Run this in the plugin directory:
npm install
npm run build:client
Install it into the DSH web profile:
dsh plugin --profile web add github:Matcha-Eason/dsh-answer-highlighter
The plugin uses deepseek-official/deepseek-flash to generate annotations. This is a separate auxiliary model call and consumes additional tokens. To use another model, override provider and model in the plugin configuration. To follow the main answer model, configure both fields with the same route.
Main answer completes
↓
Read user question and answer text
↓
Call deepseek-flash to generate annotations
↓
Validate quotes and write local JSONL
↓
Browser polls the annotation API
↓
Locate text in the DOM and render highlights
The main answer and annotation pipelines are separate. Annotation failures do not affect the main answer.
Annotations are stored at:
$DSH_HOME/plugin-data/dsh-answer-highlighter/annotations
Set DSH_ANSWER_HIGHLIGHT_DATA to use another directory. Each session gets one JSONL file, with one line per assistant message. Empty annotation results are also recorded to avoid repeated model calls.
The browser must support the CSS Custom Highlight API. Supported browsers show the four-color highlights; unsupported browsers keep the page unchanged. Safari is currently unsupported.
Why are there no highlights?
Does it consume extra tokens?
Yes. After each answer completes, the plugin makes one separate call to deepseek-flash.
Are old sessions backfilled?
No. Only assistant messages that complete after the plugin is running are annotated.
dsh plugin --profile web remove dsh-answer-highlighter
To remove local data completely, delete the default storage directory.
MIT