feat: add reasoning block support to chat system

Add comprehensive support for handling reasoning blocks throughout the chat pipeline, including normalization, reconciliation, type definitions, and UI rendering. Implements collapsible reasoning group component with auto-expand during streaming and shimmer indicator.
This commit is contained in:
weishu
2025-12-26 13:35:27 +08:00
parent 5d5023883e
commit 8122768a01
7 changed files with 171 additions and 2 deletions
+12
View File
@@ -420,6 +420,18 @@ function reduceTimeline(
continue
}
if (c.type === 'reasoning') {
blocks.push({
kind: 'agent-reasoning',
id: `${msg.id}:${idx}`,
localId: msg.localId,
createdAt: msg.createdAt,
text: c.text,
meta: msg.meta
})
continue
}
if (c.type === 'summary') {
blocks.push({
kind: 'agent-event',