Selector.svelte 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618
  1. <script lang="ts">
  2. import { DropdownMenu } from 'bits-ui';
  3. import { marked } from 'marked';
  4. import Fuse from 'fuse.js';
  5. import { flyAndScale } from '$lib/utils/transitions';
  6. import { createEventDispatcher, onMount, getContext, tick } from 'svelte';
  7. import ChevronDown from '$lib/components/icons/ChevronDown.svelte';
  8. import Check from '$lib/components/icons/Check.svelte';
  9. import Search from '$lib/components/icons/Search.svelte';
  10. import { deleteModel, getOllamaVersion, pullModel } from '$lib/apis/ollama';
  11. import {
  12. user,
  13. MODEL_DOWNLOAD_POOL,
  14. models,
  15. mobile,
  16. temporaryChatEnabled,
  17. settings,
  18. config
  19. } from '$lib/stores';
  20. import { toast } from 'svelte-sonner';
  21. import { capitalizeFirstLetter, sanitizeResponseContent, splitStream } from '$lib/utils';
  22. import { getModels } from '$lib/apis';
  23. import Tooltip from '$lib/components/common/Tooltip.svelte';
  24. import Switch from '$lib/components/common/Switch.svelte';
  25. import ChatBubbleOval from '$lib/components/icons/ChatBubbleOval.svelte';
  26. import { goto } from '$app/navigation';
  27. const i18n = getContext('i18n');
  28. const dispatch = createEventDispatcher();
  29. export let id = '';
  30. export let value = '';
  31. export let placeholder = 'Select a model';
  32. export let searchEnabled = true;
  33. export let searchPlaceholder = $i18n.t('Search a model');
  34. export let showTemporaryChatControl = false;
  35. export let items: {
  36. label: string;
  37. value: string;
  38. model: Model;
  39. // eslint-disable-next-line @typescript-eslint/no-explicit-any
  40. [key: string]: any;
  41. }[] = [];
  42. export let className = 'w-[32rem]';
  43. export let triggerClassName = 'text-lg';
  44. let show = false;
  45. let selectedModel = '';
  46. $: selectedModel = items.find((item) => item.value === value) ?? '';
  47. let searchValue = '';
  48. let ollamaVersion = null;
  49. let selectedModelIdx = 0;
  50. const fuse = new Fuse(
  51. items.map((item) => {
  52. const _item = {
  53. ...item,
  54. modelName: item.model?.name,
  55. tags: item.model?.info?.meta?.tags?.map((tag) => tag.name).join(' '),
  56. desc: item.model?.info?.meta?.description
  57. };
  58. return _item;
  59. }),
  60. {
  61. keys: ['value', 'tags', 'modelName'],
  62. threshold: 0.4
  63. }
  64. );
  65. $: filteredItems = searchValue
  66. ? fuse.search(searchValue).map((e) => {
  67. return e.item;
  68. })
  69. : items;
  70. const pullModelHandler = async () => {
  71. const sanitizedModelTag = searchValue.trim().replace(/^ollama\s+(run|pull)\s+/, '');
  72. console.log($MODEL_DOWNLOAD_POOL);
  73. if ($MODEL_DOWNLOAD_POOL[sanitizedModelTag]) {
  74. toast.error(
  75. $i18n.t(`Model '{{modelTag}}' is already in queue for downloading.`, {
  76. modelTag: sanitizedModelTag
  77. })
  78. );
  79. return;
  80. }
  81. if (Object.keys($MODEL_DOWNLOAD_POOL).length === 3) {
  82. toast.error(
  83. $i18n.t('Maximum of 3 models can be downloaded simultaneously. Please try again later.')
  84. );
  85. return;
  86. }
  87. const [res, controller] = await pullModel(localStorage.token, sanitizedModelTag, '0').catch(
  88. (error) => {
  89. toast.error(`${error}`);
  90. return null;
  91. }
  92. );
  93. if (res) {
  94. const reader = res.body
  95. .pipeThrough(new TextDecoderStream())
  96. .pipeThrough(splitStream('\n'))
  97. .getReader();
  98. MODEL_DOWNLOAD_POOL.set({
  99. ...$MODEL_DOWNLOAD_POOL,
  100. [sanitizedModelTag]: {
  101. ...$MODEL_DOWNLOAD_POOL[sanitizedModelTag],
  102. abortController: controller,
  103. reader,
  104. done: false
  105. }
  106. });
  107. while (true) {
  108. try {
  109. const { value, done } = await reader.read();
  110. if (done) break;
  111. let lines = value.split('\n');
  112. for (const line of lines) {
  113. if (line !== '') {
  114. let data = JSON.parse(line);
  115. console.log(data);
  116. if (data.error) {
  117. throw data.error;
  118. }
  119. if (data.detail) {
  120. throw data.detail;
  121. }
  122. if (data.status) {
  123. if (data.digest) {
  124. let downloadProgress = 0;
  125. if (data.completed) {
  126. downloadProgress = Math.round((data.completed / data.total) * 1000) / 10;
  127. } else {
  128. downloadProgress = 100;
  129. }
  130. MODEL_DOWNLOAD_POOL.set({
  131. ...$MODEL_DOWNLOAD_POOL,
  132. [sanitizedModelTag]: {
  133. ...$MODEL_DOWNLOAD_POOL[sanitizedModelTag],
  134. pullProgress: downloadProgress,
  135. digest: data.digest
  136. }
  137. });
  138. } else {
  139. toast.success(data.status);
  140. MODEL_DOWNLOAD_POOL.set({
  141. ...$MODEL_DOWNLOAD_POOL,
  142. [sanitizedModelTag]: {
  143. ...$MODEL_DOWNLOAD_POOL[sanitizedModelTag],
  144. done: data.status === 'success'
  145. }
  146. });
  147. }
  148. }
  149. }
  150. }
  151. } catch (error) {
  152. console.log(error);
  153. if (typeof error !== 'string') {
  154. error = error.message;
  155. }
  156. toast.error(`${error}`);
  157. // opts.callback({ success: false, error, modelName: opts.modelName });
  158. break;
  159. }
  160. }
  161. if ($MODEL_DOWNLOAD_POOL[sanitizedModelTag].done) {
  162. toast.success(
  163. $i18n.t(`Model '{{modelName}}' has been successfully downloaded.`, {
  164. modelName: sanitizedModelTag
  165. })
  166. );
  167. models.set(
  168. await getModels(
  169. localStorage.token,
  170. $config?.features?.enable_direct_connections && ($settings?.directConnections ?? null)
  171. )
  172. );
  173. } else {
  174. toast.error($i18n.t('Download canceled'));
  175. }
  176. delete $MODEL_DOWNLOAD_POOL[sanitizedModelTag];
  177. MODEL_DOWNLOAD_POOL.set({
  178. ...$MODEL_DOWNLOAD_POOL
  179. });
  180. }
  181. };
  182. onMount(async () => {
  183. ollamaVersion = await getOllamaVersion(localStorage.token).catch((error) => false);
  184. });
  185. const cancelModelPullHandler = async (model: string) => {
  186. const { reader, abortController } = $MODEL_DOWNLOAD_POOL[model];
  187. if (abortController) {
  188. abortController.abort();
  189. }
  190. if (reader) {
  191. await reader.cancel();
  192. delete $MODEL_DOWNLOAD_POOL[model];
  193. MODEL_DOWNLOAD_POOL.set({
  194. ...$MODEL_DOWNLOAD_POOL
  195. });
  196. await deleteModel(localStorage.token, model);
  197. toast.success(`${model} download has been canceled`);
  198. }
  199. };
  200. </script>
  201. <DropdownMenu.Root
  202. bind:open={show}
  203. onOpenChange={async () => {
  204. searchValue = '';
  205. selectedModelIdx = 0;
  206. window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0);
  207. }}
  208. closeFocus={false}
  209. >
  210. <DropdownMenu.Trigger
  211. class="relative w-full font-primary"
  212. aria-label={placeholder}
  213. id="model-selector-{id}-button"
  214. >
  215. <div
  216. class="flex w-full text-left px-0.5 outline-hidden bg-transparent truncate {triggerClassName} justify-between font-medium placeholder-gray-400 focus:outline-hidden"
  217. >
  218. {#if selectedModel}
  219. {selectedModel.label}
  220. {:else}
  221. {placeholder}
  222. {/if}
  223. <ChevronDown className=" self-center ml-2 size-3" strokeWidth="2.5" />
  224. </div>
  225. </DropdownMenu.Trigger>
  226. <DropdownMenu.Content
  227. class=" z-40 {$mobile
  228. ? `w-full`
  229. : `${className}`} max-w-[calc(100vw-1rem)] justify-start rounded-xl bg-white dark:bg-gray-850 dark:text-white shadow-lg outline-hidden"
  230. transition={flyAndScale}
  231. side={$mobile ? 'bottom' : 'bottom-start'}
  232. sideOffset={3}
  233. >
  234. <slot>
  235. {#if searchEnabled}
  236. <div class="flex items-center gap-2.5 px-5 mt-3.5 mb-3">
  237. <Search className="size-4" strokeWidth="2.5" />
  238. <input
  239. id="model-search-input"
  240. bind:value={searchValue}
  241. class="w-full text-sm bg-transparent outline-hidden"
  242. placeholder={searchPlaceholder}
  243. autocomplete="off"
  244. on:keydown={(e) => {
  245. if (e.code === 'Enter' && filteredItems.length > 0) {
  246. value = filteredItems[selectedModelIdx].value;
  247. show = false;
  248. return; // dont need to scroll on selection
  249. } else if (e.code === 'ArrowDown') {
  250. selectedModelIdx = Math.min(selectedModelIdx + 1, filteredItems.length - 1);
  251. } else if (e.code === 'ArrowUp') {
  252. selectedModelIdx = Math.max(selectedModelIdx - 1, 0);
  253. } else {
  254. // if the user types something, reset to the top selection.
  255. selectedModelIdx = 0;
  256. }
  257. const item = document.querySelector(`[data-arrow-selected="true"]`);
  258. item?.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'instant' });
  259. }}
  260. />
  261. </div>
  262. <hr class="border-gray-100 dark:border-gray-850" />
  263. {/if}
  264. <div class="px-3 my-2 max-h-64 overflow-y-auto scrollbar-hidden group">
  265. {#each filteredItems as item, index}
  266. <button
  267. aria-label="model-item"
  268. class="flex w-full text-left font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg cursor-pointer data-highlighted:bg-muted {index ===
  269. selectedModelIdx
  270. ? 'bg-gray-100 dark:bg-gray-800 group-hover:bg-transparent'
  271. : ''}"
  272. data-arrow-selected={index === selectedModelIdx}
  273. on:click={() => {
  274. value = item.value;
  275. selectedModelIdx = index;
  276. show = false;
  277. }}
  278. >
  279. <div class="flex flex-col">
  280. {#if $mobile && (item?.model?.info?.meta?.tags ?? []).length > 0}
  281. <div class="flex gap-0.5 self-start h-full mb-1.5 -translate-x-1">
  282. {#each item.model?.info?.meta.tags as tag}
  283. <div
  284. class=" text-xs font-bold px-1 rounded-sm uppercase line-clamp-1 bg-gray-500/20 text-gray-700 dark:text-gray-200"
  285. >
  286. {tag.name}
  287. </div>
  288. {/each}
  289. </div>
  290. {/if}
  291. <div class="flex items-center gap-2">
  292. <div class="flex items-center min-w-fit">
  293. <div class="line-clamp-1">
  294. <div class="flex items-center min-w-fit">
  295. <Tooltip
  296. content={$user?.role === 'admin' ? (item?.value ?? '') : ''}
  297. placement="top-start"
  298. >
  299. <img
  300. src={item.model?.info?.meta?.profile_image_url ?? '/static/favicon.png'}
  301. alt="Model"
  302. class="rounded-full size-5 flex items-center mr-2"
  303. />
  304. {item.label}
  305. </Tooltip>
  306. </div>
  307. </div>
  308. {#if item.model.owned_by === 'ollama' && (item.model.ollama?.details?.parameter_size ?? '') !== ''}
  309. <div class="flex ml-1 items-center translate-y-[0.5px]">
  310. <Tooltip
  311. content={`${
  312. item.model.ollama?.details?.quantization_level
  313. ? item.model.ollama?.details?.quantization_level + ' '
  314. : ''
  315. }${
  316. item.model.ollama?.size
  317. ? `(${(item.model.ollama?.size / 1024 ** 3).toFixed(1)}GB)`
  318. : ''
  319. }`}
  320. className="self-end"
  321. >
  322. <span
  323. class=" text-xs font-medium text-gray-600 dark:text-gray-400 line-clamp-1"
  324. >{item.model.ollama?.details?.parameter_size ?? ''}</span
  325. >
  326. </Tooltip>
  327. </div>
  328. {/if}
  329. </div>
  330. <!-- {JSON.stringify(item.info)} -->
  331. {#if item.model?.direct}
  332. <Tooltip content={`${'Direct'}`}>
  333. <div class="translate-y-[1px]">
  334. <svg
  335. xmlns="http://www.w3.org/2000/svg"
  336. viewBox="0 0 16 16"
  337. fill="currentColor"
  338. class="size-3"
  339. >
  340. <path
  341. fill-rule="evenodd"
  342. d="M2 2.75A.75.75 0 0 1 2.75 2C8.963 2 14 7.037 14 13.25a.75.75 0 0 1-1.5 0c0-5.385-4.365-9.75-9.75-9.75A.75.75 0 0 1 2 2.75Zm0 4.5a.75.75 0 0 1 .75-.75 6.75 6.75 0 0 1 6.75 6.75.75.75 0 0 1-1.5 0C8 10.35 5.65 8 2.75 8A.75.75 0 0 1 2 7.25ZM3.5 11a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3Z"
  343. clip-rule="evenodd"
  344. />
  345. </svg>
  346. </div>
  347. </Tooltip>
  348. {:else if item.model.owned_by === 'openai'}
  349. <Tooltip content={`${'External'}`}>
  350. <div class="translate-y-[1px]">
  351. <svg
  352. xmlns="http://www.w3.org/2000/svg"
  353. viewBox="0 0 16 16"
  354. fill="currentColor"
  355. class="size-3"
  356. >
  357. <path
  358. fill-rule="evenodd"
  359. d="M8.914 6.025a.75.75 0 0 1 1.06 0 3.5 3.5 0 0 1 0 4.95l-2 2a3.5 3.5 0 0 1-5.396-4.402.75.75 0 0 1 1.251.827 2 2 0 0 0 3.085 2.514l2-2a2 2 0 0 0 0-2.828.75.75 0 0 1 0-1.06Z"
  360. clip-rule="evenodd"
  361. />
  362. <path
  363. fill-rule="evenodd"
  364. d="M7.086 9.975a.75.75 0 0 1-1.06 0 3.5 3.5 0 0 1 0-4.95l2-2a3.5 3.5 0 0 1 5.396 4.402.75.75 0 0 1-1.251-.827 2 2 0 0 0-3.085-2.514l-2 2a2 2 0 0 0 0 2.828.75.75 0 0 1 0 1.06Z"
  365. clip-rule="evenodd"
  366. />
  367. </svg>
  368. </div>
  369. </Tooltip>
  370. {/if}
  371. {#if item.model?.info?.meta?.description}
  372. <Tooltip
  373. content={`${marked.parse(
  374. sanitizeResponseContent(item.model?.info?.meta?.description).replaceAll(
  375. '\n',
  376. '<br>'
  377. )
  378. )}`}
  379. >
  380. <div class=" translate-y-[1px]">
  381. <svg
  382. xmlns="http://www.w3.org/2000/svg"
  383. fill="none"
  384. viewBox="0 0 24 24"
  385. stroke-width="1.5"
  386. stroke="currentColor"
  387. class="w-4 h-4"
  388. >
  389. <path
  390. stroke-linecap="round"
  391. stroke-linejoin="round"
  392. d="m11.25 11.25.041-.02a.75.75 0 0 1 1.063.852l-.708 2.836a.75.75 0 0 0 1.063.853l.041-.021M21 12a9 9 0 1 1-18 0 9 9 0 0 1 18 0Zm-9-3.75h.008v.008H12V8.25Z"
  393. />
  394. </svg>
  395. </div>
  396. </Tooltip>
  397. {/if}
  398. {#if !$mobile && (item?.model?.info?.meta?.tags ?? []).length > 0}
  399. <div class="flex gap-0.5 self-center items-center h-full translate-y-[0.5px]">
  400. {#each item.model?.info?.meta.tags as tag}
  401. <Tooltip content={tag.name}>
  402. <div
  403. class=" text-xs font-bold px-1 rounded-sm uppercase line-clamp-1 bg-gray-500/20 text-gray-700 dark:text-gray-200"
  404. >
  405. {tag.name}
  406. </div>
  407. </Tooltip>
  408. {/each}
  409. </div>
  410. {/if}
  411. </div>
  412. </div>
  413. {#if value === item.value}
  414. <div class="ml-auto pl-2 pr-2 md:pr-0">
  415. <Check />
  416. </div>
  417. {/if}
  418. </button>
  419. {:else}
  420. <div>
  421. <div class="block px-3 py-2 text-sm text-gray-700 dark:text-gray-100">
  422. {$i18n.t('No results found')}
  423. </div>
  424. </div>
  425. {/each}
  426. {#if !(searchValue.trim() in $MODEL_DOWNLOAD_POOL) && searchValue && ollamaVersion && $user.role === 'admin'}
  427. <Tooltip
  428. content={$i18n.t(`Pull "{{searchValue}}" from Ollama.com`, {
  429. searchValue: searchValue
  430. })}
  431. placement="top-start"
  432. >
  433. <button
  434. class="flex w-full font-medium line-clamp-1 select-none items-center rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg cursor-pointer data-highlighted:bg-muted"
  435. on:click={() => {
  436. pullModelHandler();
  437. }}
  438. >
  439. <div class=" truncate">
  440. {$i18n.t(`Pull "{{searchValue}}" from Ollama.com`, { searchValue: searchValue })}
  441. </div>
  442. </button>
  443. </Tooltip>
  444. {/if}
  445. {#each Object.keys($MODEL_DOWNLOAD_POOL) as model}
  446. <div
  447. class="flex w-full justify-between font-medium select-none rounded-button py-2 pl-3 pr-1.5 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 rounded-lg cursor-pointer data-highlighted:bg-muted"
  448. >
  449. <div class="flex">
  450. <div class="-ml-2 mr-2.5 translate-y-0.5">
  451. <svg
  452. class="size-4"
  453. viewBox="0 0 24 24"
  454. fill="currentColor"
  455. xmlns="http://www.w3.org/2000/svg"
  456. ><style>
  457. .spinner_ajPY {
  458. transform-origin: center;
  459. animation: spinner_AtaB 0.75s infinite linear;
  460. }
  461. @keyframes spinner_AtaB {
  462. 100% {
  463. transform: rotate(360deg);
  464. }
  465. }
  466. </style><path
  467. d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"
  468. opacity=".25"
  469. /><path
  470. d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
  471. class="spinner_ajPY"
  472. /></svg
  473. >
  474. </div>
  475. <div class="flex flex-col self-start">
  476. <div class="flex gap-1">
  477. <div class="line-clamp-1">
  478. Downloading "{model}"
  479. </div>
  480. <div class="shrink-0">
  481. {'pullProgress' in $MODEL_DOWNLOAD_POOL[model]
  482. ? `(${$MODEL_DOWNLOAD_POOL[model].pullProgress}%)`
  483. : ''}
  484. </div>
  485. </div>
  486. {#if 'digest' in $MODEL_DOWNLOAD_POOL[model] && $MODEL_DOWNLOAD_POOL[model].digest}
  487. <div class="-mt-1 h-fit text-[0.7rem] dark:text-gray-500 line-clamp-1">
  488. {$MODEL_DOWNLOAD_POOL[model].digest}
  489. </div>
  490. {/if}
  491. </div>
  492. </div>
  493. <div class="mr-2 ml-1 translate-y-0.5">
  494. <Tooltip content={$i18n.t('Cancel')}>
  495. <button
  496. class="text-gray-800 dark:text-gray-100"
  497. on:click={() => {
  498. cancelModelPullHandler(model);
  499. }}
  500. >
  501. <svg
  502. class="w-4 h-4 text-gray-800 dark:text-white"
  503. aria-hidden="true"
  504. xmlns="http://www.w3.org/2000/svg"
  505. width="24"
  506. height="24"
  507. fill="currentColor"
  508. viewBox="0 0 24 24"
  509. >
  510. <path
  511. stroke="currentColor"
  512. stroke-linecap="round"
  513. stroke-linejoin="round"
  514. stroke-width="2"
  515. d="M6 18 17.94 6M18 18 6.06 6"
  516. />
  517. </svg>
  518. </button>
  519. </Tooltip>
  520. </div>
  521. </div>
  522. {/each}
  523. </div>
  524. {#if showTemporaryChatControl}
  525. <hr class="border-gray-100 dark:border-gray-850" />
  526. <div class="flex items-center mx-2 my-2">
  527. <button
  528. class="flex justify-between w-full font-medium line-clamp-1 select-none items-center rounded-button py-2 px-3 text-sm text-gray-700 dark:text-gray-100 outline-hidden transition-all duration-75 hover:bg-gray-100 dark:hover:bg-gray-800 rounded-lg cursor-pointer data-highlighted:bg-muted"
  529. on:click={async () => {
  530. temporaryChatEnabled.set(!$temporaryChatEnabled);
  531. await goto('/');
  532. const newChatButton = document.getElementById('new-chat-button');
  533. setTimeout(() => {
  534. newChatButton?.click();
  535. }, 0);
  536. // add 'temporary-chat=true' to the URL
  537. if ($temporaryChatEnabled) {
  538. history.replaceState(null, '', '?temporary-chat=true');
  539. } else {
  540. history.replaceState(null, '', location.pathname);
  541. }
  542. show = false;
  543. }}
  544. >
  545. <div class="flex gap-2.5 items-center">
  546. <ChatBubbleOval className="size-4" strokeWidth="2.5" />
  547. {$i18n.t(`Temporary Chat`)}
  548. </div>
  549. <div>
  550. <Switch state={$temporaryChatEnabled} />
  551. </div>
  552. </button>
  553. </div>
  554. {/if}
  555. <div class="hidden w-[42rem]" />
  556. <div class="hidden w-[32rem]" />
  557. </slot>
  558. </DropdownMenu.Content>
  559. </DropdownMenu.Root>