"use client"; import Link from "next/link"; import { Brain } from "lucide-react"; import { useMemory } from "@/lib/hooks"; function UsageBar({ label, usage }: { label: string; usage: string }) { // usage format: "42% — 939/2,200 chars" const pctMatch = usage.match(/(\d+)%/); const pct = pctMatch ? parseInt(pctMatch[1]) : 0; const color = pct > 85 ? "#ef4444" : pct > 65 ? "#f59e0b" : "#38bdf8"; return (