@credithub/harlan-components 1.63.1 → 1.63.2

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.
@@ -200,13 +200,12 @@ var GenerativeAI = function (_a) {
200
200
  }
201
201
  }, [messageHistory, serializedData, streamMode, chatLoading, abortChat]);
202
202
  useEffect(function () {
203
- if (chatQueryData &&
204
- streamMode === 'chat' &&
205
- !chatLoading &&
206
- messageHistory.length > 0) {
203
+ if (chatQueryData && streamMode === 'chat') {
207
204
  refetchChat();
205
+ // evita refetchs subsequentes para o mesmo chatQueryData
206
+ setChatQueryData(undefined);
208
207
  }
209
- }, [chatQueryData, streamMode, chatLoading, refetchChat, messageHistory]);
208
+ }, [chatQueryData, streamMode, refetchChat]);
210
209
  var handleStopStream = function () {
211
210
  abortChat();
212
211
  };