mirror of
https://github.com/RuoJi6/ARTEX.git
synced 2026-11-08 12:23:49 +08:00
补齐上次只做了任务主 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 参数。