feat: external model icon

This commit is contained in:
Timothy J. Baek 2024-03-24 23:26:00 -07:00
parent 302bd11b33
commit c6f9e74477
2 changed files with 22 additions and 2 deletions

View file

@ -45,7 +45,8 @@
.map((model) => ({
value: model.id,
label:
model.name + `${model.size ? ` (${(model.size / 1024 ** 3).toFixed(1)}GB)` : ''}`
model.name + `${model.size ? ` (${(model.size / 1024 ** 3).toFixed(1)}GB)` : ''}`,
info: model
}))}
bind:value={selectedModel}
/>

View file

@ -219,7 +219,26 @@
value={item.value}
label={item.label}
>
<div class="flex items-center gap-2">
<div class="line-clamp-1">
{item.label}
</div>
{#if item.info.external}
<div class=" mr-2">
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 16 16"
fill="currentColor"
class="w-4 h-4"
>
<path
d="M1 9.5A3.5 3.5 0 0 0 4.5 13H12a3 3 0 0 0 .917-5.857 2.503 2.503 0 0 0-3.198-3.019 3.5 3.5 0 0 0-6.628 2.171A3.5 3.5 0 0 0 1 9.5Z"
/>
</svg>
</div>
{/if}
</div>
{#if value === item.value}
<div class="ml-auto">