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 class="relative inline-flex rounded-full size-2 bg-yellow-500" />
</span> </span>
</div> </div>
<div class=" translate-y-[0.5px] line-clamp-1"> <div class=" translate-y-[0.5px] text-ellipsis line-clamp-1 flex">
{selectedToolIds {#each selectedToolIds.map((id) => {
.map((id) => { return $tools ? $tools.find((t) => t.id === id) : { id: id, name: id };
return $tools ? $tools.find((tool) => tool.id === id)?.name : id; }) as tool, toolIdx (toolIdx)}
}) <Tooltip
.join(', ')} 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> </div>
</div> </div>