assistantDisplayText function
Row label for a message with no visible text or reasoning.
Ported from TS summarizeAssistantActivity: tool-call-only rows label
themselves, then image-only rows; text/thinking content labels nothing
(the preview carries it).
Implementation
String assistantDisplayText(List<ContentBlock> content) {
if (textOfBlocks(content).isNotEmpty ||
thinkingOfBlocks(content).isNotEmpty) {
return '';
}
final tools = content.whereType<ToolCall>().toList();
if (tools.isNotEmpty) return 'Tool call only';
final images = content.whereType<ImageContent>().length;
if (images > 0) return 'Images ×$images';
return '';
}