shouldReplaceAgentUsageSnapshot function
Implementation
bool shouldReplaceAgentUsageSnapshot(AgentUsageSnapshot? current, AgentUsageSnapshot next) {
if (current != null && current.contextUsedTokens > 0 && next.contextUsedTokens == 0 && next.usage.isEmpty) {
return false;
}
return true;
}