Add null-check for agent in StreamingLogHook

This commit is contained in:
aden.chen 2025-05-12 10:37:25 +08:00
parent 872b57fa80
commit 3dda7afc7c

View file

@ -293,7 +293,7 @@ public class StreamingLogHook : ConversationHookBase, IContentGeneratingHook, IR
var routing = _services.GetRequiredService<IRoutingService>();
var agentId = routing.Context.GetCurrentAgentId();
var agent = await _agentService.GetAgent(agentId);
if (agent == null) return;
var input = new ContentLogInputModel()
{
Name = agent.Name,