Simplify default HTTP (#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
main
Marcus Sanatan 2025-12-30 00:44:57 -04:00 committed by GitHub
parent ed802c11c0
commit b866a4cc42
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 1 additions and 6 deletions

View File

@ -703,11 +703,6 @@ namespace MCPForUnity.Editor.Services.Transport.Transports
private static Uri BuildWebSocketUri(string baseUrl)
{
if (string.IsNullOrWhiteSpace(baseUrl))
{
baseUrl = "http://localhost:8080";
}
if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri))
{
throw new InvalidOperationException($"Invalid MCP base URL: {baseUrl}");

View File

@ -9,7 +9,7 @@
</ui:VisualElement>
<ui:VisualElement class="setting-row" name="http-url-row">
<ui:Label text="HTTP URL:" class="setting-label" />
<ui:TextField name="http-url" class="url-field" placeholder-text="http://localhost:8080" />
<ui:TextField name="http-url" class="url-field" />
</ui:VisualElement>
<ui:VisualElement name="http-server-command-section" class="manual-config-content">
<ui:Label text="Use this command to launch the server manually:" class="config-label" />