Skip to content

Commit 6c93c8c

Browse files
committed
feat: update AI generation behavior to overwrite existing values with new option
1 parent 5b9a5e0 commit 6c93c8c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

custom/VisionAction.vue

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -140,19 +140,19 @@
140140
<div class="flex items-center justify-between mb-2 w-full">
141141
<div class="flex items-center justify-center gap-2">
142142
<IconShieldSolid class="w-6 h-6 text-lightPrimary dark:text-darkPrimary" />
143-
<p class="sm:text-base text-sm">{{ t('Do not overwrite existing values') }}</p>
143+
<p class="sm:text-base text-sm">{{ t('Overwrite existing values') }}</p>
144144
<Tooltip>
145145
<IconInfoCircleSolid class="w-5 h-5 me-2 text-lightPrimary dark:text-darkPrimary"/>
146146
<template #tooltip>
147-
<p class="max-w-64">{{ t('When enabled, the AI will skip generating content for fields that already have data. This helps to preserve existing information and avoid overwriting valuable content.') }}</p>
147+
<p class="max-w-64">{{ t('When enabled, the AI will overwrite content for fields that already have data. When off - this helps to preserve existing information and avoid overwriting valuable content.') }}</p>
148148
</template>
149149
</Tooltip>
150150
</div>
151151
<Toggle
152-
v-model="skipFilledFieldsForGeneration"
152+
v-model="overwriteExistingValues"
153153
/>
154154
</div>
155-
<div :class="skipFilledFieldsForGeneration === false ? 'opacity-100' : 'opacity-0'" class="flex items-center text-yellow-800 bg-yellow-100 p-2 rounded-md border border-yellow-300">
155+
<div :class="overwriteExistingValues === true ? 'opacity-100' : 'opacity-0'" class="flex items-center text-yellow-800 bg-yellow-100 p-2 rounded-md border border-yellow-300">
156156
<IconExclamationTriangle class="w-6 h-6 me-2"/>
157157
<p class="sm:text-base text-sm">{{ t('Warning: Existing values will be overwritten.') }}</p>
158158
</div>
@@ -236,7 +236,7 @@ const generationPrompts = ref<any>({});
236236
const isDataSaved = ref(false);
237237
238238
const regeneratingFieldsStatus = ref<Record<string, Record<string, boolean>>>({});
239-
const skipFilledFieldsForGeneration = ref<boolean>(true);
239+
const overwriteExistingValues = ref<boolean>(false);
240240
241241
const openDialog = async () => {
242242
window.addEventListener('beforeunload', beforeUnloadHandler);
@@ -668,7 +668,7 @@ async function runAiAction({
668668
actionType: actionType,
669669
recordId: checkbox,
670670
...(customPrompt !== undefined ? { customPrompt: JSON.stringify(customPrompt) } : {}),
671-
filterFilledFields: skipFilledFieldsForGeneration.value,
671+
filterFilledFields: !overwriteExistingValues.value,
672672
},
673673
silentError: true,
674674
});

0 commit comments

Comments
 (0)