feat: show tool descriptions when picking tools for a model

The tool picker in the model editor listed only tool names, so there was no way to tell what a tool does or contains without leaving for the Tools workspace. Each entry now shows its description under the name, the same way the tool list in the chat does. The skill, filter, action and subagent model pickers share this dropdown and show their descriptions too.
This commit is contained in:
Classic298 2026-11-04 09:38:27 +01:00
parent b79a778c03
commit f0a54b5dc0

View file

@ -184,6 +184,11 @@
</div>
{:else}
{#each sortedItems as item (item.id)}
{@const itemDescription = resolveLocalizedResource(
item,
$i18n.language,
'description'
)}
<button
type="button"
class="flex min-h-7 w-full items-center justify-between gap-2 rounded-xl px-2 py-1 text-left text-xs hover:bg-gray-50 dark:hover:bg-gray-800 selected-command-option-button"
@ -193,9 +198,16 @@
selectItem(item);
}}
>
<span class="min-w-0 flex-1 truncate"
>{resolveLocalizedResource(item, $i18n.language)}</span
>
<span class="min-w-0 flex-1">
<span class="block truncate"
>{resolveLocalizedResource(item, $i18n.language)}</span
>
{#if itemDescription}
<span class="block truncate text-gray-500 dark:text-gray-400"
>{itemDescription}</span
>
{/if}
</span>
{#if item.is_global}<span class="text-[0.6875rem] text-gray-500"
>{$i18n.t('Global')}</span
>{/if}