@axiom-lattice/react-sdk 2.1.4 → 2.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -266,11 +266,14 @@ function useChat(threadId, options = {}) {
|
|
|
266
266
|
pollInterval: options.resumeStreamPollInterval || 100
|
|
267
267
|
},
|
|
268
268
|
handleStreamEvent,
|
|
269
|
-
() => {
|
|
269
|
+
async () => {
|
|
270
270
|
setState((prev) => ({
|
|
271
271
|
...prev,
|
|
272
272
|
isLoading: false
|
|
273
273
|
}));
|
|
274
|
+
if (options.enableReturnStateWhenStreamCompleted) {
|
|
275
|
+
await fetchAndUpdateAgentState(threadId);
|
|
276
|
+
}
|
|
274
277
|
stopStreamingRef.current = null;
|
|
275
278
|
},
|
|
276
279
|
(error) => {
|