{#if fileUpload.isDragging}
Drop the image here to upload
{/if}
{#if canUploadImgs}
{#snippet trigger(tooltip)}
{/snippet} Add image
{/if}
{ if (loading) conversations.stopGenerating(); else sendMessage(); }} type="button" class={[ "flex items-center justify-center gap-2 rounded-full px-3.5 py-2.5 text-sm font-medium text-white focus:ring-4 focus:ring-gray-300 focus:outline-hidden dark:focus:ring-gray-700", loading && "bg-red-900 hover:bg-red-800 dark:bg-red-600 dark:hover:bg-red-700", !loading && "bg-black hover:bg-gray-900 dark:bg-blue-600 dark:hover:bg-blue-700", ]} {...localToasts.trigger} > {#if loading}
{#if conversations.active.some(c => c.data.streaming)} Stop {:else} Cancel {/if}
{#each { length: 3 } as _, i}
{/each}
{:else} {multiple ? "Run all" : "Run"}
{cmdOrCtrl}
↵
{/if}
{#each fileUpload.selected as file}
{ fileToDataURL(file).then(src => previewImage(src)); }} >
{ e.stopPropagation(); fileUpload.remove(file); }} class="invisible absolute -top-1 -right-1 z-20 grid size-5 place-items-center rounded-full bg-gray-800 text-xs text-white group-hover/img:visible hover:bg-gray-700" > ✕
{/each}
{#each localToasts.toasts as toast (toast.id)}
{toast.data.content}
{/each}