Preface

In DeepSeek Harness (DSH) development, pasting large blocks of text directly into the input box can easily pollute the context. The plugin dsh-paste-dock intercepts this operation, automatically saves text exceeding the threshold as pastes/*.txt files, manages them via a dock card above the input box, and keeps only a minimized reference in the draft area.

What It Is

dsh-paste-dock is a DSH plugin maintained by drscrewdriver. It uses the file system instead of the input box to carry long text, solving the context-pollution problem caused by long text and providing a unified card management view.

Core Features

Large Paste to Attachment

The plugin intercepts paste events in the input box. When pasted text exceeds the default threshold (500 characters), it is written to pastes/<timestamp>.txt in the current session workspace (default limit 1 MiB, UTF-8 with byte-for-byte fidelity).

If saving fails, the original text is automatically reinserted into the input box with a prompt. At the same time, the plugin registers the save_paste tool as a fallback mechanism, ensuring manual saving is still possible through the tool even if the input-box hook does not intercept the paste.

Only a Minimal Recognizable Badge in the Draft

In the draft area, long text is replaced with a dsh-native atomic reference chip.
* Display format: By default it displays as 📄first few characters… (multiple pastes sequentially become 📄2, 📄3, etc.).
* Interaction: Clicking the badge routes to the right-sidebar preview (editable with dsh-better-sidebar). Pressing Backspace or Delete once removes the entire reference, with no intermediate state.
* Sending: The sending path remains unchanged; the chip is serialized as a bare @"pastes/x.txt" and does not add request tokens.

Dock Above the Input Box

Full information is displayed in the conversation.input.dock slot (order 0, centered card).
* Content: Includes file name, beginning preview, character count, path, and action buttons.
* Actions:
* Open full text: Calls host openWorkspacePath (available only for loopback deployments).
* Remove from draft: Deletes the dock card and synchronously deletes the mention in the draft.
* State synchronization: The dock is a projection of draft references and is kept in two-way sync.

Fallback Handling

If the plugin facade is missing (such as an older DSH line) or the input box is busy, the plugin automatically degrades to a text reference @"pastes/x.txt" (N chars). After sending, it can still be rendered as a clickable card, and the dock can also recognize it.

Installation and Configuration

Installation

Install to a local directory using the following command:

dsh plugin --profile web add ./dsh-paste-dock

After installation, restart DSH. [dsh-paste-dock] logs should be visible in the console.

Configuration

The configuration file is cordis.patch.yml (deployment default). Changes take effect after restarting DSH.

Field Default Description
minChars 500 Threshold for large pastes (UTF-16 code units). Can be overridden in Settings → General.
maxBytes 1048576 Maximum bytes per paste; the host enforces a hard limit of 64 MiB.
chipBadge true Draft chips are displayed as minimal badges (📄…). Set to false to restore the full label.
dock true Whether to inject the dock card slot above the input box.

Typical Usage

  1. Install: Run the installation command above.
  2. Paste: Paste text longer than 500 characters into the input box to automatically generate an attachment.
  3. Manage: Click the dock card above the input box to view the full text or remove the reference.
  4. Send: In the sent message, the chip is serialized as @"pastes/x.txt", and the model directly reads the file content.

Use Cases and Considerations

Use Cases

  • Agent development that requires frequent handling of code snippets, long documents, or structured data.
  • Scenarios where you want to keep the input box clean and manage context through the file system.

Notes

  • Version constraint: Supports only the DSH peer range 0.1.0-rc.2 to 0.2.0-rc.2.
  • Session switching: After switching sessions, the chip may degrade to a text reference @"…" (N chars), but it can still be sent and rendered.
  • Editing limitation: When saving edits with dsh-better-sidebar, you may encounter a 400 error (path issue); opening the same file from the file tree can resolve it.
  • Regular files: The plugin does not take over pasting of regular files/images, which are covered by the DSH native attachment pipeline.
  • Permissions and security: The plugin runs with the current DSH process permissions. Check the source code and license before installing.

Conclusion

dsh-paste-dock effectively solves the input and management of large text blocks in DSH through file-based management and UI projection. See the GitHub repository for more details.