import { Target } from "@phosphor-icons/react"; import type { CompanyMetrics, SectionId } from "@shared/types"; import { formatDuration, formatMoney, getAgentInitials } from "../../lib/formatters"; import { useT } from "../../i18n"; import { CompactMetric, RunProgressBar } from "./inbox-helpers"; interface PerformanceProps { metrics: CompanyMetrics | null; onNavigate: (section: SectionId, entityId?: string) => void; } export function PerformanceView({ metrics, onNavigate }: PerformanceProps) { const t = useT(); if (!metrics) { return (
| Agent | Tasks Done | Success % | Runs | Avg Duration | Cost |
|---|---|---|---|---|---|
|
{getAgentInitials(am.agentName)}
{am.agentName}
|
{am.tasksCompleted} | = 80 ? "text-green-600 dark:text-green-400" : am.successRate >= 50 ? "text-yellow-600 dark:text-yellow-400" : "text-destructive" }`}> {am.successRate}% | {am.runsTotal} | {formatDuration(am.avgRunDurationSec)} | {formatMoney(am.totalCostUsd)} |