(hot = null)} role="presentation">
{#if transcript.loading}
{:else if transcript.error}
(。•︿•。) couldn't read the transcript: {transcript.error}
{:else if transcript.groups.length === 0}
(˶ᵔ ᵕ ᵔ˶) nothing here yet. say hi below
{:else if transcript.more}
earlier messages load as you scroll up
{/if}
{#each transcript.groups as group (group.key)}
{#if group.kind === 'user'}
{@const unseen = group.state === 'sending' || group.state === 'sent'}
{#if group.from || group.gap}
{group.from ?? 'you'} {#if group.gap}{' · '}{group.gap} {/if}
{/if}
{#if group.images.length}
{#each group.images as picture, index (index)}
{/each}
{/if}
{#if group.text.trim()}
{#each pieces(group.text) as piece, index (index)}{#if piece.kind === 'quote'}
{piece.text} {:else if piece.kind === 'code'}
{piece.text} {:else}
{piece.text}
{/if}{/each}
{/if}
{#if group.at || group.skill || (transcript.receipt === group.key && group.state !== 'failed')}
{/if}
{#if group.state === 'failed'}
not sent: {group.error}
transcript.retry(group.key.slice('pending:'.length))}>retry
transcript.discard(group.key.slice('pending:'.length))}>discard
{/if}
{:else if group.kind === 'assistant'}
{#if group.plate}albedo {/if}
{:else if group.kind === 'shell'}
openShellCommand(group.command.id)} openLabel={inline ? 'Open command output' : 'Open command on canvas'} />
{:else if group.kind === 'work'}
step.kind === 'progress' || step.key.startsWith('live:') || (step.kind === 'tool' && !step.done)))} {transcript} session={view} onreview={(turnId, from, path) => review(group.key, turnId, from, path)} onartifact={openArtifact} />
{:else if group.kind === 'end'}
{@const metaText = [group.elapsedMs >= 1000 ? formatElapsed(group.elapsedMs) : '', group.tools ? `${group.tools} ${group.tools === 1 ? 'tool' : 'tools'}` : ''].filter(Boolean).join(' · ')}
{@const hasReview = !!(group.changed.files && group.turnId)}
{face(group.mood, group.seed)}
{#if metaText}
{metaText}
{/if}
{#if hasReview}
review(group.key, group.turnId!, group.from)}>
review {group.changed.files} {group.changed.files === 1 ? 'file' : 'files'}
{#if group.changed.added || group.changed.removed}+{group.changed.added} −{group.changed.removed} {/if}
{/if}
{#if group.seed}
{metaText && !hasReview ? `· ${stamp(group.seed)}` : stamp(group.seed)}
{/if}
{#if group.turnId && group.tools && !inline}
boards.board?.openTrace(sessionId, group.from, windowId)}>
{/if}
{#if group.text}
copy(group.key, group.text)}>
{#if copied === group.key}
{:else}
{/if}
{/if}
{:else if group.kind === 'note'}
{@const text = group.text.trim()}
{#if folds(text)}
{firstSentence(text)}
{text}
{:else}
{text}
{/if}
{:else if group.kind === 'failure'}
{@const open = unfolded === group.key}
(unfolded = open ? null : group.key)}>
(。•︿•。)
this turn failed: {group.text}{#if open && group.detail !== group.text}{group.detail}{/if}
{:else if group.kind === 'compaction'}
{'(>_<)'} earlier context was compacted here
{/if}
{/each}
{#if (running || answering) && !(prefs.collapseTraces && last?.kind === 'work')}
{#if !transcript.streaming && activity}{activity} {/if}
{/if}