(value: &Value, out: &mut Vec<String>)
| 372 | } |
| 373 | |
| 374 | fn collect_skill_view_metadata(value: &Value, out: &mut Vec<String>) { |
| 375 | match value { |
| 376 | Value::Array(items) => { |
| 377 | for item in items { |
| 378 | collect_skill_view_metadata(item, out); |
| 379 | } |
| 380 | } |
| 381 | Value::Object(map) => { |
| 382 | if let Some(function) = map.get("function").and_then(Value::as_object) { |
| 383 | if function |
| 384 | .get("name") |
| 385 | .and_then(Value::as_str) |
| 386 | .is_some_and(is_skill_view_tool) |
| 387 | { |
| 388 | if let Some(arguments) = function.get("arguments") { |
| 389 | collect_skill_view_arguments(arguments, out); |
| 390 | } |
| 391 | } |
| 392 | } |
| 393 | for value in map.values() { |
| 394 | collect_skill_view_metadata(value, out); |
| 395 | } |
| 396 | } |
| 397 | _ => {} |
| 398 | } |
| 399 | } |
| 400 | |
| 401 | fn collect_skill_view_arguments(value: &Value, out: &mut Vec<String>) { |
| 402 | match value { |
no test coverage detected