From f9587032dec2708905dd3e95b7fbc212153f593f Mon Sep 17 00:00:00 2001 From: Jun Siang Cheah Date: Sat, 18 May 2024 19:59:29 +0800 Subject: [PATCH] fix: case insensitive model search --- src/lib/components/chat/ModelSelector/Selector.svelte | 2 +- src/lib/components/common/Selector.svelte | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib/components/chat/ModelSelector/Selector.svelte b/src/lib/components/chat/ModelSelector/Selector.svelte index 596344598..cd128e651 100644 --- a/src/lib/components/chat/ModelSelector/Selector.svelte +++ b/src/lib/components/chat/ModelSelector/Selector.svelte @@ -36,7 +36,7 @@ let ollamaVersion = null; $: filteredItems = searchValue - ? items.filter((item) => item.value.includes(searchValue.toLowerCase())) + ? items.filter((item) => item.value.toLowerCase().includes(searchValue.toLowerCase())) : items; const pullModelHandler = async () => { diff --git a/src/lib/components/common/Selector.svelte b/src/lib/components/common/Selector.svelte index 9a56f30bb..00cc2da07 100644 --- a/src/lib/components/common/Selector.svelte +++ b/src/lib/components/common/Selector.svelte @@ -26,7 +26,7 @@ let searchValue = ''; $: filteredItems = searchValue - ? items.filter((item) => item.value.includes(searchValue.toLowerCase())) + ? items.filter((item) => item.value.toLowerCase().includes(searchValue.toLowerCase())) : items;