(&self)
| 115 | } |
| 116 | |
| 117 | pub async fn export_subsessions(&self) -> HashMap<String, PersistedSubsessionState> { |
| 118 | self.subsessions |
| 119 | .lock() |
| 120 | .await |
| 121 | .iter() |
| 122 | .map(|(id, state)| { |
| 123 | ( |
| 124 | id.clone(), |
| 125 | PersistedSubsessionState { |
| 126 | agent: state.agent.clone(), |
| 127 | conversation: state.conversation.clone(), |
| 128 | disabled_tools: state.disabled_tools.iter().cloned().collect(), |
| 129 | }, |
| 130 | ) |
| 131 | }) |
| 132 | .collect() |
| 133 | } |
| 134 | |
| 135 | pub async fn execute(&mut self, user_message: impl Into<String>) -> Result<String, AgentError> { |
| 136 | self.conversation.add_user_message(user_message); |
no test coverage detected