{status === 'running' ? 'Running' : status === 'stalled' ? 'Stalled' : 'Done'} {model} {fmtTokens(tokens)} tok {fmtCost(costUsd)}
{#each messages as msg, idx (msg.id)} {@const isFirst = idx === 0} {@const isLast = idx === messages.length - 1}
{#if msg.role === 'user'}
{msg.content}
{:else if msg.role === 'assistant'}
{#if !isFirst}
{/if}
{#if !isLast}
{/if}
{msg.content}
{:else if msg.role === 'tool-call'}
{#if !isFirst}
{/if}
{#if !isLast}
{/if}
{msg.toolName ?? 'Tool'} {#if msg.toolPath} {msg.toolPath} {/if}
input {msg.content}
{#if !expandedTools.has(msg.id)}
{/if}
{#if expandedTools.has(msg.id)} {/if}
{:else if msg.role === 'tool-result'}
{#if !isFirst}
{/if}
{#if !isLast}
{/if}
result {msg.content}
{/if}
{/each}
(promptText = v)} />