import { GitBranch } from "lucide-react"; import { motion } from "motion/react"; import DogIcon from "@/components/icons/dog-icon"; import { MarkdownRenderer } from "@/components/markdown-renderer"; import { cn } from "@/lib/utils"; import type { FunctionCall } from "../_types/types"; import { FunctionCalls } from "./function-calls"; import { Message } from "./message"; interface AssistantMessageProps { content: string; functionCalls?: FunctionCall[]; messageIndex?: number; expandedFunctionCalls: Set; onToggle: (functionCallId: string) => void; isStreaming?: boolean; showForkButton?: boolean; onFork?: (e: React.MouseEvent) => void; isCompleted?: boolean; isInactive?: boolean; animate?: boolean; delay?: number; isInitialGreeting?: boolean; } export function AssistantMessage({ content, functionCalls = [], messageIndex, expandedFunctionCalls, onToggle, isStreaming = false, showForkButton = false, onFork, isCompleted = false, isInactive = false, animate = true, delay = 0.2, isInitialGreeting = false, }: AssistantMessageProps) { return ( {/* Dog icon with bark animation when greeting */} } actions={ showForkButton && onFork ? ( ) : undefined } >
{/* Slide animation for initial greeting */} ' : 'Thinking' : content } />
); }