DeepSeek Harness Plugin: Paste Long Text as Attachment

Introduction

In the DeepSeek Harness (DSH) web interface, pasting plain text of 500+ characters directly into the input box causes the box to expand in height, breaking the page layout. This plugin intercepts that scenario by converting long text into a .txt file attachment for upload, keeping the input box at a fixed height.

About the Plugin

This is a DSH plugin maintained by MaHongang. When you paste plain text of 500 characters or more in the composer, the text is saved as a pasted-<date>-<time>.txt attachment and uploaded, preventing the input box from growing taller. The text is then sent along with the message.

Core Features

  • Pasting plain text of 500+ characters → saved as a pasted-<date>-<time>.txt attachment, uploaded, and displayed as a standard attachment chip
  • A filename hint appears above the input box; click Undo to return the text to the input box and remove the attachment
  • Pasting text under 500 characters, pasting files/images, using the file picker, drag-and-drop, and pasting outside the editor all retain their original behavior

Installation

This repository ships with a DSH plugin index:

https://raw.githubusercontent.com/MaHongang/dsh-paste-to-file/main/market/index.json
  1. Open Plugins, then go to the More menu next to Experimental Plugins and enable Custom Plugin Market — a Discover tab will appear.
  2. In Discover, click Add Index Source and paste the URL above.
  3. Find Paste Long Text as Attachment and install it.

The index is pinned to a specific commit, so you install reviewed source code rather than a floating branch.

Install from Git

dsh plugin add "git+https://github.com/MaHongang/dsh-paste-to-file.git"

Install from a Local Directory

Go to Plugins → Add Plugin and select this directory; disabling the plugin restores normal pasting behavior.

Usage Notes

The plugin converts pasted text in any composer that has an active session and file upload permissions, including the input box on the new-session home page. On the launcher page (no active session), there is no file entry point, so long text is pasted as-is.

Scenarios where files cannot be attached retain normal pasting, and a hint explains the reason: subagent sub-sessions, in-flight message drafts, and sessions where upload permission has been denied.

The attachment is a file, not draft text: the model receives the saved file path and reads it via the file tool. Presets without a file tool, as well as the first message containing only an attachment and no body text (the session title is derived from the message body), will not have access to the original text.

Attachments belong to the browser-side draft and are not persisted with the draft: switching sessions or refreshing the page before sending will discard the attachment (whereas normal pasted text would be restored); after removing the attachment, the uploaded bytes remain in Harness storage, but the text is no longer present in the input box.

Supported Scenarios and Limitations

The plugin threshold is fixed at 500 characters (counted by Unicode code points) in this version, with no per-instance bypass shortcut. Pasting files from a clipboard file list is handled natively and is not converted.

Requires DSH 0.2.2-rc.5 or later, and the current session must have file upload permissions. Licensed under MIT — you can review the source code before installing.

Summary

This plugin solves the common issue of input boxes expanding when long text is pasted, keeping the UI layout stable. By converting long text into file attachments, it preserves message content integrity while maintaining a smooth user experience.

Plugin directory: https://www.skillhub.cn/plugins/MaHongang/dsh-paste-to-file
GitHub: https://github.com/MaHongang/dsh-paste-to-file

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye