Skip to content

Commit b866a4c

Browse files
authored
Simplify default HTTP (CoplayDev#495)
* The default URL is already set when we call the function * Remove placeholer for HTTP URL in the UI When we load the UI, we use `HttpEndpointUtility.GetBaseUrl()`, so we don't need this
1 parent ed802c1 commit b866a4c

File tree

2 files changed

+1
-6
lines changed

2 files changed

+1
-6
lines changed

MCPForUnity/Editor/Services/Transport/Transports/WebSocketTransportClient.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,6 @@ private async Task AttemptReconnectAsync(CancellationToken token)
703703

704704
private static Uri BuildWebSocketUri(string baseUrl)
705705
{
706-
if (string.IsNullOrWhiteSpace(baseUrl))
707-
{
708-
baseUrl = "http://localhost:8080";
709-
}
710-
711706
if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri))
712707
{
713708
throw new InvalidOperationException($"Invalid MCP base URL: {baseUrl}");

MCPForUnity/Editor/Windows/Components/Connection/McpConnectionSection.uxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
</ui:VisualElement>
1010
<ui:VisualElement class="setting-row" name="http-url-row">
1111
<ui:Label text="HTTP URL:" class="setting-label" />
12-
<ui:TextField name="http-url" class="url-field" placeholder-text="http://localhost:8080" />
12+
<ui:TextField name="http-url" class="url-field" />
1313
</ui:VisualElement>
1414
<ui:VisualElement name="http-server-command-section" class="manual-config-content">
1515
<ui:Label text="Use this command to launch the server manually:" class="config-label" />

0 commit comments

Comments
 (0)