"use client"; import Link from "next/link"; import { useTranslations } from "next-intl"; type CavemanIntensity = "lite" | "full" | "ultra"; type RtkIntensity = "minimal" | "standard" | "aggressive"; export interface CompressionTokenSaverConfig { enabled: boolean; cavemanConfig?: { enabled: boolean; intensity: CavemanIntensity }; cavemanOutputMode?: { enabled: boolean; intensity: CavemanIntensity }; rtkConfig?: { enabled: boolean; intensity: RtkIntensity }; } export type CompressionTokenSaverPatch = Partial; // Read-only summary. The engine on/off + level toggles that used to live here moved to // the single-source panel (/dashboard/context/settings). This card now only reflects the // current state and links to the panel — it no longer writes anything (the `onSave` prop // is accepted for backward compatibility but intentionally unused). function StatusPill({ on }: { on: boolean }) { return ( {on ? "on" : "off"} ); } function SummaryRow({ title, badge, href, on, level, }: { title: string; badge: string; href: string; on: boolean; level: string; }) { return (
{title} {badge}
{level}
); } export default function CompressionTokenSaverCard({ config, }: { config: CompressionTokenSaverConfig; // Kept for call-site compatibility; this card is read-only and never persists. saving?: boolean; onSave?: (patch: CompressionTokenSaverPatch) => void | Promise; }) { const t = useTranslations("settings"); const masterEnabled = config.enabled; const rtk = config.rtkConfig ?? { enabled: true, intensity: "standard" as RtkIntensity }; const cavemanOut = config.cavemanOutputMode ?? { enabled: false, intensity: "full" as CavemanIntensity, }; const cavemanIn = config.cavemanConfig ?? { enabled: true, intensity: "full" as CavemanIntensity, }; return (

bolt {t("tokenSaverTitle")}

{t("tokenSaverSubtitle")}

info

Turn these layers on/off and set their level in{" "} Compression Settings .

); }