viewerRowText function
Plain text of one transcript row as a viewer renders it (styles are applied by the caller; dimming and bolding are presentation).
Implementation
String viewerRowText(AttachedMessage row) => switch (row.role) {
AttachedMessageRole.user => 'user: ${row.text}',
AttachedMessageRole.assistant => row.text,
AttachedMessageRole.tool => '[tool] ${row.toolName ?? ''}',
AttachedMessageRole.system => row.text,
};