/** * SlashMenu — autocomplete popover that floats above the composer when the * input starts with "/". Renders filtered slash commands; the parent owns * cursor state and Enter / arrow handling (so the textarea keeps focus). */ export default function SlashMenu({ items, cursor, onPick }) { if (!items.length) return null return (
{items.map((item, idx) => { const active = idx === cursor return ( ) })}
) }