@overmap-ai/core 1.0.57-project-view-only-flag.0 → 1.0.57

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.
@@ -8278,13 +8278,16 @@ var __publicField = (obj, key, value) => {
8278
8278
  queryParams: { conversation_id: conversationId }
8279
8279
  }).then((response) => {
8280
8280
  const conversation = store.getState().agentsReducer.conversations[conversationId];
8281
- if (!conversation) {
8281
+ if (!(conversation == null ? void 0 : conversation.offline_id)) {
8282
8282
  throw new Error("Conversation not found");
8283
8283
  }
8284
+ if (!Array.isArray(response)) {
8285
+ response = [response];
8286
+ }
8284
8287
  store.dispatch(
8285
8288
  updateConversation({
8286
- offline_id: conversationId,
8287
- tiptap_content: [...conversation.tiptap_content || [], response.response]
8289
+ ...conversation,
8290
+ tiptap_content: [...conversation.tiptap_content || [], ...response]
8288
8291
  })
8289
8292
  );
8290
8293
  });