ICommand.cs 982 B

1234567891011121314151617181920212223242526272829303132333435
  1. using LLM.Editor.Data;
  2. namespace LLM.Editor.Commands
  3. {
  4. /// <summary>
  5. /// Defines the possible outcomes of a command's execution.
  6. /// </summary>
  7. public enum CommandOutcome
  8. {
  9. /// <summary>
  10. /// The command completed successfully and the queue can proceed.
  11. /// </summary>
  12. Success,
  13. /// <summary>
  14. /// The command failed and the queue should be stopped.
  15. /// </summary>
  16. Error,
  17. /// <summary>
  18. /// The command has gathered context and is now waiting for the next
  19. /// turn of conversation with the LLM before the queue can proceed.
  20. /// </summary>
  21. AwaitingNextTurn
  22. }
  23. public interface ICommand
  24. {
  25. /// <summary>
  26. /// Executes the command.
  27. /// </summary>
  28. /// <param name="context">A context object to pass runtime data between commands.</param>
  29. public CommandOutcome Execute(CommandContext context);
  30. }
  31. }