MCPcopy Index your code
hub / github.com/AI45Lab/Code / parse_py_confirmation_inheritance

Function parse_py_confirmation_inheritance

sdk/python/src/lib.rs:4690–4703  ·  view source on GitHub ↗
(
    value: &str,
)

Source from the content-addressed store, hash-verified

4688}
4689
4690fn parse_py_confirmation_inheritance(
4691 value: &str,
4692) -> PyResult<a3s_code_core::subagent::ConfirmationInheritance> {
4693 use a3s_code_core::subagent::ConfirmationInheritance;
4694 match value {
4695 "auto_approve" => Ok(ConfirmationInheritance::AutoApprove),
4696 "deny_on_ask" => Ok(ConfirmationInheritance::DenyOnAsk),
4697 "inherit_parent" => Ok(ConfirmationInheritance::InheritParent),
4698 other => Err(PyValueError::new_err(format!(
4699 "invalid confirmation_inheritance: '{}' (expected: auto_approve, deny_on_ask, inherit_parent)",
4700 other
4701 ))),
4702 }
4703}
4704
4705fn confirmation_inheritance_to_py(ci: &a3s_code_core::subagent::ConfirmationInheritance) -> String {
4706 use a3s_code_core::subagent::ConfirmationInheritance;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected