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¶
- Automatic Input Draft Folding: When the draft in the input box exceeds the set threshold, the original input area is automatically collapsed.
- Display Attachment-style Summary Card: While collapsing the original input area, a card containing a summary preview is displayed.
- Preserve Original State: The folding operation does not change the DSH draft status, message format, or sending path.
- Configurable Threshold: Supports setting a folding threshold, with a default value of 300 characters.
- Configurable Preview Length: Supports setting the length of the summary preview, with a default value of 120 characters.
- Dual-Core Adaptation: The same build supports dual-core adaptation, with kernel compatibility for 0.3.1.
- 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¶
- Navigate to Settings → Plugins → Plugin Configuration → Draft Folding.
- In the configuration panel, you can adjust the following parameters:
- Folding Threshold (Characters): Defaults to 300.
- Summary Preview Length (Characters): Defaults to 120.
- 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 installfirst, followed bynpm 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