"use client"; interface ResearchState { question: string; status: string; current_iteration: number; max_iterations: number; confidence: number; plan: Array>; findings: Array>; final_report: Record | null; } interface StateDisplayProps { state: ResearchState; } export default function StateDisplay({ state }: StateDisplayProps) { return (

Research State

This state is shared between the research agent and the frontend via the AG-UI protocol.

Question
{state.question || "No question yet"}
Status
{state.status}
Confidence
0.8 ? "#38a169" : state.confidence > 0.5 ? "#d69e2e" : "#e53e3e", }} > {(state.confidence * 100).toFixed(0)}%
Progress
{state.current_iteration} / {state.max_iterations}
Plan Items
{state.plan.length}
Findings
{state.findings.length}
Final Report
{state.final_report ? "Ready" : "Not ready"}
); }