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:
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<details class="rounded-2xl border border-white/10 bg-zinc-950/40 px-4 py-3">
|
||||
<details v-if="!embedded" class="rounded-2xl border border-white/10 bg-zinc-950/40 px-4 py-3">
|
||||
<summary class="cursor-pointer text-sm font-medium text-zinc-200">
|
||||
Global locks
|
||||
<span class="ml-2 font-normal text-xs text-zinc-500">Every shot inherits these. Each clip adds one beat.</span>
|
||||
@@ -7,31 +7,45 @@
|
||||
<p class="mt-2 text-xs text-zinc-500">
|
||||
Shared standards for last-frame I2V. Later shots get a compact <span class="text-zinc-300">[INHERITS]</span> line, not this whole block again.
|
||||
</p>
|
||||
<textarea
|
||||
:value="modelValue"
|
||||
rows="10"
|
||||
class="mt-3 max-h-64 w-full overflow-y-auto rounded-xl border border-white/10 bg-zinc-950 px-3 py-2 text-sm outline-none ring-amber-300/40 placeholder:text-zinc-600 [overflow-wrap:anywhere] focus:ring-2"
|
||||
:placeholder="placeholder"
|
||||
@input="emit('update:modelValue', ($event.target as HTMLTextAreaElement).value)"
|
||||
/>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-300 hover:border-amber-300/40 hover:text-amber-100"
|
||||
@click="insertTemplate"
|
||||
>
|
||||
Insert template
|
||||
</button>
|
||||
<button
|
||||
v-if="modelValue.trim()"
|
||||
type="button"
|
||||
class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-400 hover:text-white"
|
||||
@click="emit('update:modelValue', '')"
|
||||
>
|
||||
Clear
|
||||
</button>
|
||||
<div class="mt-3">
|
||||
<PromptField
|
||||
:model-value="modelValue"
|
||||
:rows="10"
|
||||
title="Global locks"
|
||||
write-label="Write locks"
|
||||
edit-label="View / edit locks"
|
||||
textarea-class="max-h-64"
|
||||
:placeholder="placeholder"
|
||||
@update:model-value="emit('update:modelValue', $event)"
|
||||
/>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<button type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-300 hover:border-amber-300/40 hover:text-amber-100" @click="insertTemplate">Insert template</button>
|
||||
<button v-if="modelValue.trim()" type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-400 hover:text-white" @click="emit('update:modelValue', '')">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</details>
|
||||
<div v-else>
|
||||
<p class="text-sm font-medium text-zinc-200">Global locks</p>
|
||||
<p class="mt-0.5 text-xs text-zinc-500">
|
||||
Shared standards for last-frame I2V. Later shots get a compact <span class="text-zinc-300">[INHERITS]</span> line, not this whole block again.
|
||||
</p>
|
||||
<div class="mt-3">
|
||||
<PromptField
|
||||
:model-value="modelValue"
|
||||
:rows="10"
|
||||
title="Global locks"
|
||||
write-label="Write locks"
|
||||
edit-label="View / edit locks"
|
||||
textarea-class="max-h-64"
|
||||
:placeholder="placeholder"
|
||||
@update:model-value="emit('update:modelValue', $event)"
|
||||
/>
|
||||
<div class="mt-2 flex flex-wrap gap-2">
|
||||
<button type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-300 hover:border-amber-300/40 hover:text-amber-100" @click="insertTemplate">Insert template</button>
|
||||
<button v-if="modelValue.trim()" type="button" class="rounded-lg border border-white/15 px-2.5 py-1 text-xs text-zinc-400 hover:text-white" @click="emit('update:modelValue', '')">Clear</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
@@ -39,6 +53,7 @@ import { DEFAULT_GLOBAL_LOCKS } from '~/utils/globalLocks'
|
||||
|
||||
defineProps<{
|
||||
modelValue: string
|
||||
embedded?: boolean
|
||||
}>()
|
||||
|
||||
const emit = defineEmits<{
|
||||
|
||||
Reference in New Issue
Block a user