"use client"; import { UsageCard } from "@/components/ui/usage-card"; import { useKnowledgeBases } from "@/hooks/use-knowledge-bases"; import { useMemoryStores } from "@/hooks/use-memory-stores"; import { useI18n } from "@/i18n/i18n-context"; /** * Sidebar footer "Usage" card. Reuses the cached KB / memory-store list * queries so the counts share their cache with the actual list pages and * never trigger duplicate network calls beyond the one initial fetch. */ export function SidebarUsageStats() { const { t } = useI18n(); const kb = useKnowledgeBases(); const ms = useMemoryStores(); const kbCount = kb.data?.totalCount ?? kb.data?.items?.length; const msCount = ms.data?.totalCount ?? ms.data?.items?.length; return ( ); }