(&self, tasks: Vec<DelegateTaskOptions>)
| 3683 | /// Execute several delegated child-agent tasks concurrently through `parallel_task`. |
| 3684 | #[napi(ts_args_type = "tasks: DelegateTaskOptions[]")] |
| 3685 | pub async fn tasks(&self, tasks: Vec<DelegateTaskOptions>) -> napi::Result<ToolResult> { |
| 3686 | let args = parallel_task_options_to_args(tasks); |
| 3687 | |
| 3688 | let session = self.inner.clone(); |
| 3689 | let result = get_runtime() |
| 3690 | .spawn(async move { session.tool("parallel_task", args).await }) |
| 3691 | .await |
| 3692 | .map_err(|e| napi::Error::from_reason(format!("Task join error: {e}")))? |
| 3693 | .map_err(|e| { |
| 3694 | napi::Error::from_reason(format!("Parallel task delegation failed: {e}")) |
| 3695 | })?; |
| 3696 | Ok(tool_result_from_core(result)) |
| 3697 | } |
| 3698 | |
| 3699 | /// Execute several delegated child-agent tasks concurrently through `parallel_task`. |
| 3700 | #[napi( |
no test coverage detected