READMESource: main@e2cebc25
dsh-file-upload-local
A local file-upload plugin for DeepSeek Harness (dsh). Upload files straight into the conversation via a paperclip button or drag-and-drop; files are stored per-session under .dsh-uploads/<sessionId>/ inside the session workspace, and the agent reads them with the read_document tool.
Features
- Upload surface: a paperclip button in the composer's left slot, plus a full-viewport drag-and-drop overlay.
- Attachment rail: uploaded images render 64px thumbnails (click to open), other files render type glyphs with names; each tile has a hover remove button. References are appended invisibly to the sent text on Enter or the send button.
read_documenttool: pages through text files with line numbers (offset/limit), and OCRs images with tesseract.js (chi_sim+eng) so a text-only model can still read screenshots and photos.- Per-session isolation: files land in
.dsh-uploads/<sessionId>/under the session workspace; TTL sweep keeps it from growing unbounded.
Install
dsh plugin --profile web add dsh-file-upload-local
# restart dsh web
Use
- Click the paperclip button, or drag files anywhere onto the window.
- Files appear as thumbnails above the composer; remove any with its ✕ button.
- Send the message — the agent reads uploaded files with
read_document <path>(text pages, image OCR).
Configuration
- id: dsh-file-upload-local
config:
uploadMaxBytes: 26214400 # single upload body cap
uploadTtlMs: 604800000 # 7 days
sweepIntervalMs: 3600000 # TTL sweep interval
maxConcurrentUploads: 4
maxFileBytes: 26214400 # read_document read cap
readLimit: 2000 # max lines per read_document page
ocrLangs: 'chi_sim+eng' # tesseract language pack
Notes
- The OCR language pack (
chi_sim+eng) is downloaded by tesseract.js on first use; keep network access or pre-seed the cache. - Images travel through the OCR path (
read_document), so a text-only model works out of the box. If the active model supports image input, you can still use the officialread_imagetool directly.
License
MIT
No comments yet. Be the first to write one.