From 97115c64969bea5b48f5a9c30863c5aeca48ec7b Mon Sep 17 00:00:00 2001 From: Haiping Chen Date: Mon, 5 May 2025 10:10:32 -0500 Subject: [PATCH] Fix InstructLoop --- .../BotSharp.Core/Routing/RoutingService.InstructLoop.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InstructLoop.cs b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InstructLoop.cs index 76cf5047..364e7198 100644 --- a/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InstructLoop.cs +++ b/src/Infrastructure/BotSharp.Core/Routing/RoutingService.InstructLoop.cs @@ -15,6 +15,8 @@ public partial class RoutingService var convService = _services.GetRequiredService(); var storage = _services.GetRequiredService(); + _router = await agentService.GetAgent(message.CurrentAgentId); + var states = _services.GetRequiredService(); var executor = _services.GetRequiredService();