In a DeepSeek Harness (DSH) session, handling selected text usually involves copying, quoting, or asking the AI about it. The default method for sending requests injects the text directly into the current conversation context, which can easily cause redundant history in long conversations. The dsh-selection-toolbar plugin integrates common text-processing actions into the text-selection workflow by providing a floating toolbar above the selected area.
When text is selected in a DSH session, a small toolbar appears above the selection.
Core Features¶
The toolbar provides the following actions:
- Copy: Copy the selected text to the clipboard.
- Quote: Insert the selected text as a Markdown blockquote (
> …) at the cursor position in the input field. - Ask: Open an inline input box and send the question together with the selected text.
- Explain, Translate, Summarize: Send preset request templates that pass the selected text to the model as content.
/btw Side Question¶
Clicking the /btw button in the toolbar triggers the side-question feature. This is an independent route with the following characteristics:
- Does not pollute the session: Side questions do not create a session, write to session history, or use tools.
- Context-based: Answers are generated only from the most recent N session messages and the selected text, without internet access or file reading.
- Independent display: The answer is displayed in a centered modal, supporting copying the answer, asking another question, or clearing the history.
Settings¶
The plugin supports the following parameters in the settings panel:
- Popup delay: How long to wait after selection before showing the popup (0–500 ms).
- Feature toggles: Enable or disable individual toolbar buttons; disabled buttons disappear immediately from the popup.
- Answer destination: Choose whether the action goes to the main conversation (as a message in the current conversation) or to a side question.
- Side-question context size: The number of recent messages included for a side question (5–50, default 20).
Installation¶
Install it using the official command:
dsh plugin --profile web add github:suiyideali/dsh-selection-toolbar
After installation, restart the web application to load the plugin.
Dependencies¶
This plugin depends on the following libraries:
@deepseek-ai/dsh-settings@deepseek-ai/schemastery
Conclusion¶
This plugin provides a complete text-selection interaction solution. With flexible settings, it allows users to switch freely between the “main conversation” and “side questions,” making it suitable for developers and users who frequently work with context fragments.