"use client"; import { cn } from "@/lib/utils"; import { Button } from "@/components/ui/button"; import { Textarea } from "@/components/ui/textarea"; import { Mic, Send, Square } from "lucide-react"; import { MarkdownPreview } from "@/components/markdown/markdown-widgets"; export interface ChatBubbleMessage { role: "user" | "assistant"; content: string; } /** * Shared message-bubble list for the two plain-text chat surfaces (the * global Chat page and the group Status Update follow-up Q&A) -- both * just render a back-and-forth conversation with no ask/finalize review * step, unlike GroupAiDialog/TodoAiDialog (which inline their own nearly * identical list because they also render an editable "pending" state * this shared component doesn't need to know about). */ export function ChatMessageList({ messages, sending, error, emptyHint, colorMode, }: { messages: ChatBubbleMessage[]; sending: boolean; error: string | null; emptyHint: string; colorMode?: "light" | "dark"; }) { return (
{emptyHint}
) : ( messages.map((message, index) => ({error}
}