MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / extract_tool_status

Function extract_tool_status

atomic-agent/src/hooks/codex.rs:675–692  ·  view source on GitHub ↗
(response: &Value)

Source from the content-addressed store, hash-verified

673}
674
675fn extract_tool_status(response: &Value) -> Option<String> {
676 if response
677 .get("success")
678 .and_then(Value::as_bool)
679 .is_some_and(|success| success)
680 {
681 return Some("completed".to_string());
682 }
683 if response
684 .get("success")
685 .and_then(Value::as_bool)
686 .is_some_and(|success| !success)
687 || response.get("error").is_some()
688 {
689 return Some("error".to_string());
690 }
691 None
692}
693
694fn extract_duration_ms(response: &Value) -> Option<u64> {
695 response

Callers 1

normalize_tool_rawFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected