Preface¶
When asking the Agent in DSH to modify a document or explain a passage, the common approach is to copy the file path, paste an excerpt, and add a note like “there’s a problem here.” When files contain line breaks or the preview and conversation are on different sides, references can easily get misaligned, and double-checking takes time. The dsh-doc-annotate plugin introduced below is a client-side extension released by maintainer YHzed: it opens files or documents in the right sidebar, lets you annotate selected text or box-selected regions, and then places the annotations (including location and quoted source) into the current Agent conversation draft. You review and then send it yourself. Annotations are stored only in your local browser; they rely on no accounts, databases, or additional services.
What Is This¶
dsh-doc-annotate (repository YHzed/dsh-doc-annotate) targets document reading and conversational collaboration within the DSH Web interface. The plugin injects right-sidebar and conversation-related UI via the DSH client, reusing DSH’s built-in file preview capabilities; the host-side entry is an empty shell that loads the client, which is the plugin’s standard implementation. The current README lists the version as 0.2.0-personal.1, license MIT; the community catalog page is at SkillHub.
Core Features¶
Based on the repository README and package.json descriptions, the verified capabilities include:
- Right-side preview and file opening: via the “Document Annotation” entry at the top of the conversation, enter a file path or open a document from the file tree.
- Text annotations and region annotations: after selecting text in the preview, click the floating “Annotate” button; for content that can’t be covered by a selection (e.g., images), use the top toolbar’s box-select button to define a region.
- Annotation management and classification: comments can be saved; classifications include suggestion, issue, question, etc.; you can mark resolved, filter, edit, archive, and undo.
- Send to Agent conversation: clicking “Send to Agent” writes the file location, source text, and comment into the input draft. It does not automatically send for you, nor does it start another Agent or modify files.
- Local storage: new annotations are saved to the current browser’s localStorage under the current DSH address; there is no cross-device sync. Uninstalling the plugin itself does not actively erase the browser’s annotation data (do not casually clear website data).
Old-version annotations can be migrated via “Preview upgrade annotations → Confirm upgrade annotations”; by default they are grouped by the original conversation, and migration backups are retained. Saving relies on browser Web Locks (supported on localhost in current Chrome/Edge); without Web Locks the plugin remains read-only. Page numbers or region references for PDFs, Office files, and images cannot be treated as source code line numbers; “Relocate reference” only updates the position after user confirmation and does not alter the source text.
Installation and Activation¶
Install via the DSH sidebar “Plugins” page, setting Source as (consistent with the README):
github:YHzed/dsh-doc-annotate
Alternatively, use the DSH CLI (with web as the target profile):
dsh plugin --profile web add github:YHzed/dsh-doc-annotate
The repository includes the built client, so general users do not need to build it themselves. After installation, confirm “Document Annotation” is enabled. If an older version is already installed on the plugin page, it is recommended to save or copy unsaved drafts, then uninstall the old version and install from the source above; via CLI you can run the command directly to replace it. After replacing a loaded version, restart DSH and refresh the page. No npm package has been published yet.
The plugin runs within the current DSH process and browser environment; before installation, review the GitHub source and the MIT license to ensure it meets your usage and compliance requirements.
Typical Usage¶
The main workflow from the README can be reproduced in order:
- Click “Document Annotation” at the top of the conversation, enter a file path or open the file tree.
- In the preview, select text and click the floating “Annotate”; for images and similar content, use the top toolbar’s box-select button.
- Write a comment and save it. First-time use does not require creating a workspace or entering any identifiers.
- You can classify by suggestion/issue/question, mark resolved, filter, edit, archive, and undo.
- Click “Send to Agent” to place the file location, source text, and comment into the input box; review and then send it yourself.
For HTML iframes, Excel canvases, or other content where text selection is not possible, use box selection in place of text-selection annotations.
Suitable Scenarios and Notes¶
Suitable for: Code or document review against workspace files in DSH, where you want annotations bound to the original location and then consolidated into an Agent conversation all at once.
Notes:
- Annotations are tied to the browser and DSH access address; switching browsers, ports, or clearing website data does not automatically carry the data over.
- Sending only fills the conversation draft; it does not send on your behalf or modify source files.
- The personal version has a clear scope: unintegrated host persistence, independent tasks, and other experimental features are not bundled in the installation package and are not prerequisites for everyday use.
Maintainers developing within the repository require Node.js 22+; validation commands are npm run build, npm run test:smoke, npm test, intended for contributors rather than the typical installation path.
Conclusion¶
dsh-doc-annotate consolidates “read documents on the right → annotate locally → draft into Agent conversation” into a repeatable workflow, reducing manual copying of paths and excerpts. The directory and documentation are governed by the community site and GitHub:
- Catalog page: https://www.skillhub.cn/plugins/YHzed/dsh-doc-annotate
- Repository: https://github.com/YHzed/dsh-doc-annotate