enh: show tool description on hover

This commit is contained in:
Timothy Jaeryang Baek 2024-11-19 17:10:43 -08:00
parent 9d9a60afec
commit 00e41790bf

View File

@ -321,12 +321,22 @@
<span class="relative inline-flex rounded-full size-2 bg-yellow-500" />
</span>
</div>
<div class=" translate-y-[0.5px] line-clamp-1">
{selectedToolIds
.map((id) => {
return $tools ? $tools.find((tool) => tool.id === id)?.name : id;
})
.join(', ')}
<div class=" translate-y-[0.5px] text-ellipsis line-clamp-1 flex">
{#each selectedToolIds.map((id) => {
return $tools ? $tools.find((t) => t.id === id) : { id: id, name: id };
}) as tool, toolIdx (toolIdx)}
<Tooltip
content={tool?.meta?.description ?? ''}
className=" {toolIdx !== 0 ? 'pl-0.5' : ''} flex-shrink-0"
placement="top"
>
{tool.name}
</Tooltip>
{#if toolIdx !== selectedToolIds.length - 1}
<span>, </span>
{/if}
{/each}
</div>
</div>
</div>