(event.preventDefault(), send())} use:fileDrops > {#if menu.length}
{#each menu as command, index (command.slash_name)}
event.preventDefault()} onclick={() => complete(command)} onpointerenter={() => (highlighted = index)} >
{commandLabel(command)}
{command.description}
{/each}
{/if} {#if hovered && images.has(hovered.n)}
clearTimeout(hoverTimer)} onpointerleave={scheduleHideHover} >
#{hovered.n}
remove(hovered!.n)} >
{/if} {#if attachmentCount}
{attachmentCount} {attachmentCount === 1 ? 'attachment' : 'attachments'}
MAX_BYTES} >{formatSize(attachmentBytes)} / {formatSize(MAX_BYTES)}
{/if} {#if markedFiles.length}
{#each markedFiles as n, index (n)} {@const file = files.get(n)!} {@const name = filenameParts(file.name)}
#{index + 1}
{name.stem}
{name.extension}
{formatSize(file.size)}
removeFile(n)} >
{/each}
{/if} {#if feedback}
0} role="status" >{feedback}
{/if}
0} contenteditable={locked ? 'false' : 'true'} role="textbox" aria-multiline="true" aria-label="message" aria-disabled={!!locked} data-placeholder={locked || placeholder} spellcheck="true" tabindex="0" oninput={onInput} onfocus={() => completing && oncommands?.()} onkeydown={keydown} onpaste={paste} >
{ const input = event.currentTarget; attach(input.files ?? []).then(() => (input.value = '')); }} />
picker?.click()} >
{#if tools}
{@render tools()}
{/if} {#if onpopout}
0} title={attachmentCount ? 'move text into a note; attachments stay in this chat' : 'pop out into a note on the canvas'} onclick={() => { const destination = draft; collectAttachments(destination.text, images, files); const moved = splitForNote(destination.text, images); onpopout(moved.note); setText(moved.text, false, destination); }} >
{/if} {#if busy && onstop}
{/if}
0} disabled={!ready || reading > 0 || !!held} aria-label={attached ? `Send with ${notes}` : 'Send'} title={attached ? `send with ${notes} (Enter)` : 'Send (Enter)'} > {#if attached}
{attached}
{/if}