using UnityEngine; using LLM.Editor.Data; using LLM.Editor.Helper; using JetBrains.Annotations; namespace LLM.Editor.Commands { // Parameters for this command [System.Serializable] public class DisplayMessageParams { public string message; } [UsedImplicitly] public class DisplayMessageCommand : ICommand { private readonly DisplayMessageParams _params; public DisplayMessageCommand(string jsonParams) { _params = jsonParams?.FromJson(); } public void Execute(CommandContext context) { if (_params == null || string.IsNullOrEmpty(_params.message)) { Debug.LogError("[DisplayMessageCommand] Parameters are invalid or message is empty."); return; } // In a real UI, this would render to the chat window. // For now, we just log it. Debug.Log($"[LLM RESPONSE]: {_params.message}"); } } }