/* ┌──────────────────────────────────────────────────────────────────┐ │ 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.Unity.MCP.Editor.Utils; using R3; using UnityEngine.UIElements; using static com.IvanMurzak.McpPlugin.Common.Consts.MCP.Server; namespace com.IvanMurzak.Unity.MCP.Editor.UI { public class ConfigurationElements : IDisposable { public VisualElement Root { get; } public Label StatusText { get; } public Button BtnConfigure { get; } public Button BtnRemove { get; } private readonly Subject onConfigured = new(); public Observable OnConfigured => onConfigured; private readonly AiAgentConfig _config; private readonly TransportMethod _transportMode; private readonly EventCallback _configureCallback; private readonly EventCallback _removeCallback; public ConfigurationElements(AiAgentConfig config, TransportMethod transportMode) { _config = config; _transportMode = transportMode; Root = new UITemplate("Editor/UI/uxml/agents/elements/TemplateConfigureStatus.uxml").Value; StatusText = Root.Q