using System.Collections.Generic;

namespace LLM.Editor.Data
{
    /// <summary>
    /// A runtime class to pass temporary data between commands during execution.
    /// This does not get serialized.
    /// </summary>
    public class CommandContext
    {
        public object CurrentSubject { get; set; }
        public string ErrorMessage { get; set; }
        
        /// <summary>
        /// A map from a logical name (e.g., "MyNewCube") to a persistent identifier
        /// (e.g., a scene path "/MyNewCube" or an asset GUID).
        /// This allows commands to reference objects created in previous steps,
        /// even across domain reloads.
        /// </summary>
        public Dictionary<string, PersistentIdentifier> IdentifierMap { get; set; } = new();
        
        /// <summary>
        /// The current high-level plan provided by the LLM.
        /// This is populated by the UpdateWorkingContextCommand and displayed in the UI.
        /// </summary>
        public List<string> Plan { get; set; }
    }
}
