DeepSeek Harness plugin

long-draft-input

Collapse very long composer drafts into a summary card without changing DSH message submission.

Jump to install

Source facts

Repository
Heyflyingpig/long-draft-input
Latest update
Aug 14, 2026
Category
Tools & Capabilities
GitHub stars
3
Format
plugin
Catalog evidence
Upstream dsh.bundle evidence
Evidence path
package.json#dsh.bundle
Checked against
0.1.0-rc.8
Upstream check date
2026-08-20

This evidence comes from the upstream catalog. This site has not installed, run, or security-reviewed the plugin.

Install

Start with a prompt that asks an agent to review the GitHub repository and source. Switch to the command if you want to install it yourself.

Copy this prompt into DSH, Codex, or another agent and ask it to review the GitHub repository and source first.

Do not install or run any commands yet. Read this plugin's GitHub repository, README, and relevant source code. Then answer the questions below clearly and directly so I can decide whether it fits my needs:

1. What is this plugin, and what problem does it solve?
2. Who is it for, and what are its typical use cases?
3. How is it used after installation? Include one minimal example.
4. What known limitations or privacy, security, compatibility, or maintenance risks does it have?
5. Give a clear recommendation: recommend, conditionally recommend, or do not recommend, with reasons.

Distinguish statements documented by the repository, inferences from source code, and unknowns. If evidence is insufficient, say so explicitly. Do not guess or simply repeat the README.

GitHub: https://github.com/Heyflyingpig/long-draft-input
Plugin: long-draft-input
Author: Heyflyingpig

Check the source files

Read the README and other files from this plugin directory before installing.

File explorer3 files
README.mdSource · read only

long-draft-input

一个面向 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 会替换整行配置,覆盖时请同时写出两个字段:

- id: long-draft-input
  config:
    threshold: 20000
    previewChars: 160

安装

在本地目录中执行

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 中本地验证:

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

开发和验证

pnpm install
pnpm test
pnpm run test:unit
pnpm pack:check

真实 Web 组合测试需要先在一个已安装本插件的 DSH profile 中启动 Web:

DSH_WEB_URL=http://127.0.0.1:3080 pnpm run test:web

当前版本限制

这个插件使用公开的 conversation.input.dock 扩展点承载生命周期,再通过 React Portal 把摘要卡片放入原 [data-composer-card],使卡片真正参与发送框内部排版,而不是在对话区上方叠加独立层。折叠态通过 CSS 隐藏原 textarea 的可见文本层,但不会替换输入框的发送逻辑。公开扩展点无法控制 InputBar.tsx 内部的私有 React 渲染逻辑,因此它不能阻止原组件继续构造 backdrop 和 mirror 节点。

友情链接

https://linux.do