@overmap-ai/core 1.0.67-service-fixes.0 → 1.0.67
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,6 +3963,9 @@ 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
|
+
}
|
|
3966
3969
|
const asset = selectAssetById(payload.offline_id)(store.getState());
|
|
3967
3970
|
if (!asset) {
|
|
3968
3971
|
throw new Error(`No asset with id ${payload.offline_id} found in the store`);
|
|
@@ -3971,9 +3974,6 @@ class AssetService extends BaseApiService {
|
|
|
3971
3974
|
...asset,
|
|
3972
3975
|
...payload
|
|
3973
3976
|
};
|
|
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,19 +6915,7 @@ class AgentService extends BaseApiService {
|
|
|
6915
6915
|
blocks: ["prompt"],
|
|
6916
6916
|
queryParams: { conversation_id: conversationId }
|
|
6917
6917
|
}).then((response) => {
|
|
6918
|
-
|
|
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
|
-
);
|
|
6918
|
+
this.dispatch(updateConversation(response));
|
|
6931
6919
|
});
|
|
6932
6920
|
}
|
|
6933
6921
|
async fetchDetails(conversationId) {
|