In the DeepSeek Harness (DSH) ecosystem, plugin architecture is the core design philosophy. When you need to reference file snippets or code lines during a conversation, pasting large blocks of text not only takes up space but also lacks precise contextual association. The dsh-file-quote plugin solves this problem through a unified referencing mechanism. It is built on top of dsh-better-sidebar and allows users to select file or message content, encapsulate it into a reference block with a file path and line range, and keep the conversation clean after sending.

Plugin Positioning

The plugin is named dsh-file-quote, maintained by developer Sunday2Mo, and categorized as a client-side plugin. Its core function is to establish a unified referencing flow between DSH conversations and editors: select text → annotate → generate reference block → send. After sending, the reference block is collapsed; on the user side, only a Chip is displayed, while the AI receives a Markdown block containing the full quoted content and source location.

Installation and Enablement

Installing this plugin requires installing its core dependency dsh-better-sidebar first; otherwise, the file referencing feature will degrade to a plain floating display.

  1. Install dsh-better-sidebar:
dsh plugin --profile web add dsh-better-sidebar@latest

The first installation may fail because pnpm 11 blocks the node-pty build script. In this case, you need to allow the build script:

cd ~/.dsh/profiles/web && pnpm approve-builds --all
dsh plugin --profile web add dsh-better-sidebar@latest
  1. Install this plugin:
dsh plugin --profile web add dsh-file-quote

Core Features

This plugin provides a complete closed loop from selection to referencing, including the following capabilities:

  • Selection Annotation: Supports selecting text in file content previewed in the sidebar, the workspace editor, the better-sidebar editor, or Markdown preview. After selection, click “Annotate” in the floating panel to add a comment, then click “Insert into Input”.
  • File References with Line Ranges: The generated reference block automatically encapsulates the file path and the specific line range of the quoted content, usually in the format path (lines X-Y). This ensures the AI can precisely locate the original content.
  • Arbitrary Position Insertion and Unlimited Quantity: Reference blocks can be inserted at any text position in the input box, and multiple references can be inserted consecutively. The serialization mechanism ensures that multiple reference blocks do not stick together and each forms its own independent block.
  • Dual-side Folding: Reference blocks remain collapsed in both the input box and sent conversation records. On the user side, only a Chip labeled “Quoted content · Hover to view” is displayed; hovering shows the full content. On the AI side, the full reference block and source information are received.
  • Click to Jump Back to the Original Content: Clicking a reference Chip in the input box or conversation history automatically locates the original content. Location methods include highlighted selection in the editor, scroll and flash for message lines, and a fallback original-text floating panel for files.

Typical Usage

  1. Quote a Conversation Message:
    Select a piece of text in any conversation, click “Annotate” in the floating panel (optional comment), then click “Insert into Input”. A Chip labeled “Quote #N” appears at the cursor position in the input box.

  2. Quote File Text:
    Select code in the workspace editor, the better-sidebar editor, or Markdown preview, and follow the same workflow. After sending, the reference block automatically includes the file path and line range, allowing the AI to directly locate the specific code line in the file.

Considerations

  • Dependencies: The full functionality of the plugin (referencing sidebar file content and jump-back locating with highlighting) depends on dsh-better-sidebar. Without this dependency, only conversation message referencing is available, and file referencing degrades to an original-text floating display.
  • Version Requirement: Requires DeepSeek Harness Web 0.1.x. This version uses the slots and inputTriggers services, and gracefully degrades to plain text insertion if the input pipeline is missing.

Further Reading