{#each displayItems as displayItem (displayItem.id)} {#if displayItem.type === 'message'} {#if renderMarkdown}
{:else}
{displayItem.text}
{/if} {:else if displayItem.type === 'detail_group'}
{#each displayItem.tokens as detailToken, detailIndex} {#if detailToken.attributes?.type === 'tool_calls'} {:else if detailToken.text?.length > 0}
{:else} {/if} {/each}
{:else} {@const detailToken = displayItem.token} {#if detailToken.attributes?.type === 'tool_calls'} {:else if detailToken.text?.length > 0}
{:else} {/if} {/if} {/each}