mirror of
https://github.com/wu736139669/hapi.git
synced 2026-08-05 06:24:37 +00:00
fix(web): render system messages without MessagePrimitive.Root
https://github.com/assistant-ui/assistant-ui/issues/2954
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { MessagePrimitive, useAssistantState } from '@assistant-ui/react'
|
||||
import { useAssistantState } from '@assistant-ui/react'
|
||||
import { getEventPresentation } from '@/chat/presentation'
|
||||
import type { HappyChatMessageMetadata } from '@/lib/assistant-runtime'
|
||||
|
||||
@@ -12,13 +12,13 @@ export function HappySystemMessage() {
|
||||
const icon = event ? getEventPresentation(event).icon : null
|
||||
|
||||
return (
|
||||
<MessagePrimitive.Root className="py-1">
|
||||
<div className="py-1">
|
||||
<div className="mx-auto w-fit max-w-[92%] px-2 text-center text-xs text-[var(--app-hint)] opacity-80">
|
||||
<span className="inline-flex items-center gap-1">
|
||||
{icon ? <span aria-hidden="true">{icon}</span> : null}
|
||||
<span>{text}</span>
|
||||
</span>
|
||||
</div>
|
||||
</MessagePrimitive.Root>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user