-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/admin forth/995/add "messageforcont and abilit #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The head ref may contain hidden characters: "feature/AdminForth/995/add-\"messageforcont-and-abilit"
Changes from all commits
47c2d47
2b2c6f6
3702ae8
62dfa3b
613a29c
443e91d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -143,7 +143,7 @@ const sliderRef = ref(null) | |||||
|
|
||||||
| const prompt = ref(''); | ||||||
| const emit = defineEmits(['close', 'selectImage', 'error', 'updateCarouselIndex']); | ||||||
| const props = defineProps(['meta', 'record', 'images', 'recordId', 'prompt', 'fieldName', 'isError', 'errorMessage', 'carouselImageIndex', 'regenerateImagesRefreshRate','sourceImage']); | ||||||
| const props = defineProps(['meta', 'record', 'images', 'recordId', 'prompt', 'fieldName', 'isError', 'errorMessage', 'carouselImageIndex', 'regenerateImagesRefreshRate','sourceImage', 'imageGenerationPrompts']); | ||||||
| const images = ref([]); | ||||||
| const loading = ref(false); | ||||||
| const attachmentFiles = ref<string[]>([]) | ||||||
|
|
@@ -154,7 +154,7 @@ onMounted(async () => { | |||||
| } | ||||||
| const temp = await getGenerationPrompt() || ''; | ||||||
| attachmentFiles.value = props.sourceImage || []; | ||||||
| prompt.value = temp[props.fieldName]; | ||||||
| prompt.value = Object.keys(JSON.parse(temp))[0]; | ||||||
| await nextTick(); | ||||||
|
|
||||||
| const currentIndex = props.carouselImageIndex || 0; | ||||||
|
|
@@ -212,12 +212,20 @@ async function getHistoricalAverage() { | |||||
| } | ||||||
|
|
||||||
| async function getGenerationPrompt() { | ||||||
| try{ | ||||||
| const [key, ...rest] = props.imageGenerationPrompts.split(":"); | ||||||
| const value = rest.join(":").trim(); | ||||||
|
|
||||||
| const json = { | ||||||
| [key.trim()]: value | ||||||
| }; | ||||||
|
|
||||||
yaroslav8765 marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
| try { | ||||||
| const resp = await callAdminForthApi({ | ||||||
| path: `/plugin/${props.meta.pluginInstanceId}/get_generation_prompts`, | ||||||
| path: `/plugin/${props.meta.pluginInstanceId}/get_image_generation_prompts`, | ||||||
| method: 'POST', | ||||||
| body: { | ||||||
| recordId: props.recordId, | ||||||
| customPrompt: JSON.stringify(json) || {}, | ||||||
|
||||||
| customPrompt: JSON.stringify(json) || {}, | |
| customPrompt: json ? JSON.stringify(json) : '{}', |
Uh oh!
There was an error while loading. Please reload this page.