|
TL;DR (EN): With the WeChat input method's cross-device clipboard sync enabled on Windows, pasting an image into the dsh web composer often fails to send, with a toast reading "A requested file or directory could not be found at the time an operation was processed." The string is produced nowhere in the harness — it is Chromium's 环境
症状粘贴图片后点发送,消息发不出去,composer 弹 toast:
表面上看和模型强相关:用 Codex 订阅模型基本必现,用 GLM-5.3-flash 一切正常——所以一开始完全查错了方向。 排查(这条文案到底是谁产生的)
根因链路(以当前 master 源码行号为准;已装 0.1.5-rc.1 的 client bundle 为同一模式)关键点:图片草稿被惰性持有,直到提交才第一次读字节。对比之下,非图片文件草稿在 intake 时就后台上传( |
Replies: 1 comment
|
根因链在 master(c291e7961)确认属实,且 bug 仍在(你的行号基本吻合,个别差几行,以 master 为准):
修复方向(与你的想法一致,更具体):在 微信输入法"跨设备复制粘贴"失效原 File 的具体时机属于输入法/OS 行为,我未在 Windows 实测(未验证);临时规避:粘贴后立即点发送,或改用拖拽/文件选择(走立即上传路径)。这个修复小而自包含,适合直接提 PR。 |
根因链在 master(c291e7961)确认属实,且 bug 仍在(你的行号基本吻合,个别差几行,以 master 为准):
clipboardData.items→getAsFile()→ intakeFiles(ui-conversation/src/client/input/editor/keymap.ts:146-154)。browserDraftAttachment只存File+ objectURL 预览(service.ts:73-80),提交时才读字节;对比文件类附件是立即后台上传(:308-324,图片走:310-314、文件走:322)。serializeAttachments→encodeImage→base64ImageOf(service.ts:575-581、:124-135,FileReader.readAsDataURL、onerror reject)→ 剪贴板同步使 File 失效 → NotFoundError →abandon()(:286-291)→ UI notify('error')(facade.ts:379/383)。修复方向(与你的想法一致,更具体):在
browserDraftAttachment入口就await file.arrayBuffer()把字节固化成 Blob 副本,previewUrl指向副本——一次改动同时解决提交失败,还能顺带简化probeDimensions(:90-98…