ReferentialContext.cs 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. using System.Collections.Generic;
  2. namespace LLM.Editor.Data
  3. {
  4. /// <summary>
  5. /// The root object for the structured context manifest sent to the LLM.
  6. /// It contains a list of all assets the user has staged.
  7. /// </summary>
  8. [System.Serializable]
  9. public class StagedContextManifest
  10. {
  11. public List<StagedContextItem> stagedContext = new();
  12. }
  13. /// <summary>
  14. /// Represents a single item (GameObject, script, asset) staged by the user.
  15. /// It provides a stable identifier that the LLM can use to ask for more details.
  16. /// </summary>
  17. [System.Serializable]
  18. public class StagedContextItem
  19. {
  20. /// <summary>
  21. /// A stable, session-unique identifier for this asset.
  22. /// (e.g., Instance ID for scene objects, GUID for project assets).
  23. /// </summary>
  24. public string contextId;
  25. /// <summary>
  26. /// The name of the asset (e.g., "GrenadeLauncher", "Player.cs").
  27. /// </summary>
  28. public string name;
  29. /// <summary>
  30. /// The fully qualified type name of the asset (e.g., "UnityEngine.GameObject").
  31. /// </summary>
  32. public string assetType;
  33. /// <summary>
  34. /// If the asset is a GameObject, this lists the names of its components.
  35. /// </summary>
  36. public List<string> components;
  37. }
  38. }