diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index 868a51404..a51416838 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -243,7 +243,7 @@ placeholder={searchPlaceholder} autocomplete="off" on:keydown={(e) => { - if (e.code === 'Enter') { + if (e.code === 'Enter' && filteredItems.length > 0) { value = filteredItems[selectedModelIdx].value; show = false; return; // dont need to scroll on selection