dsh-draft-fold: Automatically Fold Input Drafts into Attachment-Style Summary Cards

During the development or usage of DeepSeek Harness (DSH), when the draft content in the input box is too long, it occupies a significant amount of interface space, affecting the user experience. The dsh-draft-fold plugin optimizes the display of long text by folding super long drafts into attachment-style summary cards, without altering the original DSH draft status, message format, or sending path.

Plugin Positioning

This is a client-side plugin maintained by Ztyss, dedicated to solving the UI display issue of long input drafts.

Core Features

  1. Automatic Input Draft Folding: When the draft in the input box exceeds the set threshold, the original input area is automatically collapsed.
  2. Display Attachment-style Summary Card: While collapsing the original input area, a card containing a summary preview is displayed.
  3. Preserve Original State: The folding operation does not change the DSH draft status, message format, or sending path.
  4. Configurable Threshold: Supports setting a folding threshold, with a default value of 300 characters.
  5. Configurable Preview Length: Supports setting the length of the summary preview, with a default value of 120 characters.
  6. Dual-Core Adaptation: The same build supports dual-core adaptation, with kernel compatibility for 0.3.1.
  7. No Build Scripts: Pre-built artifacts are installed directly, requiring no local build.

Installation and Activation

Installing this plugin requires specifying a profile. Please use the following command:

dsh plugin add --profile web "github:Ztyss/dsh-draft-fold"

After installation is complete, configuration is required on the settings page.

Configuration Instructions

  1. Navigate to Settings → Plugins → Plugin Configuration → Draft Folding.
  2. In the configuration panel, you can adjust the following parameters:
    • Folding Threshold (Characters): Defaults to 300.
    • Summary Preview Length (Characters): Defaults to 120.
  3. After saving the settings, the configuration takes effect immediately for the current tab without requiring a restart.

Technical Details

  • Development Environment: Node.js >= 22.19.0 is required.
  • Testing Process: Before running tests, execute npm install first, followed by npm test (using vitest).
  • Kernel Compatibility: The plugin adapts to both DSH ≤0.1.5 and 0.1.7+ kernel versions through different injection methods, ensuring it runs correctly in both older and newer versions.

Summary

dsh-draft-fold provides a lightweight solution that helps developers or users maintain a clean interface when handling long text inputs, while preserving the full capability to send long messages.

Repository Address: https://github.com/Ztyss/dsh-draft-fold

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

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

Xiaoye