- Home
- Plugin
- Miglioramenti UI
- dsh-paste-as-file
dsh-paste-as-file
chfeizy/dsh-paste-as-file
Turn long pasted text in the chat input into a .txt attachment, DeepSeek Web style.
Installazione
dsh plugin --profile web add github:chfeizy/dsh-paste-as-fileREADME
dsh-paste-as-file
Turn long pasted text in the chat input into a .txt attachment, like DeepSeek Web does.
把聊天输入框中的长文本粘贴自动转为 .txt 附件,行为对齐 DeepSeek 网页版。
English · 中文
What it does
- Paste text longer than a threshold (default 1000 characters) into the chat composer → it is converted into a
pasted-YYYYMMDD-HHMMSS.txtattachment instead of flooding the input. Shift+ paste always inserts plain text (escape hatch).- Pasting with files, or pasting into other inputs (sidebar, settings, dialogs), is untouched.
- A short info note appears after conversion and auto-dismisses after 5 seconds.
- No network access, no telemetry, no storage beyond two
localStoragekeys below.
Install
dsh plugin add dsh-paste-as-file
# or from source
dsh plugin add github:chfeizy/dsh-paste-as-file
Reload the web GUI afterwards.
Configure (optional)
Both keys live in the browser's localStorage of the DSH page:
| Key | Default | Meaning |
|---|---|---|
dsh-paste-as-file.threshold | 1000 | Minimum pasted-text length (chars) to convert. Min 100. |
dsh-paste-as-file.debug | off | Set to 1 to log [paste-as-file] lines to the console. |
localStorage.setItem('dsh-paste-as-file.threshold', '2000')
How it works
The bundle injects a headless component into the conversation.input.dock slot. The
per-session inject face exposes the composer's attachment intake; the component registers a
capture-phase paste listener on every [data-composer-card] editor and, when the threshold
is hit, calls preventDefault() and routes the clipboard text through the same path as drag
and drop (createDrafts → attachment card → automatic upload). Everything runs client-side.
Uninstall
dsh plugin remove dsh-paste-as-file
License
MIT
Plugin correlati
dsh-web (dsh-task-board)
zhu1090093659/dsh-web
dsh-web (dsh-web-all)
zhu1090093659/dsh-web
dsh-TUI
ccch1mneyyy/dsh-tui
dsh-web-ui (dsh-task-board)
zhu1090093659/dsh-web-ui