Add permanence refs opens picker, labels inject into INHERITS

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-28 09:20:44 -05:00
co-authored by Cursor
parent fb748e9b6e
commit adc583aad6
4 changed files with 112 additions and 45 deletions
+14 -4
View File
@@ -1,11 +1,11 @@
<template>
<Teleport to="body">
<div class="fixed inset-0 z-40 flex items-start justify-center overflow-y-auto bg-black/70 p-4 sm:p-8" @click.self="emit('close')">
<div v-if="open" class="fixed inset-0 z-40 flex items-start justify-center overflow-y-auto bg-black/70 p-4 sm:p-8" @click.self="emit('close')">
<div class="glass w-full max-w-3xl rounded-3xl p-5 sm:p-6">
<div class="flex items-start justify-between gap-3">
<div>
<h2 class="font-display text-2xl font-bold">{{ heading || 'Choose an image' }}</h2>
<p class="mt-1 text-sm text-zinc-400">{{ tab === 'input' ? 'Uploaded stills only. Generated frames and edits live under Output.' : 'Generated stills from image edits. Video frames stay with their clips.' }}</p>
<p class="mt-1 text-sm text-zinc-400">{{ pickerHint }}</p>
</div>
<div class="flex items-center gap-2">
<button
@@ -167,14 +167,17 @@ export interface PickerStill {
name?: string
}
const props = defineProps<{
const props = withDefaults(defineProps<{
folders: PickerFolder[]
stills: PickerStill[]
folderId: string
hideInputPreview?: boolean
heading?: string
stillOnly?: boolean
}>()
open?: boolean
}>(), {
open: true
})
const emit = defineEmits<{
close: []
@@ -194,6 +197,7 @@ const revealedIds = ref<string[]>([])
const picking = ref(false)
function onKey(event: KeyboardEvent) {
if (!props.open) return
if (event.key === 'Escape') emit('close')
}
@@ -215,6 +219,12 @@ const visibleStills = computed(() => props.stills.filter((still) => {
const emptyLabel = computed(() => tab.value === 'input'
? 'No uploaded stills in this folder yet.'
: 'No generated stills in this folder yet.')
const pickerHint = computed(() => {
if (props.stillOnly) return 'Pick a still, then label it Subject / Vehicle / Interior / Object on the strip. That name is what the shot prompt inherits.'
return tab.value === 'input'
? 'Uploaded stills only. Generated frames and edits live under Output.'
: 'Generated stills from image edits. Video frames stay with their clips.'
})
const hasHiddenItems = computed(() => visibleStills.value.some(still => stillHidden(still)))
function stillHidden(still: PickerStill) {