@overmap-ai/core 1.0.53-add-agent-conversations.6 → 1.0.53-add-agent-conversations.7

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.
@@ -4478,10 +4478,17 @@ const agentsSlice = createSlice({
4478
4478
  throw new Error("Conversation does not exist in history");
4479
4479
  }
4480
4480
  state.conversations[action.payload.offline_id] = action.payload;
4481
+ },
4482
+ updateConversation: (state, action) => {
4483
+ const existing = state.conversations[action.payload.offline_id];
4484
+ if (!existing) {
4485
+ throw new Error("Conversation does not exist in history");
4486
+ }
4487
+ state.conversations[action.payload.offline_id] = { ...existing, ...action.payload };
4481
4488
  }
4482
4489
  }
4483
4490
  });
4484
- const { setConversations, addConversation, setConversation } = agentsSlice.actions;
4491
+ const { setConversations, addConversation, setConversation, updateConversation } = agentsSlice.actions;
4485
4492
  const selectConversationMapping = (state) => state.agentsReducer.conversations;
4486
4493
  const selectConversations = createSelector(
4487
4494
  [selectConversationMapping],
@@ -8532,6 +8539,15 @@ class AgentService extends BaseApiService {
8532
8539
  queryParams: conversationId ? { conversation_id: conversationId } : {}
8533
8540
  });
8534
8541
  }
8542
+ async get(conversationId) {
8543
+ return this.enqueueRequest({
8544
+ description: "Get agent conversation",
8545
+ method: HttpMethod.GET,
8546
+ url: `/agents/conversations/${conversationId}/`,
8547
+ blockers: ["conversation"],
8548
+ blocks: ["conversation"]
8549
+ });
8550
+ }
8535
8551
  async rate(responseId, rating) {
8536
8552
  return this.enqueueRequest({
8537
8553
  description: "Rate agent response",
@@ -17162,6 +17178,7 @@ export {
17162
17178
  updateComponent,
17163
17179
  updateComponentAttachment,
17164
17180
  updateComponentTypeAttachment,
17181
+ updateConversation,
17165
17182
  updateDocumentAttachment,
17166
17183
  updateDocuments,
17167
17184
  updateFormSubmission,