"use client" import { useMemo } from "react" import { BarChart3 } from "lucide-react" import { useTranslations } from "next-intl" import { useFolderContext } from "@/contexts/folder-context" import { AGENT_LABELS } from "@/lib/types" import { AgentIcon } from "@/components/agent-icon" import { Popover, PopoverContent, PopoverTrigger, } from "@/components/ui/popover" export function StatusBarStats() { const t = useTranslations("Folder.statusBar.stats") const { stats } = useFolderContext() const activeAgents = useMemo( () => stats?.by_agent.filter((a) => a.conversation_count > 0) ?? [], [stats] ) if (!stats) return null return (
{t("summary", { conversations: stats.total_conversations, messages: stats.total_messages, })}
{activeAgents.map((a) => (
{AGENT_LABELS[a.agent_type]} {a.conversation_count}
))}
) }