Describe a receipt's source without leaking credentials or the user's home directory.
(source: &str, agent: &str, home: Option<&Path>)
| 1027 | /// Describe a receipt's source without leaking credentials or the user's |
| 1028 | /// home directory. |
| 1029 | fn describe_source(source: &str, agent: &str, home: Option<&Path>) -> (&'static str, String) { |
| 1030 | let registry_url = atomic_agent::integrations::resolve(agent).map(|spec| spec.url); |
| 1031 | if registry_url.as_deref() == Some(source) { |
| 1032 | ("registry", source.to_string()) |
| 1033 | } else if source.contains("://") { |
| 1034 | ("url", redact::urls(source)) |
| 1035 | } else { |
| 1036 | ("local", display_path(Path::new(source), home)) |
| 1037 | } |
| 1038 | } |
| 1039 | |
| 1040 | // Skills |
| 1041 |
no test coverage detected