@overmap-ai/core 1.0.56 → 1.0.57-fix-agent-responses.0

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.
@@ -8337,13 +8337,16 @@ class AgentService extends BaseApiService {
8337
8337
  queryParams: { conversation_id: conversationId }
8338
8338
  }).then((response) => {
8339
8339
  const conversation = store.getState().agentsReducer.conversations[conversationId];
8340
- if (!conversation) {
8340
+ if (!(conversation == null ? void 0 : conversation.offline_id)) {
8341
8341
  throw new Error("Conversation not found");
8342
8342
  }
8343
+ if (!Array.isArray(response)) {
8344
+ response = [response];
8345
+ }
8343
8346
  store.dispatch(
8344
8347
  updateConversation({
8345
- offline_id: conversationId,
8346
- tiptap_content: [...conversation.tiptap_content || [], response.response]
8348
+ ...conversation,
8349
+ tiptap_content: [...conversation.tiptap_content || [], ...response]
8347
8350
  })
8348
8351
  );
8349
8352
  });