MCPcopy Create free account
hub / github.com/AI45Lab/Code / confirm_tool_use

Method confirm_tool_use

core/src/agent_api/session_hitl.rs:27–41  ·  view source on GitHub ↗
(
        &self,
        tool_id: &str,
        approved: bool,
        reason: Option<String>,
    )

Source from the content-addressed store, hash-verified

25 }
26
27 pub(super) async fn confirm_tool_use(
28 &self,
29 tool_id: &str,
30 approved: bool,
31 reason: Option<String>,
32 ) -> Result<bool> {
33 let Some(manager) = &self.session.config.confirmation_manager else {
34 return Ok(false);
35 };
36
37 manager
38 .confirm(tool_id, approved, reason)
39 .await
40 .map_err(CodeError::Session)
41 }
42
43 pub(super) async fn cancel_confirmations(&self) -> usize {
44 match &self.session.config.confirmation_manager {

Calls 1

confirmMethod · 0.45