Autumn-27
683f5ee684
feat: 独立对话(ChatAgent)也支持文件上传(方式1:落盘 + Read/Bash 读取)
补齐上次只做了任务主 Agent 的遗留:独立对话面此前只共用了 transcript 渲染,
后端注入 + Composer 上传缺失,现补上。
- 后端(pgSendConversationMessage):收 attachments;用 userActivityWithAttachments
存 {text,attachments} JSON 供卡片渲染(无附件仍存全文 Detail 供懒加载);用
composeAgentMessage 把【绝对路径】清单拼进发给 ChatAgent 的消息,baseDir=
<workDir>/sessions/conv-<id>/,与 chatUpload 落盘、chat.go 的 sessionWorkDir 对齐;
纯附件无文本也可发,首条会话名兜底"附件消息"。
- 前端(chat/page.tsx):Composer 加回形针上传按钮 + 附件 chip 预览(可移除);
ChatView 上传到 scope=session&id=conv-<id> 并带附件发送;DraftChat 草稿态没有
会话 id,点回形针先懒创建会话再上传,交接文本+附件给 ChatView 发送。
- api.sendConversationMessage 增加 attachments 参数。
2026-08-18 07:55:18 -04:00
..
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-08-18 07:55:18 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-08-08 13:14:49 -04:00
2026-08-08 13:14:49 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00
2026-07-26 04:27:45 -04:00