Files
Agent-System-Dev/.task/feature-chat-order-artifact-files.md
T
weichen 7e9cac8a40
ci / test (pull_request) Failing after 30s
Record the sync checkpoint
2026-09-30 15:42:52 +00:00

5.2 KiB
Raw Blame History

feature/chat-order-artifact-files 任务卡

任务主记录:Dev PR(本卡随分支合入,PR 见 Git 远端 feature/chat-order-artifact-files → main);状态:已完成;owner:weichen

基线与授权

  • 权威仓:ssh://git@git-ssh.u1680832.nyat.app:31411/weichen/Agent-System-Dev.git;目标分支:main;R0(initial_base_sha)= ffda6d33ea
  • 工作区:/home/weichen/projects/Agent-System-Dev-wt-feature-chat-order-artifact-files(worktree);分支:feature/chat-order-artifact-files
  • 授权与交付终点:用户四项反馈的修复(消息顺序保真 / 下载通道 / 工件文件管理 / 设置界面布局),实现+验证+PR 合入 main + gitlink 推进 + 卡闭合。

目标与非目标

用户反馈(2026-09-30,附用户设置界面截图):

  1. 会议纪要 docx 任务中"工具调用的位置和实际的位置不符,助手输出显示的顺序没有保持"——根因:Conversation.tsx 按 p.process 布尔把一条消息的 parts 二分重排(过程全前置);live 流式同病(固定模板序)且 live 期间无工件 chip。
  2. "整理好的内容,没有下载通道"——后端无 Content-Disposition/MIME 回退;chip 无下载;DocViewer 弹层套弹层。
  3. "工作区中的文件应该能浏览、显示、下载、回看"——ArtifactsPanel 仅 图标+名+kind 裸列表;收件箱结果卡 doc-ref 点不开(无 docBridge)。
  4. "用户设置界面设计有问题"——根因:SettingsShell 根挂 .modal.ui-settings-shell,宿主 styles.css 后加载以同特异性覆盖(column/860px)压坏左右布局;设置行未用 @ui SettingRow;保存按钮随内容滚动。

非目标:docx 在线预览(无新依赖原则,下载为主);新增 fs 类工具/工作区目录("工作区文件"即 artifacts);live 事件协议改动。

修复要点(四仓)

  • modules/ui:.modal.ui-settings-shell 复合选择器(0,2,0)免疫加载顺序;SettingsShell 增 actions 固定底栏 + .ui-settings-scroll 滚动区;ActivityCardView/InboxList 透传 docBridge;Icon 增 file/image/download/trash/eye;SettingRow label/desc 放宽 ReactNode。
  • modules/backend:artifactContent 始终回 Content-Disposition(默认 inline,?download=1 → attachment;RFC 5987 filename* + ASCII 兜底);contentTypeOf 增 Office/PDF/CSV/MD 扩展名显式表 + mime.TypeByExtension 回退。
  • modules/frontend:messageparts.ts 新增 groupParts(连续过程部件就地聚块,渲染顺序=落库顺序)+ humanSize/artifactIcon;AssistantMessage 按块序渲染;LiveState.parts 按事件到达序维护(含 artifact.created 即时上 chip);工件 chip = 图标+打开+下载;ArtifactsPanel = 搜索+kind 过滤+上传+行内 预览/下载/删除(确认);DocViewer 单层 OverlayHost(pdf iframe / csv·json 等宽 / 二进制信息卡+下载 CTA);SettingsModal 迁移 SettingRow+actions 底栏;InboxList 接 docBridge。
  • modules/documents:本卡 + 提案补记(渲染顺序=落库顺序 约定)。

同步记录

节点 sync_base_sha tested_head_sha checked_at
启动 ffda6d33ea ffda6d33ea 2026-09-30T14:54:07Z
同步前验收 ffda6d33ea 76e255342b24e34f1b344784c87f5b076c6b8557 2026-09-30T15:18:27Z
合入前(子仓变基至 cross-session-reading 合入后的 main 并全套重验) ca84888… e6fdc5b… 2026-09-30T15:35:00Z

结果与验证