Skip to content

Commit 8455fe6

Browse files
committed
feat(langgraph-py): several fixes
1 parent a3c3fd7 commit 8455fe6

File tree

1 file changed

+5
-6
lines changed
  • typescript-sdk/integrations/langgraph/python/ag_ui_langgraph

1 file changed

+5
-6
lines changed

typescript-sdk/integrations/langgraph/python/ag_ui_langgraph/agent.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,12 +243,6 @@ async def _handle_stream_events(self, input: RunAgentInput) -> AsyncGenerator[st
243243
StepStartedEvent(type=EventType.STEP_STARTED, step_name=self.active_run["node_name"])
244244
)
245245

246-
# if tasks is None:
247-
yield self._dispatch_event(
248-
StepFinishedEvent(type=EventType.STEP_FINISHED, step_name=self.active_run["node_name"])
249-
)
250-
self.active_run["node_name"] = None
251-
252246
state_values = state.values if state.values else state
253247
yield self._dispatch_event(
254248
StateSnapshotEvent(type=EventType.STATE_SNAPSHOT, snapshot=self.get_state_snapshot(state_values))
@@ -261,6 +255,11 @@ async def _handle_stream_events(self, input: RunAgentInput) -> AsyncGenerator[st
261255
)
262256
)
263257

258+
yield self._dispatch_event(
259+
StepFinishedEvent(type=EventType.STEP_FINISHED, step_name=self.active_run["node_name"])
260+
)
261+
self.active_run["node_name"] = None
262+
264263
yield self._dispatch_event(
265264
RunFinishedEvent(type=EventType.RUN_FINISHED, thread_id=thread_id, run_id=self.active_run["id"])
266265
)

0 commit comments

Comments
 (0)