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

Function normalize_stop_raw

atomic-agent/src/hooks/codex.rs:503–513  ·  view source on GitHub ↗
(mut raw: Value)

Source from the content-addressed store, hash-verified

501}
502
503fn normalize_stop_raw(mut raw: Value) -> Value {
504 let stop_hook_active = raw.get("stop_hook_active").and_then(Value::as_bool);
505 if let Some(active) = stop_hook_active {
506 if let Some(obj) = raw.as_object_mut() {
507 obj.entry("finish_reason".to_string()).or_insert_with(|| {
508 Value::String(if active { "tool-calls" } else { "stop" }.to_string())
509 });
510 }
511 }
512 raw
513}
514
515fn normalize_tool_raw(mut raw: Value) -> Value {
516 let Some(response) = raw.get("tool_response").cloned() else {

Callers 1

parse_eventMethod · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected