Why: The chat timeline needs a persisted thinking duration, and tool duration already lives on the tool call, so the thinking part had nowhere to put it. Evidence: go test ./... passes; the message golden now includes durationMs on the thinking part. Impact: Additive JSON field with omitempty. Existing clients ignore unknown fields. Refs: feature/chat-timeline-preview Co-authored-by: Cursor <cursoragent@cursor.com>
60 lines
1.2 KiB
JSON
60 lines
1.2 KiB
JSON
{
|
|
"id": "msg_abc123def456",
|
|
"conversationId": "cnv_abc123def456",
|
|
"runId": "run_abc123def456",
|
|
"role": "assistant",
|
|
"parts": [
|
|
{
|
|
"type": "thinking",
|
|
"text": "考虑先检索…",
|
|
"process": true,
|
|
"durationMs": 1500
|
|
},
|
|
{
|
|
"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"
|
|
}
|