fix(sdk-js): reset isLoading state when switching threads mid-run (#1790)

This commit is contained in:
David Duong
2025-11-24 01:31:35 +01:00
committed by GitHub
parent d647700e3d
commit 1f6efc594a
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@langchain/langgraph-sdk": patch
---
Ensure `isLoading` is set to `false` when cancelling the stream due to thread ID change
+1 -1
View File
@@ -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();