mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-16 09:41:23 +00:00
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:
parent
b79a778c03
commit
f0a54b5dc0
1 changed files with 15 additions and 3 deletions
|
|
@ -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}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue