Skip to content

Heyflyingpig/long-draft-input

30Last commit Aug 14, 2026

long-draft-input DSH plugin

This plugin monitors the input draft length in DSH. When the text exceeds a configurable threshold, it replaces the visible textarea with a summary card showing the first line preview, character count, and line count. The card is part of the input bar's layout, pushing the send button up, and provides an additional input area for supplementary text that is appended to the original draft upon submission.

How to install the long-draft-input DSH plugin

dsh plugin --profile demo add /absolute/path/to/long-draft-input

Copying does not run this command. Review the repository and version before installing the long-draft-input DSH plugin.

long-draft-input DSH plugin data source

long-draft-input DSH plugin snapshot date: Aug 16, 2026

discovered

What the long-draft-input DSH plugin can do

  • Detects draft length and triggers UI expansion when threshold is exceeded.
  • Displays a summary card with first line preview, character count, and line count.
  • Provides a separate supplementary input area below the card.
  • Supports collapsing/expanding the full text via a 'Show in textarea' button.
  • Allows removing the long draft while keeping supplementary text.
  • Configurable threshold and preview character count via profile settings.

Where the long-draft-input DSH plugin fits

  • When a user writes a very long draft and wants a clean, compact view of the input area.
  • When a user needs to add extra notes or corrections after the long draft without modifying the original text.
  • When a user wants to quickly preview the first part of a long draft without scrolling.
  • When a user wants to keep the original draft intact while still being able to submit additional text.

Who the long-draft-input DSH plugin is for

  • DSH users who frequently compose long messages.
  • Developers using DSH and wanting a better input experience for lengthy drafts.

long-draft-input DSH plugin limitations

  • Relies on the public 'conversation.input.dock' extension point and cannot control private rendering logic inside 'InputBar.tsx', so it cannot prevent the original component from constructing backdrop and mirror nodes.
  • Only verified against DSH 0.1.0-rc.5; compatibility with other versions is not guaranteed.

long-draft-input DSH plugin: from the repository README

Quoted from the Heyflyingpig/long-draft-input README, the upstream source of the long-draft-input DSH plugin. Copyright remains with the original authors.

一个面向 DeepSeek Harness `0.1.0-rc.5` 的独立插件:当输入框草稿超过阈值时,将发送框向上扩展并显示附件式摘要卡片,但不改变 DSH 原有的草稿状态、消息格式或发送路径。 ## 预览 ![alt text](readme_img/image.png) ## 行为 - 长文本仍完整保存在 DSH 的 `input.draft` 中。 - 摘要卡片展示首行预览、字符数和行数。 - 摘要卡片作为原发送框内部的正常布局子项,像附件一样将发送框向上撑高;折叠态隐藏原 textarea 的完整文本,保留原工具栏和发送按钮。 - 卡片下方保留独立的补充输入区;补充文字会追加到完整长文本后,继续通过原发送按钮提交。 - 点击“在文本框中显示”后恢复原 textarea,并将焦点交还给它。 - 点击 `×` 移除聚合的长文本;如果卡片下方已经输入补充正文,只保留这部分正文。 - 原 InputBar 的发送按钮仍调用原有 `inputActions.submit()`;插件不定义附件协议,也不改服务端消息格式。 - 未超过阈值的小文本不渲染插件 UI,因此保持原行为。 默认阈值为 2,000 个 JavaScript 字符,首行预览为 120 个 Unicode code point。可在 profile 的后续 patch 层覆盖;由于 patch 会替换整行配置,覆盖时请同时写出两个字段: ```yaml - id: long-draft-input config: threshold: 20000 previewChars: 160 ``` ## 安装 ### 在本地目录中执行 ```sh dsh plugin --profile demo add github: Heyflyingpig/long-draft-input dsh --profile web ``` GitHub 安装会执行 `prepare` 构建 TypeScript 和浏览器 bundle。pnpm 10+ 可能要求 profile 的 `pnpm-workspace.yaml` 显式允许该包的构建脚本;也可以发布 npm 包或 `pnpm pack` tarball,直接携带已构建的 `lib/`,减少安装时的构建权限。 在 项目源码 checkout 中本地验证: ```sh pnpm dsh plugin --profile demo add /absolute/path/to/long-draft-input pnpm dsh --profile demo --dump-config pnpm dsh --profile demo ``` ## 开发和验证 ```sh pnpm install pnpm test

Read the full READMERepository license: MIT

long-draft-input DSH plugin questions

How do I install the long-draft-input plugin?

You can install it using the DSH CLI: run `dsh plugin --profile demo add github:Heyflyingpig/long-draft-input` and then start the web interface with `dsh --profile web`. If you have a local checkout, you can use `pnpm dsh plugin --profile demo add /absolute/path/to/long-draft-input`.

How do I change the threshold or preview character count?

You can override the default values in your profile's patch layer. Add a configuration block for the plugin, for example: `- id: long-draft-input` with `config: { threshold: 20000, previewChars: 160 }`. Note that the entire line is replaced by the patch, so you must include both fields.

Why is the summary card not showing even though my draft is long?

The plugin only activates when the draft length exceeds the configured threshold (default 2000 characters). Also, the plugin does not render any UI for short drafts. Make sure your text is longer than the threshold. If you have overridden the threshold, verify it is set correctly.

How do I uninstall the long-draft-input plugin?

You can remove the plugin using the DSH CLI: `dsh plugin --profile demo remove long-draft-input`. Alternatively, delete the corresponding entry from your profile's plugin list.

Can I use this plugin with other DSH versions?

The plugin is explicitly written for DSH 0.1.0-rc.5. It may work with other versions, but it has not been tested. If you encounter issues, check the README for compatibility notes or consider using the specified version.