Skip to content

Commit dd7e79d

Browse files
committed
add missing done event when canceling the workflow
1 parent 8fe8a91 commit dd7e79d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

templates/components/agents/python/deep_research/app/workflows/deep_research.py

+9
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,15 @@ async def analyze(
159159
user_request=self.user_request,
160160
)
161161
if res.decision == "cancel":
162+
ctx.write_event_to_stream(
163+
DataEvent(
164+
type="deep_research_event",
165+
data={
166+
"event": "analyze",
167+
"state": "done",
168+
},
169+
)
170+
)
162171
return StopEvent(
163172
result=res.cancel_reason,
164173
)

0 commit comments

Comments
 (0)