Split prompts into pre/prompt/post and tidy the AIGen video form.
Keep wrappers off the library mid-prompt so Use as input and Extend restore the same split, send stills to xAIGen as hidden inputs, and stop the two-column library from growing with the list. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -271,6 +271,13 @@
|
||||
:disabled="keepingInputBusy"
|
||||
@click="saveFocusedAsInput"
|
||||
>{{ keepingInputBusy ? 'Saving…' : 'Save as input' }}</button>
|
||||
<button
|
||||
v-if="focused.kind === 'still' && backupStudioEnabled"
|
||||
type="button"
|
||||
class="rounded-full border border-white/10 px-3 py-1.5 text-xs text-zinc-300 hover:text-white"
|
||||
:disabled="backupBusy"
|
||||
@click="sendFocusedToBackup"
|
||||
>{{ backupBusy ? 'Sending…' : 'Send to Backup on AIGen only' }}</button>
|
||||
<a
|
||||
v-if="downloadHref"
|
||||
:href="downloadHref"
|
||||
@@ -375,6 +382,8 @@ const filterOptions = [
|
||||
|
||||
const runtimeConfig = useRuntimeConfig()
|
||||
const instanceName = ref(String(runtimeConfig.public.instanceName || 'AIGen'))
|
||||
const backupStudioEnabled = computed(() => Boolean(runtimeConfig.public.backupStudioEnabled))
|
||||
const backupBusy = ref(false)
|
||||
const showPrivacyToggles = computed(() => isXaigenStudio({
|
||||
studio: runtimeConfig.public.studio,
|
||||
instanceName: runtimeConfig.public.instanceName || instanceName.value
|
||||
@@ -762,6 +771,20 @@ function useInStudio(entry: LibraryEntry) {
|
||||
}
|
||||
}
|
||||
|
||||
async function sendFocusedToBackup() {
|
||||
const still = focusedStill.value
|
||||
if (!still || !backupStudioEnabled.value || backupBusy.value) return
|
||||
backupBusy.value = true
|
||||
try {
|
||||
await $fetch(`/api/library/stills/${still.id}/backup`, { method: 'POST' })
|
||||
toast('Sent to Backup as a hidden input.')
|
||||
} catch (error: any) {
|
||||
toast(error?.data?.statusMessage || 'Could not send that still to Backup')
|
||||
} finally {
|
||||
backupBusy.value = false
|
||||
}
|
||||
}
|
||||
|
||||
async function saveFocusedAsInput() {
|
||||
const still = focusedStill.value
|
||||
if (!still || keepingInputBusy.value) return
|
||||
|
||||
Reference in New Issue
Block a user