mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-08 07:17:39 +00:00
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:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user