fix: use active agent for streaming author fallback

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
David Kaya
2026-04-01 19:40:46 +02:00
co-authored by Copilot
parent 13bcc44f1a
commit 423d45fa1b
2 changed files with 63 additions and 0 deletions
@@ -353,6 +353,14 @@ public sealed class CopilotWorkflowRunner : ITurnWorkflowRunner
updateAgent = resolvedUpdateAgent;
authorName = resolvedUpdateAgent.AgentName;
}
else if (state.ActiveAgent is AgentIdentity activeAgent)
{
updateAgent = activeAgent;
authorName = activeAgent.AgentName;
TraceHandoff(
command,
$"Agent response update fell back to active agent {activeAgent.AgentName} ({activeAgent.AgentId}) for executor '{update.ExecutorId}' and message '{update.Update.MessageId ?? "<none>"}'.");
}
if (updateAgent.HasValue)
{