(
&self,
py: Python<'_>,
tool_id: String,
approved: bool,
reason: Option<String>,
)
| 2418 | /// Resolve a pending HITL tool confirmation. |
| 2419 | #[pyo3(signature = (tool_id, approved, reason=None))] |
| 2420 | fn confirm_tool_use( |
| 2421 | &self, |
| 2422 | py: Python<'_>, |
| 2423 | tool_id: String, |
| 2424 | approved: bool, |
| 2425 | reason: Option<String>, |
| 2426 | ) -> PyResult<bool> { |
| 2427 | let session = self.inner.clone(); |
| 2428 | py.allow_threads(move || { |
| 2429 | get_runtime().block_on(session.confirm_tool_use(&tool_id, approved, reason)) |
| 2430 | }) |
| 2431 | .map_err(|e| PyRuntimeError::new_err(format!("confirm_tool_use failed: {e}"))) |
| 2432 | } |
| 2433 | |
| 2434 | /// Cancel all pending HITL confirmations for this session. |
| 2435 | fn cancel_confirmations(&self, py: Python<'_>) -> usize { |
no test coverage detected