import { CircleAlertIcon, InfoIcon } from "lucide-react"; import { useId } from "react"; import { Switch } from "../../../ui/switch"; /** This chat's ChatGPT/Codex plan is out of usage: when it resets, and whether the chat goes on then. */ export type CodexUsageChoice = { /** Plain reset sentence, for example "Resets Sat 14:05." or "Reset time unknown.". */ resetText: string; /** The chat waits for the limit and continues on its own when it resets. */ continueAtReset: boolean; pending?: boolean | undefined; /** Why the last change did not go through, in words. */ error?: string | null | undefined; /** Off pauses the waiting chat, so it waits for the person; on lets it continue at the reset. */ onContinueAtResetChange: (continueAtReset: boolean) => void; }; /** * One plain line shown when the chosen model will rebuild a chat Codex * compacted, so the user knows earlier detail may be summarized away. */ export function ModelSwitchHeadsUp({ text, className }: { text: string; className?: string }) { return (
Codex usage limit reached. {choice.resetText}
{choice.error}
) : null}