{ if (state === false) { onClose(); } }} >
{#if tab === ''}
{#if tools} {#if Object.keys(tools).length > 0} {/if} {#if skills && Object.keys(skills).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}
{/each} {/if} {#if showWebSearchButton} {/if} {#if showImageGenerationButton} {/if} {#if showCodeInterpreterButton} {/if}
{:else if tab === 'tools' && tools}
{#if toolIds.length === 0}
{$i18n.t('No tools found')}
{:else}
{#each toolIds as toolId}
{/if} {#if tools?.[toolId]?.has_user_valves && ($user?.role === 'admin' || ($user?.permissions?.chat?.valves ?? true))}
{/if}
{/each}
{/if}
{:else if tab === 'skills' && skills}
{#if skillIds.length === 0}
{$i18n.t('No skills found')}
{:else}
{#each skillIds as skillId} {/each}
{/if}
{/if}