Introduction¶
When running conversations using the DeepSeek Harness Web GUI, you may encounter a segment of model output you want to follow up on. The conventional method is to copy the text, open a new conversation, paste it, and continue asking. However, when the context is long, copying loses position information, and the newly opened conversation doesn’t carry the original conversation’s context. dsh-plugin-selection-comments solves this problem: you can directly select text from the model output in the Web GUI to pop up a comment box for annotations, or click “More Details” to open an independent floating window detached from the main conversation to continue chatting.
The following introduces this plugin. It is a standard DSH bundle maintained by AaronOhO, hosted on the community directory, categorized as a client plugin, currently with 0 stars, version 0.1.0, and license MIT.
Positioning: Two Surfaces¶
The plugin does two things, both happening on the browser side:
- Select text output by the assistant to pop up a quick action bar, which allows adding the text along with your comment “to conversation”, or clicking “More Details” to open an independent session window.
- The independent session window is a fork of the current session at the last completed round: context is complete, but it doesn’t modify the main session and doesn’t appear in the sidebar.
The plugin does not inject iframes, does not replace the application root node, and all UI is registered via Harness’s Slots (shell.overlay, conversation.input.dock) and rendered by React. It does not require Host-side configuration, nor does it modify model or API settings.
Core Features¶
1. Selection Comments¶
Select any text in the model output, and a quick action bar will float up, providing two actions: “Add to Conversation” and “More Details”.
Clicking “Add to Conversation” will float a comment box next to the selection, quoting the selected text. The comment content can be written or not; confirmation is done via Cmd/Ctrl + Enter or the send button. After confirmation:
- The selected text is persistently highlighted in blue, with a numbered orange marker appearing at the end of the range;
- A capsule button “N comments” appears above the input box;
- Clicking the capsule opens a scrollable floating comment list, each showing the number, selected text, and user comment, supporting editing and deletion;
- The
×on the capsule deletes all comments in the current session at once.
Comments are saved in browser localStorage (dsh-selection-comments:v1:*), isolated by session. Highlights, numbering, and capsules are restored after refreshing the page.
2. Send Comments with Messages¶
When sending the user’s next message, the plugin puts “Selected Text + User Comment” as a blockquote into that message, visible in the conversation. After successful sending, comments are automatically cleared, and highlights, numbering, and capsules disappear together. The text has already entered the conversation history and belongs to persistent conversation content.
If the input box is empty but has comments, the send arrow on the right will revert to the normal blue clickable style (the host originally disables it to semi-transparent). At this point, clicking the arrow, clicking “Send Comments”, or pressing Enter can all send the comments as a separate message.
If sending fails, comments remain pending and will be included again in the next attempt.
3. Independent Session Window (More Details)¶
After selecting text, click “More Details” to open a floating window with the title “More Details”.
The conversation in the window is a fork of the current session at the last completed round: context is complete, but completely independent of the main session; the main session will not be modified. The window has its own input box and send/stop buttons, supporting dragging the title bar to move, dragging the bottom-right corner to resize, collapsing/expanding, and closing.
This independent session will not appear in the sidebar—the plugin hides its sidebar row by session id ([data-row-key="session:<id>"]) and remembers the hidden list. Clicking “More Details” again with the same selected text will reuse the same independent session without forking again. Window geometry is only remembered on the current page and is not preserved across refreshes.
4. Implementation¶
The plugin is divided into a Host half and a Client half:
| Part | File | Function |
|---|---|---|
| Host half | index.js |
Inert loader row, all behavior happens on the browser side |
| Bundle patch | cordis.patch.yml |
Inserts selection-comments row |
| Client module | client.js |
The built browser bundle, loaded by window.__ModuleLoader__.load |
| Source modules | src/*.js |
Store, persistence, anchors, CSS highlighting, comment surface, side chat window, Slot registration |
| Shared contract | docs/CONTRACT.md |
State structure, data/action API, entry points, verification checklist |
Highlighting uses the CSS Custom Highlight API (::highlight(...)), so React re-rendering won’t wipe it out. The selection is captured by precise text references, row anchor keys (data-chat-anchor-key), text offsets, and context. After stable streaming output or historical reload, the range will be repositioned based on text references and context. Only assistant output lines can be selected.
The independent window hangs a real Conversation instance via the shared conversation.content Factory and SessionProvider, directly reusing the host’s chat and input box.
5. Known Limitations¶
- Comment markers are local to the browser before sending; they are not synced across devices or Harness instances; clearing site data will delete them. After sending, that text stays in the session like a normal user message.
- Side chat sessions are real fork sessions in the local session store; the plugin simply hides their sidebar rows. After clearing browser data, previously created side chat sessions will reappear in the sidebar—they are inherently normal sessions.
- Only one side chat window is supported at a time.
- When the window is collapsed, the conversation body is folded, so unsent drafts in the side chat input box before collapsing are not preserved.
Installation and Activation¶
The plugin is a standard DSH bundle (dsh.bundle.patch + dsh.client), and engines.dsh requires ^0.2.1-alpha.2. There are three installation methods:
# Install from workspace checkout
dsh plugin --profile desktop add link:/absolute/path/to/dsh-plugin-selection-comments
# Or install by package name
dsh plugin --profile desktop add dsh-plugin-selection-comments
Direct installation from GitHub:
dsh plugin --profile desktop add AaronOhO/dsh-plugin-selection-comments
You can also install the bundle from the current directory in the Harness plugin manager via “Settings → Plugins → Add Plugin”. Enable the line “Selection Comments and Independent Session”, then refresh the page to load the Client bundle.
To install into the desktop profile of the Desktop application (corresponding to local directory installation in the plugin manager):
node scripts/install-desktop.mjs # Defaults to ~/.dsh/profiles/desktop
# Then restart DeepSeek Harness to let the profile bundle layers recombine
This script backs up package.json next to itself, appending only linked dependencies and bundle selection. Delete one of them, or turn off the bundle in the plugin manager after a restart, and you can uninstall the plugin.
After uninstalling, both floating layers and sidebar hiding rules will disappear; the comments themselves remain in browser storage, unless manually cleared.
Typical Usage: Verification¶
The plugin comes with a standalone end-to-end verification report (43/43 checks, covering light/dark mode, and persistence after refresh), see docs/verification/REPORT.md and the machine-readable docs/verification/report.json.
Automated verification uses the packaged isolated Harness runtime with Playwright:
node build.mjs
node scripts/e2e.mjs http://127.0.0.1:12447 "<token>" .devhome-verifier/shots
scripts/e2e.mjs runs against any running DSH instance (passing base URL and ?token=). Locally, you need to be able to resolve playwright, or specify it with DSH_PLAYWRIGHT=/path/to/playwright. Tests cover the checklist in CONTRACT.md: toolbar position, creation/editing/deletion/all-deletion of comments, highlighting and markers, list overlay, independent window and input box, dragging/resizing/minimizing, sidebar hiding, refresh persistence, light/dark themes, console cleanliness.
Use Cases and Notes¶
Suitable for those who frequently review long answers in the Web GUI and need to repeatedly ask follow-up questions about specific paragraphs. Selection comments solve the problem of losing context when copying and pasting, while the independent window allows for branch follow-ups without polluting the main conversation.
Two usage notes:
- The plugin runs with the permissions of the current DSH process; check the source code and license (MIT) before installing.
- Unsent comments exist only locally in the browser. To use the same batch of comments across machines, you must first send the comments with a message to get them into the conversation history.
Conclusion¶
The value of this plugin lies in bringing the desktop ChatGPT text selection annotation habits into the DSH Web GUI: selection is the anchor, comments are traceable, follow-ups have independent space, and no need to touch Host configuration. Directory page: https://www.skillhub.cn/plugins/AaronOhO/dsh-plugin-selection-comments, Source code: https://github.com/AaronOhO/dsh-plugin-selection-comments.