mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Python: Clean left-over WorkflowCompletedEvent (#884)
* Clean left-over WorkflowCompletedEvent * Improve comments * Fix type check error
This commit is contained in:
committed by
GitHub
Unverified
parent
06827e9f1a
commit
36933de345
@@ -1621,7 +1621,7 @@ class AgentExecutor(Executor):
|
||||
async def _run_agent_and_emit(self, ctx: WorkflowContext[AgentExecutorResponse]) -> None:
|
||||
"""Execute the underlying agent, emit events, and enqueue response.
|
||||
|
||||
Terminal detection & WorkflowCompletedEvent emission are handled centrally in Runner.
|
||||
Terminal detection is handled centrally in Runner.
|
||||
This method only produces AgentRunEvent/AgentRunUpdateEvent plus enqueues an
|
||||
AgentExecutorResponse message for routing.
|
||||
"""
|
||||
|
||||
@@ -288,7 +288,7 @@ class Runner:
|
||||
tasks = [_deliver_message_inner(edge_runner, message) for edge_runner in associated_edge_runners]
|
||||
if not tasks:
|
||||
# No outgoing edges. If this is an AgentExecutorResponse, treat it as an
|
||||
# intentional terminal emission and emit a WorkflowCompletedEvent here.
|
||||
# intentional terminal emission and emit a WorkflowOutputEvent here.
|
||||
# (Previously this relied on the executor to emit, but AgentExecutor only
|
||||
# sends an AgentExecutorResponse message; centralized completion keeps the
|
||||
# contract consistent with other executors.)
|
||||
|
||||
Reference in New Issue
Block a user