From 5d49b1b0e20fd18a1931fc287e36b2c484c753f1 Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Fri, 3 Nov 2023 16:32:27 -0500 Subject: [PATCH] Fix CurrentAgentId. --- .../BotSharp.Core/Routing/RoutingService.InvokeAgent.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs index 8d5f18de..6fde9dce 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InvokeAgent.cs @@ -37,9 +37,11 @@ public partial class RoutingService } else { - dialogs.Add(RoleDialogModel.From(message, + message = RoleDialogModel.From(message, role: AgentRole.Assistant, - content: response.Content)); + content: response.Content); + message.CurrentAgentId = agent.Id; + dialogs.Add(message); } return true;