dsh-paste-packer: Compact Long Pastes into a Card Above the Input Box

Introduction

When pasting logs, code snippets, or long text into the conversation input box in DSH (DeepSeek Harness), dozens of lines can clutter the composer, making scrolling and prompt editing cumbersome. Common workarounds involve manually deleting lines or pasting elsewhere for reference first, which adds steps and interrupts the flow of thought. dsh-paste-packer is a client-side plugin released by the maintainer X-noesis, targeting DSH Web and Desktop versions. Instead of directly dumping pastes exceeding 20 lines into the input box, it packs them into a card floating above the input. The body text retains only a placeholder capsule; upon sending, DSH restores the placeholder to the full text before passing it to the model.

What is this

dsh-paste-packer is a paste packing plugin for DeepSeek Harness, categorized as a client-side extension. The current version in package.json is 0.1.0, licensed under MIT. It resolves the conflict where “long pastes crowd the input area, yet the user expects the full original text upon sending”: the interface displays a collapsed view, while the submission path retains the complete text.

Core Features

Paste detection is based on line count: text exceeding 20 lines triggers packing, rather than indiscriminately blocking short pastes.

After packing, the input box retains only an indivisible capsule placeholder, formatted like [Pasted Text #1 · 23 lines]. The card docks in the conversation.input.dock area, positioned above the composer. It aligns width similarly to the host taskbar to avoid covering the conversation column.

The control behaviors on the card are as follows (consistent with the README):

Control Behavior
Eye icon In-place preview of the original text within the card (Markdown rendered, monospace font, auto-wrap, scroll within fixed height); card width remains unchanged
Expand Unpacks and inserts the full text at the cursor position in the input box; the card disappears
Trash can Discards the pasted content and removes the placeholder from the input box

When sending a message, DSH replaces the placeholder with the full text according to the trigger source chip’s codec.serialize. The model receives the complete original text, not the placeholder literal. Implementation-wise, the plugin registers a / trigger source with content that is always empty. Since the input box is a Lexical editor without a “rewrite draft before submit” hook, plain text placeholders cannot be replaced at other stages.

Installation and Activation

The plugin is installed as a local bundle. The cordis.patch.yml within the directory inserts the loader, so manual editing of the profile’s package.json or cordis.patch.yml is generally unnecessary.

It is recommended to let the Agent call plugin_manager within the current profile:

action: install_bundle
target: <absolute path to this directory>

plugin_manager only affects the current profile. To install in both Web and Desktop profiles: use the install_bundle command above for the current profile; for the other profile, use the official CLI (which also writes dependencies and dsh.profile.bundles):

dsh plugin --profile web add link:<absolute path to this directory>

For Windows Desktop, if dsh is not in the PATH, use the full path to the CLI included in the installer (see README for PowerShell examples; the core command is plugin --profile web add "link:<absolute path to this directory>").

After installation, note the application field in the plugin_manager return value: applied indicates hot reload, while restart-required requires restarting DSH. For CLI installations, use dsh --profile <name> --dump-config to verify that - id: dsh-paste-packer appears in the synthesized configuration.

The plugin has an entry in the SkillHub community directory (no official affiliation with DeepSeek / High-Flyer): https://www.skillhub.cn/plugins/X-noesis/dsh-paste-packer
Source code and documentation: https://github.com/X-noesis/dsh-paste-packer

Typical Usage

  1. In the DSH conversation page, select and copy text exceeding 20 lines (logs, patches, documentation snippets, etc.).
  2. Paste into the composer input box; a card should appear above, and a [Pasted Text #n · x lines] capsule should appear in the input box, instead of the full text block.
  3. To verify content, click the eye icon on the card to preview within the card; if correct, send directly, or click “Expand” to place the full text back at the cursor for editing.
  4. To discard the content, click the trash can; the placeholder will be removed as well.

No additional configuration is required; the line count threshold and UI behavior are determined by the plugin’s built-in logic.

Use Cases and Notes

Suitable for scenarios where users frequently paste long logs, multi-file snippets, or README-level text to the Agent, while wishing to keep the composer editable. Web and Desktop share the same client-side logic (client.js, zero dependencies, no build step).

Please be aware before use:

  • The original text exists only on the browser side (Memory + localStorage key dsh-paste-packer.v1). After switching browsers, clearing site data, or exceeding storage limits, the original text of old cards may be lost; preview will indicate “Original text unavailable,” and sending will degrade to sending the placeholder text, without blocking the send action.
  • Clear residual placeholder capsules in the input box before uninstalling the plugin; the codec is removed with the plugin, and residual chips cannot be serialized correctly.
  • Trash/Expand operations may rewrite the entire draft (setDraft) in some failure paths, potentially degrading other @file reference chips in the draft to plain text.
  • The plugin relies on host internal conventions (e.g., [data-composer-input], slash/input-insert-reference, ctx.inputTriggers.registerSource); major DSH version upgrades may cause it to silently revert to native pasting, but generally will not break the input box.
  • The plugin runs within the current DSH process and browser environment. Before installation, it is recommended to read the repository source code and the MIT license to assess whether to include it in your workflow.

Conclusion

dsh-paste-packer separates “long pastes” from the visual layer of the input box, using cards + capsule placeholders to preserve the semantics of the full text upon sending. It is ideal for scenarios involving frequent pasting of large text blocks in daily DSH conversations. For more information, see the community directory page and the GitHub repository.

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

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

Xiaoye