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

Function parse_confirmation_inheritance

sdk/node/src/lib.rs:2753–2766  ·  view source on GitHub ↗
(
    value: &str,
)

Source from the content-addressed store, hash-verified

2751}
2752
2753fn parse_confirmation_inheritance(
2754 value: &str,
2755) -> napi::Result<a3s_code_core::subagent::ConfirmationInheritance> {
2756 use a3s_code_core::subagent::ConfirmationInheritance;
2757 match value {
2758 "auto_approve" => Ok(ConfirmationInheritance::AutoApprove),
2759 "deny_on_ask" => Ok(ConfirmationInheritance::DenyOnAsk),
2760 "inherit_parent" => Ok(ConfirmationInheritance::InheritParent),
2761 other => Err(napi::Error::from_reason(format!(
2762 "invalid confirmation_inheritance: '{}' (expected: auto_approve, deny_on_ask, inherit_parent)",
2763 other
2764 ))),
2765 }
2766}
2767
2768fn confirmation_inheritance_to_js(ci: &a3s_code_core::subagent::ConfirmationInheritance) -> String {
2769 use a3s_code_core::subagent::ConfirmationInheritance;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected