Forge
csharp3407750f
1using AgentForge.Services;
2
3namespace AgentForge.Plugin.View.Components.Code;
4
5internal static class ForgeViewBranchPicker
6{
7 internal static string Render(
8 string repoName,
9 string activeBranch,
10 IReadOnlyList<string> branches,
11 string? path,
12 bool isBlob)
13 {
14 var options = branches
15 .Select(branch =>
16 {
17 var href = ForgeGitViewHelpers.CodeViewHref(repoName, branch, path, isBlob);
18 return ForgeHtml.Option(href, branch, string.Equals(branch, activeBranch, StringComparison.OrdinalIgnoreCase));
19 })
20 .ToArray();
21
22 return ForgeHtml.SelectNav("branch-select", "branch-select", "Branch", options);
23 }
24}
25
View only · write via MCP/CIDE