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

Function extract_tool_status

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

Source from the content-addressed store, hash-verified

546}
547
548fn extract_tool_status(response: &Value) -> Option<String> {
549 if response
550 .get("success")
551 .and_then(Value::as_bool)
552 .is_some_and(|success| success)
553 {
554 return Some("completed".to_string());
555 }
556 if response
557 .get("success")
558 .and_then(Value::as_bool)
559 .is_some_and(|success| !success)
560 || response.get("error").is_some()
561 {
562 return Some("error".to_string());
563 }
564 None
565}
566
567fn extract_duration_ms(response: &Value) -> Option<u64> {
568 response

Callers 1

normalize_tool_rawFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected