import type { AgentStep } from '../../types/agent' interface AgentStepPanelProps { steps?: AgentStep[] visible?: boolean } const statusStyles: Record = { planning: { dot: '#7c3aed', text: '#c4b5fd' }, pending: { dot: 'rgba(255,255,255,0.18)', text: '#818198' }, running: { dot: '#F0B90B', text: '#f6d67a' }, completed: { dot: '#00e5a0', text: '#9cf5d5' }, replanned: { dot: '#38bdf8', text: '#9bdcf7' }, } export function AgentStepPanel({ steps, visible }: AgentStepPanelProps) { if (!visible || !steps || steps.length === 0) { return null } const sanitizedSteps = steps.filter((step) => { const label = step.label.trim().toLowerCase() const detail = (step.detail || '').trim().toLowerCase() return !(label.startsWith('tool:') || detail === 'central_brain') }) if (sanitizedSteps.length === 0) { return null } return (
Live Run
{sanitizedSteps.map((step) => { const style = statusStyles[step.status] return (
{step.label}
{step.detail && (
{step.detail}
)}
) })}
) }