(&mut self, name: impl Into<String>)
| 208 | } |
| 209 | |
| 210 | pub fn add_agent(&mut self, name: impl Into<String>) { |
| 211 | self.parts.push(MessagePart { |
| 212 | id: format!("prt_{}", uuid::Uuid::new_v4()), |
| 213 | part_type: PartType::Agent { |
| 214 | name: name.into(), |
| 215 | status: "pending".to_string(), |
| 216 | }, |
| 217 | created_at: Utc::now(), |
| 218 | message_id: None, |
| 219 | }); |
| 220 | } |
| 221 | |
| 222 | pub fn add_subtask(&mut self, id: impl Into<String>, description: impl Into<String>) { |
| 223 | self.parts.push(MessagePart { |