MCPcopy Index your code
hub / github.com/AI45Lab/Code / test_parse_agent_md

Function test_parse_agent_md

core/src/subagent.rs:1438–1455  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1436
1437 #[test]
1438 fn test_parse_agent_md() {
1439 let md = r#"---
1440name: md-agent
1441description: Agent from markdown
1442max_steps: 15
1443---
1444# System Prompt
1445
1446You are a helpful agent.
1447Do your best work.
1448"#;
1449 let agent = parse_agent_md(md).unwrap();
1450 assert_eq!(agent.name, "md-agent");
1451 assert_eq!(agent.description, "Agent from markdown");
1452 assert_eq!(agent.max_steps, Some(15));
1453 assert!(agent.prompt.is_some());
1454 assert!(agent.prompt.unwrap().contains("helpful agent"));
1455 }
1456
1457 #[test]
1458 fn test_parse_agent_md_with_prompt_in_frontmatter() {

Callers

nothing calls this directly

Calls 1

parse_agent_mdFunction · 0.85

Tested by

no test coverage detected