(
&self,
agent: String,
title: Option<String>,
model: Option<String>,
disabled_tools: Vec<String>,
)
| 437 | } |
| 438 | |
| 439 | pub async fn do_create_subsession( |
| 440 | &self, |
| 441 | agent: String, |
| 442 | title: Option<String>, |
| 443 | model: Option<String>, |
| 444 | disabled_tools: Vec<String>, |
| 445 | ) -> Result<String, ToolError> { |
| 446 | if let Some(ref callback) = self.create_subsession { |
| 447 | callback(agent, title, model, disabled_tools).await |
| 448 | } else { |
| 449 | Ok(format!("task_{}_{}", agent, uuid::Uuid::new_v4())) |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | pub fn with_prompt_subsession<F, Fut>(mut self, callback: F) -> Self |
| 454 | where |