| 1 | namespace AgentForge.Plugin.View.Components.Iop; |
| 2 | |
| 3 | internal static class ForgeViewIopComments |
| 4 | { |
| 5 | internal static string Render(IReadOnlyList<(string Author, string Text, DateTimeOffset CreatedAt)> comments) |
| 6 | { |
| 7 | if (comments.Count == 0) |
| 8 | return ForgeHtml.P("iop-empty", ForgeHtml.Text("No comments yet.")); |
| 9 | |
| 10 | var items = comments.Select(comment => |
| 11 | ForgeHtml.Li(null, |
| 12 | ForgeHtml.Span("author", ForgeHtml.Text(comment.Author)), |
| 13 | ForgeHtml.Text(" "), |
| 14 | ForgeHtml.Span("time", ForgeHtml.Text(comment.CreatedAt.ToString("u"))), |
| 15 | ForgeHtml.P(null, ForgeHtml.Text(comment.Text)))).ToArray(); |
| 16 | |
| 17 | return ForgeHtml.Ul("iop-comments", items); |
| 18 | } |
| 19 | } |
| 20 | |
View only · write via MCP/CIDE