From 133f223df6541716d4f1b86c1dd1c3a48b6829c5 Mon Sep 17 00:00:00 2001 From: Aryan Kothari <87589047+thearyadev@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:47:17 -0400 Subject: [PATCH] feat: enter selects first model in list --- src/lib/components/chat/ModelSelector/Selector.svelte | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index ee0c25d98..60a8b1668 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -238,6 +238,13 @@ class="w-full text-sm bg-transparent outline-none" placeholder={searchPlaceholder} autocomplete="off" + on:keydown={(e) => { + if (e.code === 'Enter' && filteredItems.length > 0) { + value = filteredItems[0].value; + show = false; + } + }} + />