mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
fix(langgraph): CheckpointTask.state can be a StateSnapshot (#6201)
This adds `StateSnapshot` to the union type annotation of `CheckpointTask.state`. The annotation was previously incomplete: `map_debug_checkpoint()` generates `CheckpointPayload` objects from `PregelTask` objects, and the `state` field in `PregelTask` is of type `None | RunnableConfig | StateSnapshot`.
This commit is contained in:
@@ -48,7 +48,7 @@ class CheckpointTask(TypedDict):
|
||||
name: str
|
||||
error: str | None
|
||||
interrupts: list[dict]
|
||||
state: RunnableConfig | None
|
||||
state: StateSnapshot | RunnableConfig | None
|
||||
|
||||
|
||||
class CheckpointPayload(TypedDict):
|
||||
|
||||
Reference in New Issue
Block a user