/* === agents-achados.jsx ============================================== PreviewAgents (with tabs + library + video demos) PreviewAchados (saved analyses with filters) ===================================================================== */ const AGENT_TAG_COLORS = { alertas: { bg: '#FEE2E2', fg: '#991B1B', label: 'Alertas' }, priorizador: { bg: '#FEF3C7', fg: '#92400E', label: 'Priorizador' }, insights: { bg: '#DBEAFE', fg: '#1E40AF', label: 'Insights' }, autonomos: { bg: '#D1FAE5', fg: '#065F46', label: 'Autônomos' }, }; /* ================================================================== AGENTS — main screen with Agentes / Biblioteca tabs ================================================================== */ function PreviewAgents({ state, onSetState }) { const a = state.agents; const setA = (patch) => onSetState({ ...state, agents: { ...a, ...(typeof patch === 'function' ? patch(a) : patch) } }); const [showVideo, setShowVideo] = React.useState(null); return (

Agentes

Automatize análises recorrentes com agentes inteligentes

{a.activeTab === 'agentes' ? : } {showVideo && setShowVideo(null)} />} {a.showNewTemplate && }
); } /* ============ AGENTES TAB ============ */ function AgentesTab({ state, setA, onPlayVideo }) { const a = state.agents; const filtered = a.active.filter(ag => a.filter === 'all' || ag.category === a.filter); return ( <>
Agentes Autônomos P2P ({filtered.length})
{filtered.map(ag => )}
); } function AgentCard({ agent, state, setA, onPlay }) { const tag = AGENT_TAG_COLORS[agent.category] || AGENT_TAG_COLORS.insights; const [editingVideo, setEditingVideo] = React.useState(false); const updateAgent = (patch) => { setA(curr => ({ ...curr, active: curr.active.map(a => a.id === agent.id ? { ...a, ...patch } : a), })); }; return (
{agent.status === 'live' ? 'Ao vivo' : agent.status === 'paused' ? 'Pausada' : 'Rascunho'}

{tag.label} {(agent.tags || []).map(t => ( {t} ))}
{agent.demoVideo ? ( ) : ( Sem vídeo demo )} {' · '} {' ações'}
{editingVideo && (