import { useEffect, useRef } from "react"; import type { AgentState, StepStatus } from "../types"; const C = { bg: "#0d1117", surface: "#161b22", border: "#21262d", text: "#c9d1d9", muted: "#8b949e", dim: "#484f58", accent: "#58a6ff", green: "#3fb950", red: "#f85149", yellow: "#d29922", }; const AGENT_COLORS: Record = { coder: "#58a6ff", auditor: "#d29922", tester: "#3fb950", }; const DEFAULT_REQUIREMENT = `Crie um contrato de staking com as seguintes características: - Usuários podem depositar ETH e receber créditos proporcionais ao valor - O owner pode pausar e retomar os depósitos - Função de saque que devolve ETH proporcional ao crédito do usuário - Acumula recompensas de 1% ao dia sobre o saldo depositado - Emite eventos para depósito, saque e distribuição de recompensas`; interface Props { requirements: string; onRequirementsChange: (v: string) => void; onRun: (e: React.FormEvent) => void; running: boolean; agentStates: AgentState[]; logs: string[]; } export function ControlPanel({ requirements, onRequirementsChange, onRun, running, agentStates, logs }: Props) { return (
); } function Header() { return (
TALP1 v0.1
multi-agent smart contract pipeline
); } function InputForm({ requirements, onChange, onRun, running, }: { requirements: string; onChange: (v: string) => void; onRun: (e: React.FormEvent) => void; running: boolean; }) { const canRun = !running && requirements.trim().length > 0; return (
requisitos