import React, { useState } from "react"; import { Card, CardContent } from "@/components/ui/card"; import { Badge } from "@/components/ui/badge"; import { Button } from "@/components/ui/button"; import { Clock, Zap, ArrowRight, Search, TrendingUp } from "lucide-react"; import { SimpleGraphVisualizer } from "@/components/features/comparison/SimpleGraphVisualizer"; import { UniversalGraphData } from "@/types"; interface AgentGraphImpactProps { traces?: any[]; className?: string; } export function AgentGraphImpact({ className }: AgentGraphImpactProps) { const [showFullTrace, setShowFullTrace] = useState(false); // Simple example data from actual system const traceExample = { short: `{ "content": "You are given: (1) a task...", "name": "Probability_Expert", "tool_calls": [ { "function": "search", "parameters": { "query": "analyze data" } } ], "reasoning": "User needs..." }`, expanded: `{ "messages": [ { "content": "You are given: (1) a task and advises from your manager (2) a list of requirements that must be satisfied...", "name": "Probability_Expert", "role": "assistant", "tool_calls": [ { "function": "search", "parameters": { "query": "analyze data", "filters": ["recent", "relevant"], "max_results": 10 } } ], "reasoning": "User needs comprehensive analysis of probability game strategies...", "metadata": { "timestamp": "2024-01-15T10:30:00Z", "complexity": 8.4, "nested_objects": 47, "processing_time": 16.2 } } ], "conversation_flow": [ {"agent": "Probability_Expert", "action": "task_assignment"}, {"agent": "Computer_terminal", "action": "code_implementation"}, {"analysis": {"depth": 8, "branches": 23, "iterations": 45}} ] }`, }; // Real graph data using actual system structure const graphData: UniversalGraphData = { nodes: [ { id: "probability_expert", name: "Probability Expert", type: "agent", color: "#3b82f6", }, { id: "computer_terminal", name: "Computer Terminal", type: "agent", color: "#8b5cf6", }, { id: "game_simulation", name: "Game Simulation Task", type: "task", color: "#10b981", }, { id: "strategy_analysis", name: "Strategy Analysis", type: "output", color: "#f59e0b", }, ], links: [ { id: "link1", source: "probability_expert", target: "game_simulation", type: "PERFORMS", color: "#94a3b8", }, { id: "link2", source: "computer_terminal", target: "strategy_analysis", type: "GENERATES", color: "#94a3b8", }, { id: "link3", source: "game_simulation", target: "strategy_analysis", type: "PRODUCES", color: "#94a3b8", }, ], }; // Metrics based on actual data from your system const stats = { timeSaved: 11, speedMultiplier: 3.2, complexityReduction: 6.3, // Fixed to 1 decimal place efficiencyGain: 69, }; return (