@@ -200,7 +200,7 @@ export class LangGraphAgent extends AbstractAgent {
200
200
checkpointId : fork . checkpoint . checkpoint_id ! ,
201
201
streamMode,
202
202
} ) ,
203
- state : timeTravelCheckpoint ,
203
+ state : timeTravelCheckpoint as ThreadState < State > ,
204
204
streamMode,
205
205
} ;
206
206
}
@@ -486,7 +486,7 @@ export class LangGraphAgent extends AbstractAgent {
486
486
this . endStep ( )
487
487
this . dispatchEvent ( {
488
488
type : EventType . STATE_SNAPSHOT ,
489
- snapshot : this . getStateSnapshot ( state . values ) ,
489
+ snapshot : this . getStateSnapshot ( state ) ,
490
490
} ) ;
491
491
this . dispatchEvent ( {
492
492
type : EventType . MESSAGES_SNAPSHOT ,
@@ -707,7 +707,7 @@ export class LangGraphAgent extends AbstractAgent {
707
707
this . activeRun ! . manuallyEmittedState = event . data ;
708
708
this . dispatchEvent ( {
709
709
type : EventType . STATE_SNAPSHOT ,
710
- snapshot : this . getStateSnapshot ( this . activeRun ! . manuallyEmittedState ! ) ,
710
+ snapshot : this . getStateSnapshot ( { values : this . activeRun ! . manuallyEmittedState ! } as ThreadState < State > ) ,
711
711
rawEvent : event ,
712
712
} ) ;
713
713
}
@@ -767,7 +767,8 @@ export class LangGraphAgent extends AbstractAgent {
767
767
}
768
768
}
769
769
770
- getStateSnapshot ( state : State ) {
770
+ getStateSnapshot ( threadState : ThreadState < State > ) {
771
+ let state = threadState . values
771
772
const schemaKeys = this . activeRun ! . schemaKeys ! ;
772
773
// Do not emit state keys that are not part of the output schema
773
774
if ( schemaKeys ?. output ) {
0 commit comments