Skip to content

Commit b143fc6

Browse files
authored
fix: fix how intermediate state is read and persisted (#726)
* fix: fix how intermediate state is read and persisted
1 parent 6fab03a commit b143fc6

File tree

1 file changed

+3
-3
lines changed
  • integrations/langgraph/typescript/src

1 file changed

+3
-3
lines changed

integrations/langgraph/typescript/src/agent.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,9 +503,9 @@ export class LangGraphAgent extends AbstractAgent {
503503
(eventType === LangGraphEventTypes.OnCustomEvent &&
504504
chunkData.name === CustomEventNames.Exit);
505505

506-
this.activeRun!.exitingNode =
507-
this.activeRun!.nodeName === currentNodeName &&
508-
eventType === LangGraphEventTypes.OnChainEnd;
506+
if (eventType === LangGraphEventTypes.OnChainEnd && this.activeRun!.nodeName === currentNodeName) {
507+
this.activeRun!.exitingNode = true;
508+
}
509509
if (this.activeRun!.exitingNode) {
510510
this.activeRun!.manuallyEmittedState = null;
511511
}

0 commit comments

Comments
 (0)