{#key message.id}
{#if message.model in modelfiles} {modelfiles[message.model]?.title} {:else} {message.model ? ` ${message.model}` : ''} {/if} {#if message.timestamp}
{dayjs(message.timestamp * 1000).format('DD/MM/YYYY HH:mm')}
{/if}
{#if message.content === ''}
{:else} {#if message.files}
{#each message.files as file}
{#if file.type === 'image'}
{/if}
{/each}
{/if}
{#if edit === true}
{ e.target.style.height = ''; e.target.style.height = `${e.target.scrollHeight}px`; }} />
{ editMessageConfirmHandler(); }} > Save
{ cancelEditMessage(); }} > Cancel
{:else}
{#if message?.error === true}
{message.content}
{:else} {#each tokens as token} {#if token.type === 'code'}
{:else} {@html marked.parse(token.raw, { ...defaults, gfm: true, breaks: true, renderer })} {/if} {/each} {/if} {#if message.done}
{#if siblings.length > 1}
{ showPreviousMessage(message); }} >
{siblings.indexOf(message.id) + 1} / {siblings.length}
{ showNextMessage(message); }} >
{/if}
{ editMessageHandler(); }} >
{ copyToClipboard(message.content); }} >
{ rateMessage(message.id, 1); }} >
{ rateMessage(message.id, -1); }} >
{ if (!loadingSpeech) { toggleSpeakMessage(message); } }} > {#if loadingSpeech}
{:else if speaking}
{:else}
{/if}
{#if $config.images}
{ if (!generatingImage) { generateImage(message); } }} > {#if generatingImage}
{:else}
{/if}
{/if} {#if message.info}
{ console.log(message); }} id="info-{message.id}" >
{/if} {#if isLastMessage}
{ continueGeneration(); }} >
{/if}
{/if}
{/if}
{/if}
{/key}