(mut self, callback: F)
| 451 | } |
| 452 | |
| 453 | pub fn with_prompt_subsession<F, Fut>(mut self, callback: F) -> Self |
| 454 | where |
| 455 | F: Fn(String, String) -> Fut + Send + Sync + 'static, |
| 456 | Fut: std::future::Future<Output = Result<String, ToolError>> + Send + 'static, |
| 457 | { |
| 458 | self.prompt_subsession = Some(Arc::new(move |session_id, prompt| { |
| 459 | Box::pin(callback(session_id, prompt)) |
| 460 | })); |
| 461 | self |
| 462 | } |
| 463 | |
| 464 | pub async fn do_prompt_subsession( |
| 465 | &self, |
no test coverage detected