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 thismain
parent
ed802c11c0
commit
b866a4cc42
|
|
@ -703,11 +703,6 @@ namespace MCPForUnity.Editor.Services.Transport.Transports
|
||||||
|
|
||||||
private static Uri BuildWebSocketUri(string baseUrl)
|
private static Uri BuildWebSocketUri(string baseUrl)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrWhiteSpace(baseUrl))
|
|
||||||
{
|
|
||||||
baseUrl = "http://localhost:8080";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri))
|
if (!Uri.TryCreate(baseUrl, UriKind.Absolute, out var httpUri))
|
||||||
{
|
{
|
||||||
throw new InvalidOperationException($"Invalid MCP base URL: {baseUrl}");
|
throw new InvalidOperationException($"Invalid MCP base URL: {baseUrl}");
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</ui:VisualElement>
|
</ui:VisualElement>
|
||||||
<ui:VisualElement class="setting-row" name="http-url-row">
|
<ui:VisualElement class="setting-row" name="http-url-row">
|
||||||
<ui:Label text="HTTP URL:" class="setting-label" />
|
<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>
|
||||||
<ui:VisualElement name="http-server-command-section" class="manual-config-content">
|
<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" />
|
<ui:Label text="Use this command to launch the server manually:" class="config-label" />
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue