Skip to content

Commit 238263b

Browse files
fix: combine icon with name column in remote docs for proper table rendering
- Move icon from separate column to Name column with <br> separator - Keep <picture> element for light/dark theme support - Remove empty icon column that was collapsing to zero width - Remove unused octiconSimpleImg function
1 parent cb1ccd4 commit 238263b

File tree

2 files changed

+34
-34
lines changed

2 files changed

+34
-34
lines changed

cmd/github-mcp-server/generate_docs.go

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,13 +337,13 @@ func generateRemoteToolsetsDoc() string {
337337
// Build inventory - stateless
338338
r := github.NewInventory(t).Build()
339339

340-
// Generate table header (with icon column)
341-
buf.WriteString("| | Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
342-
buf.WriteString("| --- | ---- | ----------- | ------- | ------------------------- | -------------- | ----------------------------------- |\n")
340+
// Generate table header (icon is combined with Name column)
341+
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
342+
buf.WriteString("| ---- | ----------- | ------- | ------------------------- | -------------- | ----------------------------------- |\n")
343343

344344
// Add "all" toolset first (special case)
345345
allIcon := octiconImg("apps", "../")
346-
fmt.Fprintf(&buf, "| %s | all | All available GitHub MCP tools | https://api.githubcopilot.com/mcp/ | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2F%%22%%7D) | [read-only](https://api.githubcopilot.com/mcp/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2Freadonly%%22%%7D) |\n", allIcon)
346+
fmt.Fprintf(&buf, "| %s<br>all | All available GitHub MCP tools | https://api.githubcopilot.com/mcp/ | [Install](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2F%%22%%7D) | [read-only](https://api.githubcopilot.com/mcp/readonly) | [Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=github&config=%%7B%%22type%%22%%3A%%20%%22http%%22%%2C%%22url%%22%%3A%%20%%22https%%3A%%2F%%2Fapi.githubcopilot.com%%2Fmcp%%2Freadonly%%22%%7D) |\n", allIcon)
347347

348348
// AvailableToolsets() returns toolsets that have tools, sorted by ID
349349
// Exclude context (handled separately) and dynamic (internal only)
@@ -366,7 +366,7 @@ func generateRemoteToolsetsDoc() string {
366366
readonlyInstallLink := fmt.Sprintf("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, readonlyConfig)
367367

368368
icon := octiconImg(ts.Icon, "../")
369-
fmt.Fprintf(&buf, "| %s | %s | %s | %s | %s | [read-only](%s) | %s |\n",
369+
fmt.Fprintf(&buf, "| %s<br>%s | %s | %s | %s | [read-only](%s) | %s |\n",
370370
icon,
371371
formattedName,
372372
ts.Description,
@@ -383,9 +383,9 @@ func generateRemoteToolsetsDoc() string {
383383
func generateRemoteOnlyToolsetsDoc() string {
384384
var buf strings.Builder
385385

386-
// Generate table header (with icon column)
387-
buf.WriteString("| | Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
388-
buf.WriteString("| --- | ---- | ----------- | ------- | ------------------------- | -------------- | ----------------------------------- |\n")
386+
// Generate table header (icon is combined with Name column)
387+
buf.WriteString("| Name | Description | API URL | 1-Click Install (VS Code) | Read-only Link | 1-Click Read-only Install (VS Code) |\n")
388+
buf.WriteString("| ---- | ----------- | ------- | ------------------------- | -------------- | ----------------------------------- |\n")
389389

390390
// Use RemoteOnlyToolsets from github package
391391
for _, ts := range github.RemoteOnlyToolsets() {
@@ -407,7 +407,7 @@ func generateRemoteOnlyToolsetsDoc() string {
407407
readonlyInstallLink := fmt.Sprintf("[Install read-only](https://insiders.vscode.dev/redirect/mcp/install?name=gh-%s&config=%s)", idStr, readonlyConfig)
408408

409409
icon := octiconImg(ts.Icon, "../")
410-
fmt.Fprintf(&buf, "| %s | %s | %s | %s | %s | [read-only](%s) | %s |\n",
410+
fmt.Fprintf(&buf, "| %s<br>%s | %s | %s | %s | [read-only](%s) | %s |\n",
411411
icon,
412412
formattedName,
413413
ts.Description,

0 commit comments

Comments
 (0)