{#if embeds && Array.isArray(embeds) && embeds.length > 0}
{#each embeds as embed, idx}
{/each}
{:else}
{#if open}
{#if isDone}
\`\`\`json
> ${formatJSONString(args)}
> ${formatJSONString(result)}
> \`\`\``}
/>
{:else}
\`\`\`json
> ${formatJSONString(args)}
> \`\`\``}
/>
{/if}
{/if}
{/if}
{#if isDone}
{#if typeof files === 'object'}
{#each files ?? [] as file, idx}
{#if typeof file === 'string'}
{#if file.startsWith('data:image/')}
{/if}
{:else if typeof file === 'object'}
{#if (file.type === 'image' || (file?.content_type ?? '').startsWith('image/')) && file.url}
{/if}
{/if}
{/each}
{/if}
{/if}