createIdleNotification function

IdleNotificationMessage createIdleNotification(
  1. String agentId, {
  2. String? idleReason,
  3. String? summary,
  4. String? completedTaskId,
  5. String? completedStatus,
  6. String? failureReason,
})

Creates an idle notification message to send to the team leader.

Implementation

IdleNotificationMessage createIdleNotification(
  String agentId, {
  String? idleReason,
  String? summary,
  String? completedTaskId,
  String? completedStatus,
  String? failureReason,
}) {
  return IdleNotificationMessage(
    from: agentId,
    timestamp: DateTime.now().toUtc().toIso8601String(),
    idleReason: idleReason,
    summary: summary,
    completedTaskId: completedTaskId,
    completedStatus: completedStatus,
    failureReason: failureReason,
  );
}