isTextBreaker static method
Check if a message is assistant text that should break a group.
Implementation
static bool isTextBreaker(RenderableMessage msg) {
if (msg.type == 'assistant') {
final content = msg.message?.content;
if (content != null && content.isNotEmpty) {
final first = content.first;
if (first['type'] == 'text' &&
(first['text'] as String?)?.trim().isNotEmpty == true) {
return true;
}
}
}
return false;
}