computeStandaloneAgentContext function

Map<String, dynamic>? computeStandaloneAgentContext(
  1. String? agentName,
  2. String? agentColor
)

Compute standalone agent context for session resume.

Implementation

Map<String, dynamic>? computeStandaloneAgentContext(
  String? agentName,
  String? agentColor,
) {
  if (agentName == null && agentColor == null) return null;
  return {
    'name': agentName ?? '',
    'color': (agentColor == 'default') ? null : agentColor,
  };
}