\n {/* ── @ / slash menu ─────────────────────────────── */}\n {menu && (\n
setEngaged(false)}\n className=\"absolute inset-x-0 bottom-full z-10 mb-2 rounded-[10px] bg-surface p-1 shadow-raised\"\n style={{ animation: \"pop-in 180ms cubic-bezier(0.23,1,0.32,1) both\", transformOrigin: \"bottom center\" }}\n >\n {/* single gliding highlight — appears once a row is hovered */}\n
0 ? 1 : 0,\n transition:\n \"top 220ms cubic-bezier(0.23,1,0.32,1), height 220ms cubic-bezier(0.23,1,0.32,1), opacity 150ms ease\",\n }}\n />\n {rows.map((row, i) => {\n const source = menu === \"at\" ? SOURCES.find((s) => s.key === row.key) : undefined;\n return (\n {\n rowRefs.current[i] = el;\n }}\n onMouseDown={(event) => event.preventDefault()}\n onMouseEnter={() => {\n setActive(i);\n setEngaged(true);\n }}\n onClick={() => pick(row)}\n className=\"relative z-10 flex h-9 w-full items-center gap-2.5 rounded-[6px] px-2 text-left\"\n >\n {source && (\n \n {source.brand ? BRANDS[source.brand] : {GLYPHS[source.glyph ?? \"clip\"]} }\n \n )}\n \n {row.name}\n \n {row.desc} \n {source?.connect && (\n {\n event.stopPropagation();\n setConnected((current) => !current);\n }}\n className={`shrink-0 text-[12px] font-medium transition-colors duration-100 ${\n connected ? \"text-green\" : \"text-accent-ink hover:underline\"\n }`}\n >\n {connected ? \"Connected\" : \"Connect\"}\n \n )}\n \n );\n })}\n {rows.length === 0 && (\n \n No matches for “{query}”\n
\n )}\n \n {menu === \"at\" ? \"Type to search sources & files\" : \"Type to search commands\"}\n
\n \n )}\n\n {/* ── model menu ─────────────────────────────────── */}\n {modelOpen && (\n
setModelHovered(null)}\n className=\"absolute z-10 w-44 rounded-[10px] bg-surface p-1 shadow-raised\"\n style={{ left: modelMenuLeft, bottom: modelMenuBottom, animation: \"pop-in 180ms cubic-bezier(0.23,1,0.32,1) both\", transformOrigin: \"bottom left\" }}\n >\n {/* single gliding highlight — floats to the hovered / selected row */}\n
\n {MODELS.map((m, i) => (\n
{\n modelRowRefs.current[i] = el;\n }}\n onMouseDown={(event) => event.preventDefault()}\n onMouseEnter={() => setModelHovered(i)}\n onClick={() => {\n selectModel(m);\n inputRef.current?.focus();\n }}\n className=\"relative z-10 flex h-7.5 w-full items-center gap-2 rounded-[6px] px-2 text-left\"\n >\n {m.name} \n {m.tag} \n \n \n \n \n ))}\n
\n )}\n\n {/* ── composer ───────────────────────────────────── */}\n
0 || wide ? \"rounded-[24px]\" : \"rounded-full\") : tall ? \"rounded-[22px]\" : \"rounded-[14px]\"\n }`}\n >\n {/* rainbow glimm sweep — plays across the interior on model change.\n explicit w/h: a
is a replaced element and won't stretch\n to inset-0 alone, which feeds back into the shader's ResizeObserver. */}\n \n \n {draft}\n \n\n {attachments.length > 0 && (\n \n {attachments.map((file, i) => (\n
\n \n {file} \n setAttachments((current) => current.filter((_, j) => j !== i))}\n className={`-my-1 flex size-6 items-center justify-center text-ink-3 transition-colors duration-100 hover:bg-line/70 hover:text-ink ${\n pill ? \"rounded-full\" : \"rounded-[5px]\"\n }`}\n >\n \n \n \n ))}\n
\n )}\n\n \n
{\n setModelOpen(false);\n setPlusOpen((current) => !current);\n inputRef.current?.focus();\n }}\n className={`flex size-7 shrink-0 items-center justify-center justify-self-start text-ink-3 transition-[background-color,color,transform] duration-150 hover:bg-hover hover:text-ink active:scale-[0.94] ${\n pill ? \"rounded-full\" : \"rounded-[8px]\"\n } ${plusOpen ? \"bg-hover text-ink\" : \"\"} ${wide ? \"col-start-1 row-start-2\" : \"col-start-1 row-start-1\"}`}\n >\n \n \n\n
\n \n