import { Bot, User, Copy, File } from "lucide-react"; import { Button } from "@/components/ui/button"; import { Badge } from "@/components/ui/badge"; import { useState } from "react"; import { useToast } from "@/hooks/use-toast"; interface ChatMessageProps { role: "user" | "assistant"; content: string; model?: string; attachments?: Array<{ name: string; type: string; size: number; }>; } export const ChatMessage = ({ role, content, model, attachments }: ChatMessageProps) => { const [showActions, setShowActions] = useState(false); const { toast } = useToast(); const isAssistant = role === "assistant"; const handleCopy = () => { navigator.clipboard.writeText(content); toast({ title: "Copiado!", description: "Mensagem copiada para a área de transferência", }); }; return (
{content}