/* ┌──────────────────────────────────────────────────────────────────┐ │ Author: Ivan Murzak (https://github.com/IvanMurzak) │ │ Repository: GitHub (https://github.com/IvanMurzak/Unity-MCP) │ │ Copyright (c) 2025 Ivan Murzak │ │ Licensed under the Apache License, Version 2.0. │ │ See the LICENSE file in the project root for more information. │ └──────────────────────────────────────────────────────────────────┘ */ #nullable enable using System; using com.IvanMurzak.ReflectorNet.Utils; using com.IvanMurzak.Unity.MCP.Editor.Services; using com.IvanMurzak.Unity.MCP.Editor.UI.Controls; using Microsoft.AspNetCore.SignalR.Client; using R3; using UnityEngine; using UnityEngine.UIElements; using static com.IvanMurzak.McpPlugin.Common.Consts.MCP.Server; namespace com.IvanMurzak.Unity.MCP.Editor.UI { public partial class MainWindowEditor { private TextField? _inputFieldHost; private VisualElement? _connectionStatusCircle; private Label? _connectionStatusText; private readonly SerialDisposable _authRejectedSubscription = new(); private void SetupConnectionSection(VisualElement root) { _inputFieldHost = root.Q("InputServerURL"); var btnConnect = root.Q