@axiom-lattice/react-sdk 2.1.2 → 2.1.4

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.mjs CHANGED
@@ -101,7 +101,7 @@ function useChat(threadId, options = {}) {
101
101
  const updatedMessages = chunkMessageMerger.current.getMessages();
102
102
  setState((prev) => ({
103
103
  ...prev,
104
- interrupts: interrupt ? [interrupt] : void 0,
104
+ //interrupts: interrupt ? [interrupt] : undefined,
105
105
  todos: todos || prev.todos,
106
106
  messages: updatedMessages,
107
107
  isLoading: true,
@@ -257,12 +257,12 @@ function useChat(threadId, options = {}) {
257
257
  }));
258
258
  if (options.enableResumeStream && fetchedMessages.length > 0) {
259
259
  const lastMessage = fetchedMessages[fetchedMessages.length - 1];
260
- const lastContent = typeof lastMessage.content === "string" ? lastMessage.content : JSON.stringify(lastMessage.content || "");
260
+ chunkMessageMerger.current.removeMessageById(lastMessage.id);
261
261
  const stopResumeStream = client.resumeStream(
262
262
  {
263
263
  threadId,
264
264
  messageId: lastMessage.id,
265
- knownContent: lastContent,
265
+ knownContent: "",
266
266
  pollInterval: options.resumeStreamPollInterval || 100
267
267
  },
268
268
  handleStreamEvent,