import { useState } from 'react'; import { motion, AnimatePresence } from 'framer-motion'; import { Brain, ChevronDown, ChevronUp, Eye, CheckCircle, XCircle } from 'lucide-react'; import type { NegotiationMessage, LabConstraints, Protocol } from '@/types'; import { cn } from '@/lib/utils'; import CharacterAvatar from '@/components/CharacterAvatar'; interface AgentThoughtsProps { messages: NegotiationMessage[]; labConstraints: LabConstraints; protocol: Protocol | null; className?: string; } export default function AgentThoughts({ messages, labConstraints, protocol, className, }: AgentThoughtsProps) { const [expanded, setExpanded] = useState(true); if (messages.length === 0) return null; const lastScientist = [...messages].reverse().find((m) => m.role === 'scientist'); const lastLabManager = [...messages].reverse().find((m) => m.role === 'lab_manager'); return (
{lastScientist.message.length > 150 ? lastScientist.message.slice(0, 150) + '...' : lastScientist.message}
{protocol && (Waiting to propose...
)}{lastLabManager.message.length > 100 ? lastLabManager.message.slice(0, 100) + '...' : lastLabManager.message}
Waiting for proposal...
)}