use chrono::{DateTime, Utc}; use serde::{Deserialize, Serialize}; #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ChatMessage { pub id: String, pub timestamp: DateTime, pub agent: AgentType, pub content: String, pub message_type: MessageType, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "lowercase")] pub enum AgentType { Coach, Player, Single, User, } #[derive(Debug, Clone, Serialize, Deserialize, PartialEq)] #[serde(rename_all = "lowercase")] pub enum MessageType { Text, ToolCall, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct ToolCall { pub id: String, pub timestamp: DateTime, pub tool_name: String, pub parameters: serde_json::Value, pub result: Option, pub execution_time_ms: Option, pub success: bool, pub error: Option, } #[derive(Debug, Clone, Serialize, Deserialize)] pub struct LogEntry { pub timestamp: DateTime, pub level: String, pub message: String, pub fields: serde_json::Value, }