{#if loginModalOpen} { loginModalOpen = false; }} /> {/if}
{#if $page.data?.assistant && !!messages.length} {#if $page.data?.assistant.avatar} Avatar {:else}
{$page.data?.assistant.name[0]}
{/if} {$page.data.assistant.name}
{:else if preprompt && preprompt != currentModel.preprompt} {/if} {#if messages.length > 0}
{:else if pending} {:else if !assistant} { if ($page.data.loginRequired) { ev.preventDefault(); loginModalOpen = true; } else { dispatch("message", ev.detail); } }} /> {:else} { if ($page.data.loginRequired) { ev.preventDefault(); loginModalOpen = true; } else { dispatch("message", ev.detail); } }} /> {/if}
{#if sources.length}
{#each sources as source, index} {#await source then src}
input content
{/await} {/each}
{/if}
{#if $page.data.settings?.searchEnabled && !assistant} {/if} {#if loading} dispatch("stop")} /> {:else if lastIsError} { if (lastMessage && lastMessage.ancestors) { dispatch("retry", { id: lastMessage.id, }); } }} /> {:else}
{#if currentModel.multimodal} {/if} {#if messages && lastMessage && lastMessage.interrupted && !isReadOnly} { if (lastMessage && lastMessage.ancestors) { dispatch("continue", { id: lastMessage?.id, }); } }} /> {/if}
{/if}
{#if onDrag && currentModel.multimodal} {:else}
{#if lastIsError} {:else} { if ($page.data.loginRequired) { ev.preventDefault(); loginModalOpen = true; } }} maxRows={6} disabled={isReadOnly || lastIsError} /> {/if} {#if loading} {:else} {/if}
{/if}

Model: {#if !assistant} {currentModel.displayName}{:else} {@const model = models.find((m) => m.id === assistant?.modelId)} {model?.displayName}{/if} ยท
Generated content may be inaccurate or false.

{#if messages.length} {/if}