import React from 'react'; import { useNavigate } from 'react-router-dom'; import { Card, Typography, Box, Chip, IconButton, Button, Fade } from '@mui/material'; import DeleteIcon from '@mui/icons-material/Delete'; import ChatIcon from '@mui/icons-material/Chat'; import BuildIcon from '@mui/icons-material/Build'; import DiamondIcon from '@mui/icons-material/Diamond'; import { useAgents } from '../contexts/AgentContext'; const AgentCard = ({ agent }) => { const navigate = useNavigate(); const { deleteAgent } = useAgents(); const handleDelete = (e) => { e.stopPropagation(); if (window.confirm(`Are you sure you want to delete ${agent.name}?`)) { deleteAgent(agent.name); } }; const handleInteract = () => { if (agent.status === 'ready') { navigate(`/chat/${agent.name}`); } else { navigate(`/compile/${agent.name}`); } }; return ( {/* Status Indicator */} {agent.name.replace(/_/g, ' ')} Domain: {agent.domain || 'General'} {/* Footer Stats & Actions */} {agent.stats?.nodes_count || 0} ITEMS e.stopPropagation()}> {agent.status === 'ready' ? : } ); }; export default AgentCard;