import React from 'react' import StatusBadge from './StatusBadge' import ProgressBar from './ProgressBar' function InstancePanel({ instance, onClick, onKill, onRestart }) { const { instance: inst, stats, latest_message } = instance const handleKill = (e) => { e.stopPropagation() if (window.confirm('Are you sure you want to kill this instance?')) { onKill() } } const handleRestart = (e) => { e.stopPropagation() onRestart() } return (

{inst.workspace.split('/').pop() || 'Unknown'}

{inst.instance_type === 'ensemble' ? 'Coach + Player' : 'Single Agent'}
PID: {inst.pid} | Started: {new Date(inst.start_time).toLocaleTimeString()}
{inst.status === 'running' && ( )} {inst.status === 'terminated' && ( )}
Tokens
{stats.total_tokens.toLocaleString()}
Tool Calls
{stats.tool_calls}
Errors
{stats.errors}
{latest_message && (
Latest: {latest_message}
)}
{inst.workspace}
) } export default InstancePanel