Skip to content

Commit 6132f0c

Browse files
committed
fix: use fallback when closing off active step
1 parent 1787adb commit 6132f0c

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ def end_step(self):
728728
dispatch = self._dispatch_event(
729729
StepFinishedEvent(
730730
type=EventType.STEP_FINISHED,
731-
step_name=self.active_run["node_name"]
731+
step_name=self.active_run["node_name"] or self.active_step
732732
)
733733
)
734734

typescript-sdk/integrations/langgraph/src/agent.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ export class LangGraphAgent extends AbstractAgent {
977977
}
978978
this.dispatchEvent({
979979
type: EventType.STEP_FINISHED,
980-
stepName: this.activeRun!.nodeName!,
980+
stepName: this.activeRun!.nodeName! ?? this.activeStep,
981981
});
982982
this.activeRun!.nodeName = undefined;
983983
this.activeStep = undefined;

0 commit comments

Comments
 (0)