{ if (state === false) { onClose(); } }} >
{#if tab === ''}
{#if tools} {#if Object.keys(tools).length > 0} {/if} {:else}
{/if} {#if toggleFilters && toggleFilters.length > 0} {#each toggleFilters.sort( (a, b) => a.name.localeCompare( b.name, undefined, { sensitivity: 'base' } ) ) as filter, filterIdx (filter.id)}
{/if}
{ const state = e.detail; await tick(); }} />
{/each} {/if} {#if showWebSearchButton} {/if} {#if showImageGenerationButton} {/if} {#if showCodeInterpreterButton} {/if}
{:else if tab === 'tools' && tools}
{#each Object.keys(tools) as toolId} {@const isMcpServer = toolId.startsWith('server:mcp:')} {@const promptSelectable = isMcpServer && (tools[toolId]?.authenticated ?? true)}
{/if} {#if promptSelectable}
{/if}
{/each}
{/if}