MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / content_is_only_subagent_dispatch

Function content_is_only_subagent_dispatch

src/sessions/cursor.rs:983–995  ·  view source on GitHub ↗
(content: &Value)

Source from the content-addressed store, hash-verified

981}
982
983fn content_is_only_subagent_dispatch(content: &Value) -> bool {
984 let Some(items) = content.as_array() else {
985 return false;
986 };
987 !items.is_empty()
988 && items.iter().all(|item| {
989 item.get("type").and_then(Value::as_str) == Some("tool_use")
990 && item
991 .get("name")
992 .and_then(Value::as_str)
993 .is_some_and(is_subagent_dispatch_tool)
994 })
995}
996
997fn dispatch_text(item: &Value) -> Option<String> {
998 let input = item.get("input").unwrap_or(item);

Callers 1

event_messageFunction · 0.85

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected