From db9977926cc917eb15bc8127cadd67d6f64a1363 Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Mon, 29 Jun 2026 12:43:32 -0500 Subject: [PATCH] refac --- .../components/chat/ToolServersModal.svelte | 69 +++++++++++++++---- 1 file changed, 54 insertions(+), 15 deletions(-) diff --git a/src/lib/components/chat/ToolServersModal.svelte b/src/lib/components/chat/ToolServersModal.svelte index 71f83f64f3..269a84761d 100644 --- a/src/lib/components/chat/ToolServersModal.svelte +++ b/src/lib/components/chat/ToolServersModal.svelte @@ -1,13 +1,8 @@ @@ -46,22 +60,47 @@
{#each selectedTools as tool} - -
-
- {tool?.name} + {@const status = authStatus(tool)} + {@const toolSpecs = tool?.specs ?? []} + 0} + disabled={toolSpecs.length === 0} + > +
+
+ +
+ {tool?.name} +
{#if tool?.meta?.description} -
+
{tool?.meta?.description}
{/if}
- +
+ {$i18n.t('Enabled')} + {status.label} + {#if toolSpecs.length > 0} + + {$i18n.t('{{COUNT}} tools', { COUNT: toolSpecs.length })} + + {/if} +
+ +
+ {#if toolSpecs.length > 0} + {#each toolSpecs as toolSpec} +
+ {toolSpec?.name ?? toolSpec?.function?.name} +
+ {/each} + {/if} +
{/each}