import { useTranslation } from "react-i18next"; import { cn } from "@/lib/utils"; import type { UIContextCompaction } from "@/lib/types"; interface ContextCompactionNoticeProps { compaction: UIContextCompaction; } export function ContextCompactionNotice({ compaction }: ContextCompactionNoticeProps) { const { t } = useTranslation(); const title = compaction.phase === "started" ? t("thread.compaction.started", { defaultValue: "Compressing context" }) : compaction.phase === "failed" ? t("thread.compaction.failed", { defaultValue: "Context compaction failed" }) : compaction.phase === "cancelled" ? t("thread.compaction.cancelled", { defaultValue: "Context compaction cancelled" }) : t("thread.compaction.succeeded", { defaultValue: "Context compacted" }); return (

{title}

); }