(
&self,
session_id: String,
agent_type: &str,
)
| 150 | } |
| 151 | |
| 152 | pub async fn create_session_with_id( |
| 153 | &self, |
| 154 | session_id: String, |
| 155 | agent_type: &str, |
| 156 | ) -> Result<String> { |
| 157 | let mut session_id_guard = self.session_id.lock().await; |
| 158 | |
| 159 | let session = self |
| 160 | .coordinator |
| 161 | .create_session_with_id( |
| 162 | Some(session_id.clone()), |
| 163 | Self::build_default_session_name(), |
| 164 | agent_type.to_string(), |
| 165 | SessionConfig { |
| 166 | workspace_path: Some(self.workspace_path_string()), |
| 167 | ..Default::default() |
| 168 | }, |
| 169 | ) |
| 170 | .await?; |
| 171 | |
| 172 | let id = session.session_id.clone(); |
| 173 | *session_id_guard = Some(id.clone()); |
| 174 | tracing::info!("Created core session with fixed id: {}", id); |
| 175 | |
| 176 | Ok(id) |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | #[async_trait::async_trait] |
no test coverage detected