{#if messages.length == 0 && suggestionPrompts.length !== 0}
{/if} {#if autoScroll === false && messages.length > 0}
{/if}
{ let reader = new FileReader(); reader.onload = (event) => { files = [ ...files, { type: 'image', url: `${event.target.result}` } ]; inputFiles = null; filesInputElement.value = ''; }; if ( inputFiles && inputFiles.length > 0 && ['image/gif', 'image/jpeg', 'image/png'].includes(inputFiles[0]['type']) ) { reader.readAsDataURL(inputFiles[0]); } else { toast.error(`Unsupported File Type '${inputFiles[0]['type']}'.`); inputFiles = null; } }} />
{ submitPrompt(prompt); }} > {#if files.length > 0}
{#each files as file, fileIdx}
input
{/each}
{/if}
{#if fileUploadEnabled}
{/if}