(value: &Value, out: &mut Vec<SubagentTask>)
| 2249 | } |
| 2250 | |
| 2251 | fn extract_subagent_tasks_from_value(value: &Value, out: &mut Vec<SubagentTask>) { |
| 2252 | let Some(subagents) = value.get("subagents").and_then(Value::as_array) else { |
| 2253 | return; |
| 2254 | }; |
| 2255 | |
| 2256 | for subagent in subagents { |
| 2257 | let Some(agent_type) = subagent.get("type").and_then(Value::as_str) else { |
| 2258 | continue; |
| 2259 | }; |
| 2260 | let Some(task) = subagent.get("task").and_then(Value::as_str) else { |
| 2261 | continue; |
| 2262 | }; |
| 2263 | |
| 2264 | if !agent_type.trim().is_empty() && !task.trim().is_empty() { |
| 2265 | out.push(SubagentTask { |
| 2266 | agent_type: agent_type.to_string(), |
| 2267 | task: task.to_string(), |
| 2268 | }); |
| 2269 | } |
| 2270 | } |
| 2271 | } |
| 2272 | |
| 2273 | fn extract_fenced_json_blocks(text: &str) -> Vec<String> { |
| 2274 | let mut out = Vec::new(); |
no outgoing calls
no test coverage detected