This commit is contained in:
Chris
2025-11-13 10:16:47 -08:00
committed by GitHub
Unverified
parent b404fdfb70
commit 63352137f3
3 changed files with 13 additions and 1 deletions
@@ -19,6 +19,7 @@ internal sealed class AddConversationMessageExecutor(AddConversationMessage mode
{
Throw.IfNull(this.Model.ConversationId, $"{nameof(this.Model)}.{nameof(this.Model.ConversationId)}");
string conversationId = this.Evaluator.GetValue(this.Model.ConversationId).Value;
bool isWorkflowConversation = context.IsWorkflowConversation(conversationId, out string? _);
ChatMessage newMessage = new(this.Model.Role.Value.ToChatRole(), [.. this.GetContent()]) { AdditionalProperties = this.GetMetadata() };
@@ -27,6 +28,11 @@ internal sealed class AddConversationMessageExecutor(AddConversationMessage mode
await this.AssignAsync(this.Model.Message?.Path, newMessage.ToRecord(), context).ConfigureAwait(false);
if (isWorkflowConversation)
{
await context.AddEventAsync(new AgentRunResponseEvent(this.Id, new AgentRunResponse(newMessage)), cancellationToken).ConfigureAwait(false);
}
return default;
}
@@ -20,6 +20,7 @@ internal sealed class CopyConversationMessagesExecutor(CopyConversationMessages
{
Throw.IfNull(this.Model.ConversationId, $"{nameof(this.Model)}.{nameof(this.Model.ConversationId)}");
string conversationId = this.Evaluator.GetValue(this.Model.ConversationId).Value;
bool isWorkflowConversation = context.IsWorkflowConversation(conversationId, out string? _);
IEnumerable<ChatMessage>? inputMessages = this.GetInputMessages();
@@ -29,6 +30,11 @@ internal sealed class CopyConversationMessagesExecutor(CopyConversationMessages
{
await agentProvider.CreateMessageAsync(conversationId, message, cancellationToken).ConfigureAwait(false);
}
if (isWorkflowConversation)
{
await context.AddEventAsync(new AgentRunResponseEvent(this.Id, new AgentRunResponse([.. inputMessages])), cancellationToken).ConfigureAwait(false);
}
}
return default;
@@ -10,7 +10,7 @@
"conversation_count": 2,
"min_action_count": 8,
"min_message_count": 1,
"min_response_count": 0,
"min_response_count": 1,
"actions": {
"start": [
"conversation_create1",