()
| 1559 | |
| 1560 | #[test] |
| 1561 | fn test_registry_with_config() { |
| 1562 | let temp_dir = tempfile::tempdir().unwrap(); |
| 1563 | |
| 1564 | // Create an agent file |
| 1565 | std::fs::write( |
| 1566 | temp_dir.path().join("custom.yaml"), |
| 1567 | r#" |
| 1568 | name: custom-agent |
| 1569 | description: Custom agent from config |
| 1570 | "#, |
| 1571 | ) |
| 1572 | .unwrap(); |
| 1573 | |
| 1574 | let config = CodeConfig::new().add_agent_dir(temp_dir.path()); |
| 1575 | let registry = AgentRegistry::with_config(&config); |
| 1576 | |
| 1577 | // Should have built-in agents plus custom agent |
| 1578 | assert!(registry.exists("explore")); |
| 1579 | assert!(registry.exists("custom-agent")); |
| 1580 | assert_eq!(registry.len(), 6); // 5 built-in + 1 custom |
| 1581 | } |
| 1582 | |
| 1583 | #[test] |
| 1584 | fn test_agent_definition_with_model() { |
nothing calls this directly
no test coverage detected