Remove context by path
(&mut self, path: &str)
| 468 | |
| 469 | /// Remove context by path |
| 470 | pub async fn remove_by_path(&mut self, path: &str) -> Result<(), String> { |
| 471 | if let Some(context) = self.agent_client.get_context_by_path(path).await { |
| 472 | self.agent_client |
| 473 | .remove_context_by_id(&context.id) |
| 474 | .await |
| 475 | .map_err(|e| e.to_string()) |
| 476 | } else { |
| 477 | Err(format!("No context found with path '{}'", path)) |
| 478 | } |
| 479 | } |
| 480 | |
| 481 | /// Remove context by name |
| 482 | pub async fn remove_by_name(&mut self, name: &str) -> Result<(), String> { |
no test coverage detected