mirror of
https://github.com/langchain-ai/langgraphjs.git
synced 2026-07-23 17:45:23 -04:00
fix(sdk-js): reset isLoading state when switching threads mid-run (#1790)
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@langchain/langgraph-sdk": patch
|
||||
---
|
||||
|
||||
Ensure `isLoading` is set to `false` when cancelling the stream due to thread ID change
|
||||
@@ -358,7 +358,7 @@ export class StreamManager<
|
||||
this.abortRef = new AbortController();
|
||||
|
||||
// Set the stream state to null
|
||||
this.setState({ error: undefined, values: null });
|
||||
this.setState({ error: undefined, values: null, isLoading: false });
|
||||
|
||||
// Clear any pending messages
|
||||
this.messages.clear();
|
||||
|
||||
Reference in New Issue
Block a user