Back to home@Triple3h

dsh-input-enhancement

DSH Web plugin: input enhancement — paste text collapse, file/folder attachment paste & drag-drop, bubble attachment folding, message fold, attachment management & cleanup. DSH Web 插件:输入增强——粘贴文本折叠、附件上传、消息折叠。

Stars
0
Language
JavaScript
Created
Aug 20, 2026
Updated
Aug 23, 2026
GitHub repo

Introduction

dsh-input-enhancement

English | 中文

GitHub stars GitHub license

A DeepSeek Harness (dsh) Web plugin that enhances the input composer with three capabilities: paste-text collapse, file/folder attachment input, and long-message folding.

Stop fighting a cluttered composer. Large pasted text folds into a single chip, files and folders drop in with a paste or a drag, and long user messages collapse until you need them.

What you get

Three client capabilities plus a host-side attachment server:

A. Paste text collapse — large pasted text folds into a 粘贴·N行 reference chip (capture-phase paste interception, before React's delegated onPaste). The full text round-trips through clipboardText and is restored on send via the registered input-trigger source codec.

B. Attachment input — Ctrl+V paste files/folders, whole-page drag-drop, file/folder picker; files are uploaded to the host and inserted as attachment references. User-message attachment blocks fold into chips in the chat area. A settings panel shows usage stats and cleanup.

C. Message fold — long user messages in the chat area fold with a toggle chip (chipOnly mode: collapsed = single chip; expanded = full text).

Host side — registers the attachment upload server on the DSH webServer: batches, staging, ownership markers, usage stats, cleanup.

Install (link, development)

npm install
npm run build        # src/client.js → lib/client.js
npm run link-profile # wire into ~/.dsh/profiles/web, then restart dsh web

link-profile adds a link: dependency, appends to dsh.profile.bundles, and runs pnpm install in the profile. Then restart dsh web.

Configuration

Optional limits live under config.attachments in cordis.patch.yml (uncomment to override):

- id: input-enhancement
  name: dsh-input-enhancement
  config:
    attachments:
      maxFileBytes: 1073741824        # 1 GiB per file
      maxBatchBytes: 2147483648       # 2 GiB per batch
      maxFiles: 10000                 # max files per batch
      maxDepth: 64                    # max directory nesting
      maxConcurrentUploads: 4         # parallel uploads per batch

Development

npm install
npm run build
npm run link-profile

License

MIT