In DSH (DeepSeek Harness) web development or interaction, you sometimes need to quote AI-generated context back into the input box. Manual copying and pasting can easily lose formatting or result in truncation. The dsh-quote plugin simplifies this workflow by using a UI card and Markdown blockquotes, and provides three ways to quote.

Core Features

The plugin provides three ways to trigger quoting:

  1. Selection Quote: Select text in the AI response body and click the “Quote” button above the selection.
  2. Full Message Quote: Click the “Quote” button on the action row of a completed AI response.
  3. Large Text Paste: Paste text longer than 300 characters into the input box.

Installation and Enablement

Use the official installation command to add the plugin to the Web profile:

dsh plugin --profile web add -w git+https://github.com/zysftd/dsh-quote.git

After installation or update, you need to restart dsh web and perform a hard browser refresh.

Usage

The quote card is displayed at the top inside the input box (including a label, content preview, and remove button), keeping the input box clean. When sending a message, the blockquote (> ...) is automatically prepended to the beginning of the message.

  • Selection Quote: Both ends of the selection must be within a row with data-chat-flow-kind="assistant-step", and must not be inside a thinking collapsible block with data-variant="think". User messages, tool call cards, and the thinking process do not support selection quoting.
  • Large Text Paste: When the pasted text exceeds 300 characters (fixed threshold), the text does not go directly into the input box; instead, a quote card is generated.
  • Slash Command Mode: If the draft content starts with /, pressing Enter does not trigger the quote injection logic.

Implementation and Limitations

The plugin is a pure client-side implementation, with no network requests, no file read/write, and no persistent storage.

  • UI Implementation: The quote card is implemented by modifying the scroll container’s padding-top and using fixed positioning, while using DSH theme tokens to maintain style consistency.
  • Send Interception: The send button is implemented by wrapping inputActions.submit; the Enter key path is intercepted by a keydown listener in the capture phase, and inputActions.submit() is called after injection.
  • Markdown Format: The generated blockquotes are plain-text Markdown.

Availability and License

The plugin is open-sourced under the MIT license. It is recommended to review the source code and license before installation. The related directory and GitHub repository are as follows: