{#if $user?.role === 'admin'}
{/if}
{#if !($settings.saveChatHistory ?? true)}
Chat History is off for this browser.
When history is turned off, new chats on this browser won't appear in your history on any of your devices. This setting does not sync across browsers or devices.
{/if}
{#if $tags.length > 0}
{#each $tags as tag} {/each}
{/if}
{#each $chats.filter((chat) => { if (search === '') { return true; } else { let title = chat.title.toLowerCase(); const query = search.toLowerCase(); if (title.includes(query)) { return true; } else { return false; } } }) as chat, i}
{#if chat.id === $chatId}
{#if chatTitleEditId === chat.id}
{:else if chatDeleteId === chat.id}
{:else}
{/if}
{/if}
{/each}

{#if $user !== undefined} {#if showDropdown} {/if} {:else} {/if}