MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_author_display_different_agents

Function test_author_display_different_agents

atomic-agent/src/identity.rs:808–837  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

806
807 #[test]
808 fn test_author_display_different_agents() {
809 let user = UserIdentityInfo {
810 name: "Dev".to_string(),
811 email: Some("dev@co.com".to_string()),
812 public_key_base32: "KEY".to_string(),
813 };
814
815 let agents = vec![
816 ("claude-code", "60f5cbd2", "claude+60f5 <dev@co.com>"),
817 ("gemini-cli", "abcd1234", "gemini+abcd <dev@co.com>"),
818 ("codex", "9876fedc", "codex+9876 <dev@co.com>"),
819 ("open-code", "1111aaaa", "open+1111 <dev@co.com>"),
820 ];
821
822 for (agent, session, expected) in agents {
823 let options = AgentAuthorOptions {
824 agent_name: agent,
825 agent_display_name: agent,
826 session_id: session,
827 identity_dir: None,
828 };
829 let author = derive_agent_author(&user, &options);
830 assert_eq!(
831 author.display_short(),
832 expected,
833 "Failed for agent: {}",
834 agent
835 );
836 }
837 }
838}

Callers

nothing calls this directly

Calls 1

derive_agent_authorFunction · 0.85

Tested by

no test coverage detected