Repository navigation
Releases
Releases · a903067276-rgb/dsh-file-upload
v0.1.7 — 粘贴接管三档 + 混合粘贴文字透传(cyhano PR #6)
Features
- Paste interception with three modes (off / images only / all files, default off) — contributed externally by @cyhano. The official InputBar paste rejects the whole prompt when the model has no vision support (
MODEL_DOES_NOT_SUPPORT_IMAGES); with interception enabled, pasted files go through the plugin's upload split: vision models get official attachments, non-vision models fall back to archived files + path text in the draft (same as drag-and-drop). Text pasted alongside files is preserved, matching the official behavior. - Settings card UI reworked by the author (cards, iOS-style switches, segmented control), then reverted to the project's unified design language during maintainer review: no self-made card backgrounds, save button keeps the "briefly turns green" success feedback, new setting uses the same native-select style as the rest of the card.
- README (EN + zh-CN): new setting documented.
中文说明
- 新增「粘贴接管」三档设置(关 / 只监听图片 / 全部文件,默认关)——外部贡献 @cyhano。官方内建粘贴在模型不支持识图时,发送端会拒绝整个 prompt(MODEL_DOES_NOT_SUPPORT_IMAGES);开启接管后粘贴文件改走本插件分流:识图模型走官方附件条,无识图模型降级为「附件库留档 + 路径文本进草稿」,与拖拽上传行为一致。混合粘贴(文件+文字)的文字不再丢失(维护侧对照官方行为修复)。
- 设置卡片 UI 经作者重做(卡片/拨动开关/分段控件)后,按项目统一 UI 口径回退:不自造卡片背景、保留「保存按钮短暂变绿」成功反馈等规范,新增设置用原生下拉对齐其余控件风格。
- README 中英双语设置列表已补充说明。
v0.1.6
Features
- "Allow public uploads" switch for the same-origin check (default off) — contributed externally by @cyhano. Off keeps the existing behavior (only localhost/127.0.0.1 origins pass, CSRF-safe); on relaxes the check so uploads work from public / port-forwarding domains (e.g. ddnsto) for remote access.
- README (EN + zh-CN): added the new setting to the settings-card list.
中文说明
- 新增「允许公网上传」开关(默认关)——外部贡献 @cyhano(ddnsto 内网穿透场景)。关(默认)= 保持现有仅本机 localhost 同源校验(防 CSRF);开 = 放行任意来源,供公网/内网穿透域名访问时上传文件,请在信任访问者时启用。
- README 中英双语设置卡片列表补充该设置项说明。
v0.1.5
Features / 新功能
- 合并 @cyhano 的 PR #2:路径前缀可配置(默认
[上传文件],可清空)+ 拖拽文件夹整体上传(递归读取目录树,附件库按原结构重建,只插一行文件夹路径) settings.plugin.item双字段注册(key+id):同时满足 DSH rc.6(id 契约)与 rc.7+(key 契约)- peerDependencies 声明同时兼容 0.1.0-rc.7 与 0.1.1 线
Version compatibility / 版本兼容
- DSH 0.1.1-rc.1/rc.2:
main(全功能,含官方附件条 + Files API) - DSH 0.1.0-rc.7/rc.8:
main(正常;官方附件条自动降级为路径文本) - DSH 0.1.0-rc.6:装
v0.1.2(本版起不再承诺 rc.6)
Features
- Merged @cyhano's PR #2: configurable path prefix (default
[上传文件], clearable) + folder drag-upload (recursive directory tree, rebuilt under the attachment library, only the folder path goes into the draft) - Dual-field registration (
key+id) forsettings.plugin.item: satisfies both the rc.6 (id) and rc.7+ (key) contracts - peerDependencies now declare both DSH lines
Version compatibility
- DSH 0.1.1-rc.1/rc.2:
main(full features incl. official image rail + Files API) - DSH 0.1.0-rc.7/rc.8:
main(works; official rail auto-degrades to path text) - DSH 0.1.0-rc.6: install
v0.1.2(rc.6 not promised from this release on)
v0.1.4
Fix
- Host now reads the official host image limit under its real field name (
attachments.imageLimits.maxMessageImageBytes); the previousmaxImageBytesnever matched the official schema, so the limit always fell back to the 64 MiB default.
Docs
- README (EN/ZH): version compatibility table — DSH 0.1.1-rc.1+ →
main(v0.1.4+), full features incl. the official image rail; DSH 0.1.0-rc.7 – 0.1.0-rc.8 →main(v0.1.4+), works fine, the image rail auto-degrades to path text unless the session model accepts images; DSH 0.1.0-rc.6 and older →v0.1.2(last release without the settings card, which uses the rc.7+ keyed slot contract).
修复
- Host 读取官方宿主图片上限改用正确字段名(
attachments.imageLimits.maxMessageImageBytes);此前读的maxImageBytes与官方 schema 永不匹配,上限恒回退默认 64 MiB。
文档
- README(中/英)版本对照表:DSH 0.1.1-rc.1 及以上 →
main(v0.1.4+),全功能(含官方附件条);DSH 0.1.0-rc.7 – 0.1.0-rc.8 →main(v0.1.4+),正常,官方附件条自动降级为路径文本(除非会话模型收图);DSH 0.1.0-rc.6 及更早 →v0.1.2(最后一个无设置卡片的版本,设置卡片用 rc.7+ keyed slot 契约)。
v0.1.1
Features
- Official dsw-styled upload icon button (28px, theme-aware)
Chores
- Drop dev-only restart script
中文说明
上传按钮换官方 dsw 图标样式(28px、跟随主题);清理开发期专用重启脚本。