enh: show model hash and modified ts

This commit is contained in:
Timothy J. Baek 2024-09-21 22:12:41 +02:00
parent 5f15e9ee68
commit 8dbac0f7e3
1 changed files with 17 additions and 3 deletions

View File

@ -1,4 +1,6 @@
<script lang="ts">
import { marked } from 'marked';
import { toast } from 'svelte-sonner';
import Sortable from 'sortablejs';
@ -388,10 +390,22 @@
<div
class=" flex-1 self-center {(model?.info?.meta?.hidden ?? false) ? 'text-gray-500' : ''}"
>
<Tooltip
content={marked.parse(
model?.ollama?.digest
? `${model?.ollama?.digest} *(${model?.ollama?.modified_at})*`
: ''
)}
className=" w-fit"
placement="top-start"
>
<div class=" font-semibold line-clamp-1">{model.name}</div>
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1">
{!!model?.info?.meta?.description ? model?.info?.meta?.description : model.id}
</Tooltip>
<div class=" text-xs overflow-hidden text-ellipsis line-clamp-1 text-gray-500">
{!!model?.info?.meta?.description
? model?.info?.meta?.description
: (model?.ollama?.digest ?? model.id)}
</div>
</div>
</a>