Skip to content

Commit 5573585

Browse files
JamesNKradical
authored andcommitted
Display VS Code tab first in MCP dialog (#12467)
1 parent 6493753 commit 5573585

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

src/Aspire.Dashboard/Components/Dialogs/McpServerDialog.razor

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -18,33 +18,6 @@
1818
For more information, see <a href="https://aka.ms/aspire/mcp-getting-started" target="_blank">@Loc[nameof(Resources.Dialogs.McpServerDialogLearnMoreLink)]</a>.
1919
</p>
2020
<FluentTabs ActiveTabId="@($"tab-{_activeView}")" OnTabChange="@OnTabChangeAsync" Size="null">
21-
<FluentTab LabelClass="tab-label"
22-
Id="@($"tab-{McpToolView.VisualStudio}")"
23-
Label="@Loc[nameof(Resources.Dialogs.McpServerDialogVisualStudioTab)]">
24-
<div class="mcp-tool-tab">
25-
<p>
26-
@Loc[nameof(Resources.Dialogs.McpServerDialogQuicklyAddVisualStudio)]
27-
</p>
28-
<p>
29-
<a href="@($"vsweb+mcp:/install?{Uri.EscapeDataString(_mcpServerInstallButtonJson)}")">
30-
31-
<svg xmlns="http://www.w3.org/2000/svg" width="251" height="20" role="img" aria-label="@Loc[nameof(Resources.Dialogs.McpServerDialogInstallButtonAriaLabelVisualStudio)]">
32-
<title>@Loc[nameof(Resources.Dialogs.McpServerDialogInstallButtonAriaLabelVisualStudio)]</title>
33-
<g shape-rendering="crispEdges"><rect width="100" height="20" fill="#555" /><rect x="100" width="151" height="20" fill="#8863c5" /></g>
34-
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><image x="5" y="3" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZSIgcm9sZT0iaW1nIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPk1vZGVsIENv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uOTgzLTYuOTg1YS44MzUuODM1IDAgMCAwIDAtMS4xOC44NC44NCAwIDAgMC0uNTktLjI0NSIvPjwvc3ZnPg==" /><text x="595" y="140" transform="scale(.1)" fill="#fff" textLength="730">Visual Studio</text><text x="1745" y="140" transform="scale(.1)" fill="#fff" textLength="1410">Install Aspire MCP Server</text></g>
35-
</svg>
36-
@*
37-
Generated from:
38-
https://img.shields.io/badge/Visual_Studio-Install_Aspire_MCP_Server-8863C5?style=flat-square&logo=modelcontextprotocol&logoColor=white
39-
*@
40-
</a>
41-
</p>
42-
<p>
43-
@((MarkupString)string.Format(CultureInfo.CurrentCulture, Loc[nameof(Resources.Dialogs.McpServerDialogOtherOptionsVisualStudio)], "https://aka.ms/aspire/mcp-add-client-vs"))
44-
</p>
45-
<MarkdownRenderer Markdown="@GetJsonConfigurationMarkdown()" MarkdownProcessor="@_markdownProcessor" />
46-
</div>
47-
</FluentTab>
4821
<FluentTab LabelClass="tab-label"
4922
Id="@($"tab-{McpToolView.VSCode}")"
5023
Label="@Loc[nameof(Resources.Dialogs.McpServerDialogVSCodeTab)]">
@@ -100,6 +73,32 @@
10073
}
10174
</div>
10275
</FluentTab>
76+
<FluentTab LabelClass="tab-label"
77+
Id="@($"tab-{McpToolView.VisualStudio}")"
78+
Label="@Loc[nameof(Resources.Dialogs.McpServerDialogVisualStudioTab)]">
79+
<div class="mcp-tool-tab">
80+
<p>
81+
@Loc[nameof(Resources.Dialogs.McpServerDialogQuicklyAddVisualStudio)]
82+
</p>
83+
<p>
84+
<a href="@($"vsweb+mcp:/install?{Uri.EscapeDataString(_mcpServerInstallButtonJson)}")">
85+
<svg xmlns="http://www.w3.org/2000/svg" width="251" height="20" role="img" aria-label="@Loc[nameof(Resources.Dialogs.McpServerDialogInstallButtonAriaLabelVisualStudio)]">
86+
<title>@Loc[nameof(Resources.Dialogs.McpServerDialogInstallButtonAriaLabelVisualStudio)]</title>
87+
<g shape-rendering="crispEdges"><rect width="100" height="20" fill="#555" /><rect x="100" width="151" height="20" fill="#8863c5" /></g>
88+
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,DejaVu Sans,sans-serif" text-rendering="geometricPrecision" font-size="110"><image x="5" y="3" width="14" height="14" href="data:image/svg+xml;base64,PHN2ZyBmaWxsPSJ3aGl0ZSIgcm9sZT0iaW1nIiB2aWV3Qm94PSIwIDAgMjQgMjQiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHRpdGxlPk1vZGVsIENvbnRleHQgUHJvdG9jb2w8L3RpdGxlPjxwYXRoIGQ9Ik0xMy44NSAwYTQuMTYgNC4xNiAwIDAgMC0yLjk1IDEuMjE3TDEuNDU2IDEwLjY2YS44MzUuODM1IDAgMCAwIDAgMS4xOC44MzUuODM1IDAgMCAwIDEuMTggMGw5LjQ0Mi05LjQ0MmEyLjQ5IDIuNDkgMCAwIDEgMy41NDEgMCAyLjQ5IDIuNDkgMCAwIDEgMCAzLjU0MUw4LjU5IDEyLjk3bC0uMS4xYS44MzUuODM1IDAgMCAwIDAgMS4xOC44MzUuODM1IDAgMCAwIDEuMTggMGwuMS0uMDk4IDcuMDMtNy4wMzRhMi40OSAyLjQ5IDAgMCAxIDMuNTQyIDBsLjA0OS4wNWEyLjQ5IDIuNDkgMCAwIDEgMCAzLjU0bC04LjU0IDguNTRhMS45NiAxLjk2IDAgMCAwIDAgMi43NTVsMS43NTMgMS43NTNhLjgzNS44MzUgMCAwIDAgMS4xOCAwIC44MzUuODM1IDAgMCAwIDAtMS4xOGwtMS43NTMtMS43NTNhLjI2Ni4yNjYgMCAwIDEgMC0uMzk0bDguNTQtOC41NGE0LjE4NSA0LjE4NSAwIDAgMCAwLTUuOWwtLjA1LS4wNWE0LjE2IDQuMTYgMCAwIDAtMi45NS0xLjIxOGMtLjIgMC0uNDAxLjAyLS42LjA0OGE0LjE3IDQuMTcgMCAwIDAtMS4xNy0zLjU1MkE0LjE2IDQuMTYgMCAwIDAgMTMuODUgMG0wIDMuMzMzYS44NC44NCAwIDAgMC0uNTkuMjQ1TDYuMjc1IDEwLjU2YTQuMTg2IDQuMTg2IDAgMCAwIDAgNS45MDIgNC4xODYgNC4xODYgMCAwIDAgNS45MDIgMEwxOS4xNiA5LjQ4YS44MzUuODM1IDAgMCAwIDAtMS4xOC44MzUuODM1IDAgMCAwLTEuMTggMGwtNi45ODUgNi45ODRhMi40OSAyLjQ5IDAgMCAxLTMuNTQgMCAyLjQ5IDIuNDkgMCAwIDEgMC0zLjU0bDYuOTgzLTYuOTg1YS44MzUuODM1IDAgMCAwIDAtMS4xOC44NC44NCAwIDAgMC0uNTktLjI0NSIvPjwvc3ZnPg==" /><text x="595" y="140" transform="scale(.1)" fill="#fff" textLength="730">Visual Studio</text><text x="1745" y="140" transform="scale(.1)" fill="#fff" textLength="1410">Install Aspire MCP Server</text></g>
89+
</svg>
90+
@*
91+
Generated from:
92+
https://img.shields.io/badge/Visual_Studio-Install_Aspire_MCP_Server-8863C5?style=flat-square&logo=modelcontextprotocol&logoColor=white
93+
*@
94+
</a>
95+
</p>
96+
<p>
97+
@((MarkupString)string.Format(CultureInfo.CurrentCulture, Loc[nameof(Resources.Dialogs.McpServerDialogOtherOptionsVisualStudio)], "https://aka.ms/aspire/mcp-add-client-vs"))
98+
</p>
99+
<MarkdownRenderer Markdown="@GetJsonConfigurationMarkdown()" MarkdownProcessor="@_markdownProcessor" />
100+
</div>
101+
</FluentTab>
103102
<FluentTab LabelClass="tab-label"
104103
Id="@($"tab-{McpToolView.Other}")"
105104
Label="@Loc[nameof(Resources.Dialogs.McpServerDialogOtherTab)]">

src/Aspire.Dashboard/Components/Dialogs/McpServerDialog.razor.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,8 +144,8 @@ private string GetJsonConfigurationMarkdown() =>
144144

145145
public enum McpToolView
146146
{
147-
VisualStudio,
148147
VSCode,
148+
VisualStudio,
149149
Other
150150
}
151151
}

0 commit comments

Comments
 (0)