(&mut self, id: impl Into<String>, description: impl Into<String>)
| 220 | } |
| 221 | |
| 222 | pub fn add_subtask(&mut self, id: impl Into<String>, description: impl Into<String>) { |
| 223 | self.parts.push(MessagePart { |
| 224 | id: format!("prt_{}", uuid::Uuid::new_v4()), |
| 225 | part_type: PartType::Subtask { |
| 226 | id: id.into(), |
| 227 | description: description.into(), |
| 228 | status: "pending".to_string(), |
| 229 | }, |
| 230 | created_at: Utc::now(), |
| 231 | message_id: None, |
| 232 | }); |
| 233 | } |
| 234 | |
| 235 | pub fn get_text(&self) -> String { |
| 236 | self.parts |