import type { KeyboardEvent } from "react"; import { Icon } from "./Icon"; type Props = { value: string; onChange: (v: string) => void; onSend: () => void | Promise; /** Smaller padding when used inside overlay */ compact?: boolean; }; export function MainChatComposer({ value, onChange, onSend, compact, }: Props) { const handleKeyDown = (e: KeyboardEvent) => { if (e.key === "Enter" && !e.shiftKey) { e.preventDefault(); onSend(); } }; return (