mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-09-05 09:17:47 +02:00
Disable values update on use stream in interrupt events (#5041)
This commit is contained in:
@@ -894,7 +894,13 @@ export function useStream<
|
||||
if (event === "events") options.onLangChainEvent?.(data);
|
||||
if (event === "debug") options.onDebugEvent?.(data);
|
||||
|
||||
if (event === "values") setStreamValues(data);
|
||||
if (event === "values") {
|
||||
if ("__interrupt__" in data) {
|
||||
// don't update values on interrupt values event
|
||||
continue;
|
||||
}
|
||||
setStreamValues(data);
|
||||
}
|
||||
if (event === "messages") {
|
||||
const [serialized] = data;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user