namespace MeetingAssistant.Workflow; public enum WorkflowRulesEditorChatRole { User, Agent } public sealed record WorkflowRulesEditorChatMessage( WorkflowRulesEditorChatRole Role, string Content); public enum WorkflowRulesEditorConversationItemKind { Message, Activity } public sealed record WorkflowRulesEditorConversationItem( WorkflowRulesEditorConversationItemKind Kind, WorkflowRulesEditorChatMessage? Message, string Content, IReadOnlyList? ActivityLines = null) { public bool IsExpanded { get; set; } public static WorkflowRulesEditorConversationItem ChatMessage(WorkflowRulesEditorChatMessage message) { return new WorkflowRulesEditorConversationItem( WorkflowRulesEditorConversationItemKind.Message, message, message.Content); } public static WorkflowRulesEditorConversationItem Activity(string content, IReadOnlyList activityLines) { return new WorkflowRulesEditorConversationItem( WorkflowRulesEditorConversationItemKind.Activity, null, content, activityLines); } } public sealed record WorkflowRulesEditorChatResult(string Response); public enum WorkflowRulesEditorActivityKind { Status, ToolCall, Thinking } public sealed record WorkflowRulesEditorActivityUpdate( WorkflowRulesEditorActivityKind Kind, string Text) { public static WorkflowRulesEditorActivityUpdate Status(string text) { return new WorkflowRulesEditorActivityUpdate(WorkflowRulesEditorActivityKind.Status, text); } public static WorkflowRulesEditorActivityUpdate ToolCall(string toolName) { return new WorkflowRulesEditorActivityUpdate(WorkflowRulesEditorActivityKind.ToolCall, toolName); } public static WorkflowRulesEditorActivityUpdate Thinking(string text) { return new WorkflowRulesEditorActivityUpdate(WorkflowRulesEditorActivityKind.Thinking, text); } } public interface IWorkflowRulesEditorChatPipeline { Task SendAsync( IReadOnlyList conversation, string userMessage, CancellationToken cancellationToken, Action? activityChanged = null); }