Appearance
验收场景
Agent UI 工作按行为验收,而不是按组件或文档文件是否存在验收。以下场景可用于产品 QA、自动化测试或设计评审。
1. 发送与首状态
- 用户发送 prompt。
- UI 乐观创建 user message。
- Runtime listener 在 submit 前注册。
- Runtime 接受工作后,首个 answer text 前出现 runtime status。
- 支持时 composer 暴露 interrupt/cancel。
通过条件:用户能在文本流开始前知道 Agent 还活着。
2. Text/reasoning 分离
- Runtime 发出 reasoning/thinking content 和 final answer text。
- Reasoning 渲染为 process content,默认折叠或摘要。
- Final answer 渲染为干净 message text。
- Hydration 后 completed reasoning 不作为 final answer text 重放。
通过条件:最终回答不被 <think>、raw reasoning log 或 process status 污染。
3. Final reconciliation
- Runtime 流式发出 text deltas。
- Runtime 随后发出 final answer content。
- UI 把 final answer 与 streamed content reconcile。
通过条件:最终文本不会重复或二次追加。
4. Tool call
- Runtime 发出带稳定 tool call id 的 tool start。
- UI 显示压缩 tool row 和安全输入摘要。
- Tool progress 更新该 row,不进入最终回答正文。
- Tool result 链接 output details 或 offload reference。
- 错误渲染为可恢复 tool failure UI。
通过条件:工具执行可见、可检查,并且不混入最终回答正文。
5. Human-in-the-loop
- Runtime 发出带 id、type、scope 和可选 schema 的 action request。
- UI 把 request 提升为 approval/input surface。
- 用户 approve、reject、edit 或 answer。
- Response 通过 runtime action response API 发送。
- 只有 runtime 确认后,UI 才把 request 标为 resolved。
通过条件:高风险或阻塞工作有明确、可审计的用户控制。
6. Queue 与 steer
- 当前已有 active run。
- 用户继续输入 prompt。
- UI 把 queue 和 steer 作为不同模式展示。
- Queue 创建或更新 queued turn summary。
- Steer 指向 active run,并显示 pending steer state。
通过条件:用户能区分“下一轮执行”和“改变当前执行”。
7. Artifact 工作区
- Runtime 发出带稳定 artifact id 的 artifact created/updated。
- Conversation 显示紧凑 artifact card 或 reference。
- Artifact 工作区使用 artifact service data 打开 preview/editor/diff/version/export 区域。
- Edits、exports、forks 或 handoffs 通过 artifact APIs 或受控 runtime actions。
- 保存失败时保留 last confirmed version,并继续显示 unsaved local edits。
通过条件:交付物离开聊天正文,成为 editable、versioned、exportable artifacts。
8. Evidence export
- 用户或系统触发 evidence export。
- UI 显示后台进度或 task capsule。
- Evidence service 返回 durable references。
- Timeline/evidence surface 链接 summary、trace、artifacts、verification、review 或 replay。
通过条件:evidence 可追溯到 runtime facts,并且不阻塞 chat streaming。
9. 旧 session 恢复
- 用户打开旧 session。
- Shell、tab、title 和 cached snapshot 在可用时立即显示。
- Recent messages 先于 full timeline details 渲染。
- Queue/pending action/runtime summary 随后 hydrate。
- Older messages、tool details、artifacts 和 evidence 按需加载。
通过条件:旧 session 不需要 full history 或所有 artifacts 后才 first paint。
10. Missing facts
- Runtime 缺少 artifact kind、verification status 或 provider stage。
- UI 显示
unknown、unavailable或stale,而不是猜测。 - 用户控制保持安全且可恢复。
通过条件:UI 不伪造 success、approval、artifact type 或 evidence verdict。