HongMing-Huang/dsh-file-upload ↗★ 24
dsh-file-upload
DeepSeek Harness dual-face plugin: Codex-style file references (@path), fully bundled document→Markdown (MarkItDown engine, 20+ formats), mature image handling (read_image for multimodal routes, automatic vision descriptions for text-only models), read_document tool. 适合需要让智能体免配置读取、解析本地各类文档与图片的用户。
同名パッケージの別リポジトリ
インストール
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:HongMing-Huang/dsh-file-uploadドキュメント
README 全文を読む ↗Usage
- Click the paperclip in the composer toolbar, or drag files anywhere over the window;
- Small text files land directly in the composer; documents appear as attachment cards and their path is sent with the message;
- The agent reads documents with
read_document— converted to Markdown on demand, pageable withoffset/limit.
MarkItDown (fully bundled — no downloads, no setup)
The MarkItDown capability ships inside the plugin. Works out of the box: no Python, no pip, no downloads, no build-script approval.
- Bundled engine — the Microsoft MarkItDown TypeScript port (
markitdown-node) is a regular dependency covering 20+ formats: PDF, DOCX, PPTX, XLSX, HTML, CSV, JSON, XML, RSS, Atom, ZIP, Jupyter notebooks, images (OCR via Tesseract, 110+ languages), and audio transcription (via LLM, needs model credentials). - Images — OCR to text by default through the bundled engine.
- Offline — all parsing runs locally, no network calls.
Optional upgrade: if an official MarkItDown CLI already exists on your machine (or is set via
markitdownBin), the plugin prefers it (adds EPUB and more); without one the bundled engine is always available.
- id: file-upload
config:
markitdownBin: /path/to/your/markitdown # optional; empty = bundled engine only
Startup log (bundled mode):
[dsh-file-upload] Document → Markdown ready: bundled MarkItDown engine (20+ formats, image OCR) — fully packaged, no downloads, no Python.
How images are handled (auto-explained)
The plugin detects your session's model capability at upload time:
| Detected route | What happens |
|---|---|
Multimodal model (declares image input, e.g. GPT-4o / Qwen-VL / Claude / Gemini) | imageMode: native — the agent uses the official read_image tool; the image enters model context directly |
| Vision bridge installed (dsh-vision-proxy and similar) | detected automatically (they declare image input on their route) — same native path |
| Text-only model (the DeepSeek API is text-only) | an automatic image description is generated via the vision discovery chain and inserted with the message — the model reasons about the image content immediately |
Vision discovery chain (zero-config): ① explicit visionEndpoint/visionModel → ② local Ollama at http://localhost:11434 (picks a VL model such as DeepSeek-VL2 — images never leave the machine) → ③ OpenAI standard endpoint using a key from the dsh credentials seam.
Note: DeepSeek's official API does not offer vision input (the multimodal line — DeepSeek-VL2/Janus — is open-source and self-hostable); deploy DeepSeek-VL2 via Ollama for a fully local "official DeepSeek vision" experience.
The route detection mirrors the official read_image gate (ctx.llm.resolveModelInfo + inputModalities).
Configuration
All fields have sensible defaults — you can install and use the plugin without touching any of them. Tune only what you need.
| Field | Default | Description |
|---|---|---|
uploadMaxBytes | 25165824 (24 MB) | Max bytes per uploaded file |
allowedExtensions | [] | Extension allowlist; empty = all allowed |
uploadTtlMs | 604800000 (7 days) | Unreferenced upload lifetime |
sweepIntervalMs | 3600000 (1 h) | Sweep period; 0 = disabled |
maxConcurrentUploads | 4 | Concurrent upload limit |
inlineTextLimit | 8192 (8 KB) | Text inlined into the composer up to this size |
previewTextLimit | 2048 (2 KB) | Preview length for larger text files |
maxFileBytes | 25165824 | Byte cap for one document read |
readLimit | 2000 | Max lines returned by one read_document call |
sheetRowLimit | 200 | Rows kept per XLSX sheet |
maxSheets | 5 | Sheets read per workbook |
cacheEntries | 16 | Parse-cache entry count |
cacheMaxBytes | 67108864 (64 MB) | Parse-cache byte budget |
markitdownBin | '' | Optional MarkItDown CLI path; empty = auto-detect PATH |
markitdownTimeoutMs | 120000 | Timeout for one CLI invocation |
visionEndpoint | '' | Vision endpoint for image explanations; empty = auto (local Ollama → OpenAI standard) |
visionModel | '' | Vision model id; empty = auto |
visionApiKeyEnv | OPENAI_API_KEY | Credential reference for the vision key (dsh credentials seam) |
visionMaxBytes | 10485760 (10 MB) | Max image bytes sent to the vision endpoint |