@overmap-ai/core 1.0.67-fix-agent-service.0 → 1.0.67-service-fixes.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.
package/dist/overmap-core.js
CHANGED
|
@@ -3963,9 +3963,6 @@ class AssetService extends BaseApiService {
|
|
|
3963
3963
|
}
|
|
3964
3964
|
update(payload) {
|
|
3965
3965
|
const { store } = this.client;
|
|
3966
|
-
if (!payload.canvas_marker && !payload.geo_marker) {
|
|
3967
|
-
throw new Error("Asset must have either a canvas_marker or geo_marker");
|
|
3968
|
-
}
|
|
3969
3966
|
const asset = selectAssetById(payload.offline_id)(store.getState());
|
|
3970
3967
|
if (!asset) {
|
|
3971
3968
|
throw new Error(`No asset with id ${payload.offline_id} found in the store`);
|
|
@@ -3974,6 +3971,9 @@ class AssetService extends BaseApiService {
|
|
|
3974
3971
|
...asset,
|
|
3975
3972
|
...payload
|
|
3976
3973
|
};
|
|
3974
|
+
if (!updatedAsset.canvas_marker && !updatedAsset.geo_marker) {
|
|
3975
|
+
throw new Error("Asset must have either a canvas_marker or geo_marker");
|
|
3976
|
+
}
|
|
3977
3977
|
this.dispatch(updateAsset(updatedAsset));
|
|
3978
3978
|
const promise = this.enqueueRequest({
|
|
3979
3979
|
description: "Edit asset",
|
|
@@ -6915,7 +6915,19 @@ class AgentService extends BaseApiService {
|
|
|
6915
6915
|
blocks: ["prompt"],
|
|
6916
6916
|
queryParams: { conversation_id: conversationId }
|
|
6917
6917
|
}).then((response) => {
|
|
6918
|
-
|
|
6918
|
+
const conversation = store.getState().agentsReducer.instances[conversationId];
|
|
6919
|
+
if (!(conversation == null ? void 0 : conversation.offline_id)) {
|
|
6920
|
+
throw new Error("Conversation not found");
|
|
6921
|
+
}
|
|
6922
|
+
if (!Array.isArray(response)) {
|
|
6923
|
+
response = [response];
|
|
6924
|
+
}
|
|
6925
|
+
this.dispatch(
|
|
6926
|
+
updateConversation({
|
|
6927
|
+
...conversation,
|
|
6928
|
+
tiptap_content: [...conversation.tiptap_content || [], ...response]
|
|
6929
|
+
})
|
|
6930
|
+
);
|
|
6919
6931
|
});
|
|
6920
6932
|
}
|
|
6921
6933
|
async fetchDetails(conversationId) {
|