"docs/vscode:/vscode.git/clone" did not exist on "b9c55f0c4face89685841432b6858a67b9d1b851"
Commit cddbeb02 authored by Timothy J. Baek's avatar Timothy J. Baek
Browse files

feat: model selector tag search

parent eca20b1b
...@@ -42,10 +42,14 @@ ...@@ -42,10 +42,14 @@
let searchValue = ''; let searchValue = '';
let ollamaVersion = null; let ollamaVersion = null;
$: filteredItems = items.filter((item) => $: filteredItems = items.filter(
searchValue (item) =>
? item.value.toLowerCase().includes(searchValue.toLowerCase()) (searchValue
: true && !(item.model?.info?.meta?.hidden ?? false) ? item.value.toLowerCase().includes(searchValue.toLowerCase()) ||
(item.model?.info?.meta?.tags ?? []).some((tag) =>
tag.name.toLowerCase().includes(searchValue.toLowerCase())
)
: true) && !(item.model?.info?.meta?.hidden ?? false)
); );
const pullModelHandler = async () => { const pullModelHandler = async () => {
...@@ -324,10 +328,22 @@ ...@@ -324,10 +328,22 @@
</div> </div>
</Tooltip> </Tooltip>
{/if} {/if}
{#if (item?.model?.info?.meta?.tags ?? []).length > 0}
<div class="flex gap-0.5 self-center items-center h-full translate-y-[0.5px]">
{#each item.model?.info?.meta.tags as tag}
<div
class=" text-xs font-black px-1 rounded uppercase line-clamp-1 bg-gray-500/20 text-gray-700 dark:text-gray-200"
>
{tag.name}
</div>
{/each}
</div>
{/if}
</div> </div>
{#if value === item.value} {#if value === item.value}
<div class="ml-auto"> <div class="ml-auto pl-2">
<Check /> <Check />
</div> </div>
{/if} {/if}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment