{ searchValue = ''; selectedModelIdx = 0; window.setTimeout(() => document.getElementById('model-search-input')?.focus(), 0); }} closeFocus={false} >
{#if selectedModel} {selectedModel.label} {:else} {placeholder} {/if}
{#if searchEnabled}
{ if (e.code === 'Enter' && filteredItems.length > 0) { value = filteredItems[selectedModelIdx].value; show = false; return; // dont need to scroll on selection } else if (e.code === 'ArrowDown') { selectedModelIdx = Math.min(selectedModelIdx + 1, filteredItems.length - 1); } else if (e.code === 'ArrowUp') { selectedModelIdx = Math.max(selectedModelIdx - 1, 0); } else { // if the user types something, reset to the top selection. selectedModelIdx = 0; } const item = document.querySelector(`[data-arrow-selected="true"]`); item?.scrollIntoView({ block: 'center', inline: 'nearest', behavior: 'instant' }); }} />

{/if}
{#each filteredItems as item, index} {:else}
{$i18n.t('No results found')}
{/each} {#if !(searchValue.trim() in $MODEL_DOWNLOAD_POOL) && searchValue && ollamaVersion && $user.role === 'admin'} {/if} {#each Object.keys($MODEL_DOWNLOAD_POOL) as model}
Downloading "{model}" {'pullProgress' in $MODEL_DOWNLOAD_POOL[model] ? `(${$MODEL_DOWNLOAD_POOL[model].pullProgress}%)` : ''}
{#if 'digest' in $MODEL_DOWNLOAD_POOL[model] && $MODEL_DOWNLOAD_POOL[model].digest}
{$MODEL_DOWNLOAD_POOL[model].digest}
{/if}
{/each}
{#if showTemporaryChatControl}
{/if}