@adminforth/bulk-ai-flow 1.17.2 → 1.17.4
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/build.log +2 -2
- package/custom/VisionAction.vue +23 -1
- package/dist/custom/VisionAction.vue +23 -1
- package/index.ts +1 -1
- package/package.json +2 -2
package/build.log
CHANGED
|
@@ -13,5 +13,5 @@ custom/package-lock.json
|
|
|
13
13
|
custom/package.json
|
|
14
14
|
custom/tsconfig.json
|
|
15
15
|
|
|
16
|
-
sent 88,
|
|
17
|
-
total size is
|
|
16
|
+
sent 88,969 bytes received 172 bytes 178,282.00 bytes/sec
|
|
17
|
+
total size is 88,333 speedup is 0.99
|
package/custom/VisionAction.vue
CHANGED
|
@@ -137,7 +137,9 @@ import VisionTable from './VisionTable.vue'
|
|
|
137
137
|
import adminforth from '@/adminforth';
|
|
138
138
|
import { useI18n } from 'vue-i18n';
|
|
139
139
|
import { AdminUser, type AdminForthResourceCommon } from '@/types/Common';
|
|
140
|
-
import {
|
|
140
|
+
import { useCoreStore } from '@/stores/core';
|
|
141
|
+
|
|
142
|
+
const coreStore = useCoreStore();
|
|
141
143
|
|
|
142
144
|
const { t } = useI18n();
|
|
143
145
|
const props = defineProps<{
|
|
@@ -658,6 +660,10 @@ async function runAiAction({
|
|
|
658
660
|
body: { jobId },
|
|
659
661
|
});
|
|
660
662
|
//check for errors
|
|
663
|
+
if (!jobResponse) {
|
|
664
|
+
isAtLeastOneInProgress = true;
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
661
667
|
if (jobResponse?.error) {
|
|
662
668
|
console.error(`Error during ${actionType}:`, jobResponse.error);
|
|
663
669
|
break;
|
|
@@ -839,6 +845,14 @@ async function uploadImage(imgBlob, id, fieldName) {
|
|
|
839
845
|
}
|
|
840
846
|
|
|
841
847
|
function regenerateImages(recordInfo: any) {
|
|
848
|
+
if (coreStore.isInternetError) {
|
|
849
|
+
adminforth.alert({
|
|
850
|
+
message: t('Cannot regenerate images while internet connection is lost. Please check your connection and try again.'),
|
|
851
|
+
variant: 'danger',
|
|
852
|
+
timeout: 'unlimited',
|
|
853
|
+
});
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
842
856
|
isGeneratingImages.value = true;
|
|
843
857
|
runAiAction({
|
|
844
858
|
endpoint: 'initial_image_generate',
|
|
@@ -950,6 +964,14 @@ function checkAndAddNewFieldsToPrompts(savedPrompts, defaultPrompts) {
|
|
|
950
964
|
}
|
|
951
965
|
|
|
952
966
|
async function regenerateCell(recordInfo: any) {
|
|
967
|
+
if (coreStore.isInternetError) {
|
|
968
|
+
adminforth.alert({
|
|
969
|
+
message: t('Cannot regenerate column while internet connection is lost. Please check your connection and try again.'),
|
|
970
|
+
variant: 'danger',
|
|
971
|
+
timeout: 'unlimited',
|
|
972
|
+
});
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
953
975
|
if (!regeneratingFieldsStatus.value[recordInfo.recordId]) {
|
|
954
976
|
regeneratingFieldsStatus.value[recordInfo.recordId] = {};
|
|
955
977
|
}
|
|
@@ -137,7 +137,9 @@ import VisionTable from './VisionTable.vue'
|
|
|
137
137
|
import adminforth from '@/adminforth';
|
|
138
138
|
import { useI18n } from 'vue-i18n';
|
|
139
139
|
import { AdminUser, type AdminForthResourceCommon } from '@/types/Common';
|
|
140
|
-
import {
|
|
140
|
+
import { useCoreStore } from '@/stores/core';
|
|
141
|
+
|
|
142
|
+
const coreStore = useCoreStore();
|
|
141
143
|
|
|
142
144
|
const { t } = useI18n();
|
|
143
145
|
const props = defineProps<{
|
|
@@ -658,6 +660,10 @@ async function runAiAction({
|
|
|
658
660
|
body: { jobId },
|
|
659
661
|
});
|
|
660
662
|
//check for errors
|
|
663
|
+
if (!jobResponse) {
|
|
664
|
+
isAtLeastOneInProgress = true;
|
|
665
|
+
continue;
|
|
666
|
+
}
|
|
661
667
|
if (jobResponse?.error) {
|
|
662
668
|
console.error(`Error during ${actionType}:`, jobResponse.error);
|
|
663
669
|
break;
|
|
@@ -839,6 +845,14 @@ async function uploadImage(imgBlob, id, fieldName) {
|
|
|
839
845
|
}
|
|
840
846
|
|
|
841
847
|
function regenerateImages(recordInfo: any) {
|
|
848
|
+
if (coreStore.isInternetError) {
|
|
849
|
+
adminforth.alert({
|
|
850
|
+
message: t('Cannot regenerate images while internet connection is lost. Please check your connection and try again.'),
|
|
851
|
+
variant: 'danger',
|
|
852
|
+
timeout: 'unlimited',
|
|
853
|
+
});
|
|
854
|
+
return;
|
|
855
|
+
}
|
|
842
856
|
isGeneratingImages.value = true;
|
|
843
857
|
runAiAction({
|
|
844
858
|
endpoint: 'initial_image_generate',
|
|
@@ -950,6 +964,14 @@ function checkAndAddNewFieldsToPrompts(savedPrompts, defaultPrompts) {
|
|
|
950
964
|
}
|
|
951
965
|
|
|
952
966
|
async function regenerateCell(recordInfo: any) {
|
|
967
|
+
if (coreStore.isInternetError) {
|
|
968
|
+
adminforth.alert({
|
|
969
|
+
message: t('Cannot regenerate column while internet connection is lost. Please check your connection and try again.'),
|
|
970
|
+
variant: 'danger',
|
|
971
|
+
timeout: 'unlimited',
|
|
972
|
+
});
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
953
975
|
if (!regeneratingFieldsStatus.value[recordInfo.recordId]) {
|
|
954
976
|
regeneratingFieldsStatus.value[recordInfo.recordId] = {};
|
|
955
977
|
}
|
package/index.ts
CHANGED
|
@@ -7,7 +7,7 @@ import { RateLimiter } from "adminforth";
|
|
|
7
7
|
import { randomUUID } from "crypto";
|
|
8
8
|
|
|
9
9
|
const STUB_MODE = false;
|
|
10
|
-
const jobs = new Map();
|
|
10
|
+
const jobs = new Map();
|
|
11
11
|
export default class BulkAiFlowPlugin extends AdminForthPlugin {
|
|
12
12
|
options: PluginOptions;
|
|
13
13
|
uploadPlugin: AdminForthPlugin;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adminforth/bulk-ai-flow",
|
|
3
|
-
"version": "1.17.
|
|
3
|
+
"version": "1.17.4",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"handlebars": "^4.7.8"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
|
-
"adminforth": "^2.13.0-next.
|
|
33
|
+
"adminforth": "^2.13.0-next.51"
|
|
34
34
|
},
|
|
35
35
|
"release": {
|
|
36
36
|
"plugins": [
|