{#if showingRecents && filteredRecents.length > 0}
{$t('search.recentChats')}
{#each filteredRecents as chat, i (chat.id)} {/each} {:else if showingRecents}
{$t('search.noRecentChats')}
{:else if !showingRecents} {#if displayedChats.length > 0}
{$t('search.chats')}
{#each displayedChats as chat, i (chat.id)} {@const idx = i} {/each} {/if} {#if fileResults.length > 0}
{$t('search.files')}
{#each fileResults as file, i (file.path)} {@const idx = displayedChats.length + i} {/each} {/if} {#if loading}
{:else if query && totalResults === 0}
{$t('search.noResults')}
{/if} {/if}