"use client"; import { CheckIcon, CornerDownLeftIcon, SquareIcon, XIcon } from "lucide-react"; import { cn } from "@/lib/utils"; /** * The chat composer — content row ONLY (the persistent rounded shell lives in * the chat view's overlay, so the shell can later morph chat → question * without remounting). * * Corner-radius math (concentric with the shell): shell rounded-2xl (16px) − * row padding p-1.5 (6px) = button rounded-[10px] = 25% of the 40px button. */ export function Composer({ busy, value, onChange, onSend, onStop, canSend, autoFocus, verdict, }: { busy: boolean; value: string; onChange: (v: string) => void; onSend: () => void; onStop: () => void; canSend: boolean; autoFocus?: boolean; /** The plan verdict gate: while the presented plan awaits the learner's * word, the send square becomes two stacked buttons — green accept, * red decline. Typed text rides the verdict as his note. */ verdict?: { onAccept: () => void; onDecline: () => void }; }) { return (
{ e.preventDefault(); if (busy) onStop(); else if (canSend) onSend(); }} >