countToolUses static method
Count the number of tool uses in a message.
Implementation
static int countToolUses(RenderableMessage msg) {
if (msg.type == 'grouped_tool_use' && msg.messages != null) {
return msg.messages!.length;
}
return 1;
}