dsh-paperclip-upload
其他 活跃维护

dsh-paperclip-upload

paul-xing/dsh-paperclip-upload

轻量级Web界面插件,为大模型交互页面新增回形针文件上传按钮,点击即可选择桌面文件上传至会话工作区的uploads目录,自动在输入框插入对应文件名标记,无需手动输入路径即可快速引用上传资源。

1
Stars 标星
0
Forks 分支
1
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
7 KB
仓库大小
1 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:paul-xing/dsh-paperclip-upload
git clone https://github.com/paul-xing/dsh-paperclip-upload.git
git clone git@github.com:paul-xing/dsh-paperclip-upload.git
README.md main

dsh-paperclip-upload

A paperclip upload button for the DeepSeek Harness (DSH) Web UI. Click it, pick a file from your desktop, and it is uploaded into the current session's workspace uploads/ directory. The filename (with a 📄 icon) is inserted into the composer so the agent can find and read the file.

Features

  • Paperclip button sits right next to the "full access" permission selector in the composer tool row.
  • Uploads any file (text or binary) up to 25 MB into the workspace uploads/ directory.
  • On success the composer draft shows 📄 <filename> — send it and the agent can read the uploaded file.
  • Permanent plugin: installs into the web profile, survives restarts of dsh web.

Install

dsh plugin --profile web add https://github.com/paul-xing/dsh-paperclip-upload/archive/refs/tags/v1.0.0.tar.gz

Restart dsh web after installation. The button appears next to the permission selector in the composer.

Usage

  1. Click the paperclip button.
  2. Pick a file from your computer.
  3. The file is written to <workspace>/uploads/<filename> and the composer draft shows 📄 <filename>.
  4. Send the message — the agent can locate and read the file.

How it works

  • Client half (lib/client.js): registers into the conversation.input.left slot (right of the permission selector), reads the chosen file as base64, and POSTs it to the Host endpoint.
  • Host half (lib/index.js): registers an HTTP endpoint POST /api/pcup-upload via the webServer service (inject: ['webServer']), decodes the base64 with python3 through the shell service, and writes the file into the session workspace.

Configuration

No configuration required. Upload size is capped at 25 MB (enforced both client- and host-side).

Development

The built files under lib/ are committed so profile installation does not require a build step. Local development mirrors the DSH harness checkout; the plugin directory's node_modules links to the harness's packages.

License

MIT