CommandContext.cs 1021 B

12345678910111213141516171819202122232425262728
  1. using System.Collections.Generic;
  2. namespace LLM.Editor.Data
  3. {
  4. /// <summary>
  5. /// A runtime class to pass temporary data between commands during execution.
  6. /// This does not get serialized.
  7. /// </summary>
  8. public class CommandContext
  9. {
  10. public object CurrentSubject { get; set; }
  11. public string ErrorMessage { get; set; }
  12. /// <summary>
  13. /// A map from a logical name (e.g., "MyNewCube") to a persistent identifier
  14. /// (e.g., a scene path "/MyNewCube" or an asset GUID).
  15. /// This allows commands to reference objects created in previous steps,
  16. /// even across domain reloads.
  17. /// </summary>
  18. public Dictionary<string, string> IdentifierMap { get; set; } = new();
  19. /// <summary>
  20. /// The current high-level plan provided by the LLM.
  21. /// This is populated by the UpdateWorkingContextCommand and displayed in the UI.
  22. /// </summary>
  23. public List<string> Plan { get; set; }
  24. }
  25. }