#pragma once #include "CoreMinimal.h" #include "Widgets/SCompoundWidget.h" #include "Styling/SlateColor.h" class SEditableTextBox; /** * In-editor setup wizard for the UE Blueprint MCP plugin. A Nomad tab opened from * Tools > MCP Setup Wizard. Three sections: * 1. Remote Control — show status of the HTTP bridge (:30010) and start it. * 2. API keys — paste the agent-gateway Anthropic token + ElevenLabs key. * 3. MCP tools — list the tool catalogue (read from the plugin's tools.json). */ class SMCPWizard : public SCompoundWidget { public: SLATE_BEGIN_ARGS(SMCPWizard) {} SLATE_END_ARGS() void Construct(const FArguments& InArgs); private: // --- Remote Control --- enum class ERCStatus : uint8 { Unknown, Checking, Up, Down }; ERCStatus RcStatus = ERCStatus::Unknown; FText GetRcStatusText() const; FSlateColor GetRcStatusColor() const; FReply OnStartRemoteControl(); FReply OnRefreshStatus(); void PingRemoteControl(); // --- API keys --- TSharedPtr AnthropicBox; TSharedPtr ElevenLabsBox; FReply OnSaveAnthropicToken(); FReply OnSaveElevenLabsKey(); void LoadExistingKeys(); // --- Tools --- TSharedRef BuildToolsSection(); // --- helpers --- FString PluginDir() const; FString GatewayDir() const; static void Notify(const FText& Message, bool bSuccess); static bool UpsertEnvVar(const FString& FilePath, const FString& Key, const FString& Value); };