(isTapped = !isTapped)}
on:keydown={() => (isTapped = !isTapped)}
>
{#if $page.data?.assistant?.avatar}
{#if message.files?.length}
{#each message.files as file}
{/each}
{/if}
{#if searchUpdates && searchUpdates.length > 0}
{/if}
{#if toolUpdates}
{#each Object.values(toolUpdates) as tool}
{#if tool.length}
{#key tool[0].uuid}
{/key}
{/if}
{/each}
{/if}
{#if isLast && loading && $settings.disableStream}
{/if}
{#each tokens as token}
{#if token.type === "code"}
{:else}
{#await marked.parse(token.raw, options) then parsed}
{@html DOMPurify.sanitize(parsed)}
{/await}
{/if}
{/each}
{#if webSearchSources?.length}
Sources:
{#each webSearchSources as { link, title }}
{new URL(link).hostname.replace(/^www\./, "")}
{/each}
{/if}