{#if autoScroll === false && history?.currentId}
{/if}
{#if atSelectedModel !== undefined}
model profile model.id === atSelectedModel.id)?.info?.meta ?.profile_image_url ?? ($i18n.language === 'dg-DG' ? `/doge.png` : `${WEBUI_BASE_URL}/static/favicon.png`)} />
Talking to {atSelectedModel.name}
{/if} { const data = e.detail; if (data?.type === 'model') { atSelectedModel = data.data; } chatTextAreaElement?.focus(); }} />
{ if (inputFiles && inputFiles.length > 0) { const _inputFiles = Array.from(inputFiles); inputFilesHandler(_inputFiles); } else { toast.error($i18n.t(`File not found.`)); } filesInputElement.value = ''; }} /> {#if recording} { recording = false; await tick(); document.getElementById('chat-textarea')?.focus(); }} on:confirm={async (e) => { const response = e.detail; prompt = `${prompt}${response} `; recording = false; await tick(); document.getElementById('chat-textarea')?.focus(); if ($settings?.speechAutoSend ?? false) { submitPrompt(prompt); } }} /> {:else}
{ // check if selectedModels support image input submitPrompt(prompt); }} >
{#if files.length > 0}
{#each files as file, fileIdx} {#if file.type === 'image'}
input {#if atSelectedModel ? visionCapableModels.length === 0 : selectedModels.length !== visionCapableModels.length} !visionCapableModels.includes(id)) .join(', ') })} > {/if}
{:else} { files.splice(fileIdx, 1); files = files; }} /> {/if} {/each}
{/if}
{ if (availableToolIds.includes(e.id) || ($_user?.role ?? 'user') === 'admin') { a[e.id] = { name: e.name, description: e.meta.description, enabled: false }; } return a; }, {})} uploadFilesHandler={() => { filesInputElement.click(); }} onClose={async () => { await tick(); chatTextAreaElement?.focus(); }} >