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

Function extract_tool_status

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

Source from the content-addressed store, hash-verified

687}
688
689fn extract_tool_status(response: &Value) -> Option<String> {
690 if response
691 .get("success")
692 .and_then(Value::as_bool)
693 .is_some_and(|success| success)
694 {
695 return Some("completed".to_string());
696 }
697 if response
698 .get("success")
699 .and_then(Value::as_bool)
700 .is_some_and(|success| !success)
701 || response.get("error").is_some()
702 {
703 return Some("error".to_string());
704 }
705 None
706}
707
708fn extract_duration_ms(response: &Value) -> Option<u64> {
709 response

Callers 1

normalize_tool_rawFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected