Forge
csharp3407750f
1using AgentForge.Abstractions;
2using AgentForge.Plugin.View;
3
4namespace AgentForge.Plugin.Grouping.Repositories;
5
6internal 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