Files
Agent-System-Core/testdata/golden/message.json
T
weichen a64fb5a168 Add CardID to CardPart for inbox-reference card parts
Why: 卡流机制(CF1)需要消息部件正式引用收件箱 ActivityCard——submit_card 产卡时卡片为产物权威载体,消息只存引用+锚点渲染(原仅能从 data 字符串里正则抠 card:<id>)。
Evidence: go test ./... 通过;golden message.json 增 card 引用部件锁定 cardId 线格式(-update 重生成后逐字节一致)。
Impact: CardPart 增可选 cardId(omitempty,旧数据零影响);ts/types.ts 同步,镜像经 make contracts 再生成。
Refs: Dev 任务卡 feature/cardflow-r1;提案 cardflow-and-process-split(编制中)。
2026-09-30 16:10:20 +00:00

59 lines
1.1 KiB
JSON

{
"id": "msg_abc123def456",
"conversationId": "cnv_abc123def456",
"runId": "run_abc123def456",
"role": "assistant",
"parts": [
{
"type": "thinking",
"text": "考虑先检索…",
"process": true
},
{
"type": "tool_call",
"toolCall": {
"id": "call_1",
"name": "history_search",
"arguments": "{\"q\":\"部署\"}",
"durationMs": 12.5
},
"process": true
},
{
"type": "tool_result",
"toolResult": {
"callId": "call_1",
"status": "ok",
"summary": "3 条命中"
},
"process": true
},
{
"type": "text",
"text": "根据历史记录……"
},
{
"type": "artifact_ref",
"artifact": {
"artifactId": "art_abc123def456",
"name": "报告.md",
"kind": "document"
}
},
{
"type": "card",
"card": {
"kind": "result",
"data": [
{
"type": "markdown",
"markdown": "全文见卡片"
}
],
"cardId": "card_abc123def456"
}
}
],
"createdAt": "0001-01-01T00:00:00Z"
}