| 1 | using AgentForge.Abstractions; |
| 2 | using AgentForge.Plugin.View; |
| 3 | |
| 4 | namespace AgentForge.Plugin.Grouping.Repositories; |
| 5 | |
| 6 | internal static class ForgeViewCatalogRepoNode |
| 7 | { |
| 8 | internal static string Render(ForgeOrgCatalogRepoItem repo) => |
| 9 | ForgeHtml.Li(null, |
| 10 | ForgeHtml.Text("📦 "), |
| 11 | ForgeHtml.A($"/view/repos/{repo.UrlPath}", ShortRepoName(repo.Name)), |
| 12 | ForgeHtml.Text(" "), |
| 13 | ForgeHtml.Badge(repo.DriveMode), |
| 14 | ForgeHtml.Text(" "), |
| 15 | ForgeHtml.Badge(repo.Visibility)); |
| 16 | |
| 17 | private static string ShortRepoName(string fullName) |
| 18 | { |
| 19 | var slash = fullName.IndexOf('/', StringComparison.Ordinal); |
| 20 | return slash >= 0 ? fullName[(slash + 1)..] : fullName; |
| 21 | } |
| 22 | } |
| 23 | |
View only · write via MCP/CIDE