Skip to content
dsh.fish
Bundle

dsh-file-upload-local

Local file-upload plugin for DeepSeek Harness: a paperclip button and drag-and-drop that store files per-session under .dsh-uploads/<sessionId>/, plus a read_document tool that pages text and OCRs images (tesseract.js) so a text-only model can still read screenshots.

Source
lubenweimeiyoukaig
License
MIT
Updated
Updated 9 hours ago

Readme

# 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.

[中文](README.zh.md)

## 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_document` tool**: 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

```sh
dsh plugin --profile web add dsh-file-upload-local
# restart dsh web
```

## Use

1. Click the paperclip button, or drag files anywhere onto the window.
2. Files appear as thumbnails above the composer; remove any with its ✕ button.
3. Send the message — the agent reads uploaded files with `read_document <path>` (text pages, image OCR).

## Configuration

```yaml
- 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 official `read_image` tool directly.

## License

MIT

Install

dsh plugin --profile web add github:lubenweimeiyoukaig/dsh-file-upload-local

Profile: web

  • This source has no pinned commit, so a later push upstream changes what installs. Prefer pinning a commit.
Source