When debugging or reading long conversations in a DSH environment, quick explanations for a specific term or code snippet are often needed without consuming the context of the main session. Traditional sidebar forks consume a large number of tokens, while manual copy-and-paste is less efficient. dsh-loupe provides a lightweight, floating-window-based explanation solution.

Plugin Positioning

dsh-loupe is a client plugin maintained by Rice00. It does not create a new session, does not register tools, and only opens a floating window when text is selected, providing explanation, follow-up, and saving functionality.

Core Features

Feature Description
Popup on selection Selecting any text in the message body makes two entries, “Explain / Settings”, appear below the selection.
Floating-window response A single-instance floating window supports streaming Markdown, is draggable, and remembers its position.
No session created It sends only one model request, writes no session logs, and keeps the left list clean.
Built-in context It uses the plugin’s independent context.md (2200-character limit) instead of pulling in the agent’s full context.
Auto-accumulation It writes “what was selected → what was inferred” back to context.md, making repeated questions about the same term more precise.
Full history retention All Q&A records are saved in history.jsonl, with support for search, pagination, and restoration.
Save as a formal session Explanations can be saved as formal sessions in the left list.
Bilingual interface The UI and prompts support switching between Chinese and English.
Collapsible reasoning The model reasoning process is collapsed by default.
Theme following The floating window UI follows the host light and dark theme.
Zero configuration It borrows the host llm service, so no API Key is required.

Installation and Enablement

Use the official installation command to add the plugin:

dsh plugin --profile <profile> add dsh-loupe

Note: If you modify local code and want the changes to take effect, restart that profile.

Typical Usage

  1. Select a piece of text in the message body; a floating layer appears below the selection.
  2. Click “Explain”; the floating window submits the request directly without needing to press a send button.
  3. The bottom of the floating window displays latency statistics (e.g., first token 544ms).
  4. Click “Save” to save the explanation as a formal session in the left list.
  5. In the “History” section of Settings, you can search by keyword and restore conversations.

Technical Details and Limitations

  • Data storage: Q&A data is stored under the ~/.dsh/loupe/ directory (or under the DSH_HOME directory if it exists), including context.md and history.jsonl.
  • Context limit: The injected length limit for context.md is 2200 characters.
  • Reasoning level: The default is off. In practice, the first-token response time for off is about 544ms, while low is about 2806ms.
  • Glass effect: The browser must support CSS color-mix; otherwise, it automatically falls back to a solid background.
  • API: The host provides routes such as /plugins/dsh-loupe/explain for diagnostics and capability probing.

Ecosystem Background

The DSH philosophy is “everything is a plugin”. dsh-loupe has a clear code structure; the host side depends only on Node built-in modules (fs, os, path, crypto), with zero third-party dependencies.