import ReactMarkdown from 'react-markdown'; import remarkGfm from 'remark-gfm'; import { CitationsPanel } from '@/components/CitationsPanel'; import { ConfidenceBadge } from '@/components/ConfidenceBadge'; import type { ChatMessage } from '@/lib/types'; import { isCivicSetuResponse } from '@/lib/types'; interface Props { message: ChatMessage; } export function MessageBubble({ message }: Props) { if (message.role === 'user') { return (
{message.text}
{children}
, h1: ({ children }) =>{children}), hr: () =>
{children}
),
pre: ({ children }) => (
{children}
),
a: ({ children, href }) => (
{children}
),
}}
>
{message.text}
Conflict warning: {data.conflict_warnings.join(', ')}
) : null} {data.amendment_notice ? (Amendment notice: {data.amendment_notice}
) : null}