Add sidecar Qwen VL prompt recommend, fix queued shot bursts, and leave unused MiniMax identity slots empty.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
+39
-2
@@ -26,7 +26,17 @@
|
||||
Each shot ticks off when it saves. If a run stops, continue from the next unchecked scene.
|
||||
</p>
|
||||
</div>
|
||||
<p v-if="pendingCount" class="text-sm text-amber-100">{{ pendingCount }} shot{{ pendingCount === 1 ? '' : 's' }} waiting</p>
|
||||
<div class="flex flex-wrap items-center gap-3">
|
||||
<p v-if="pendingCount" class="text-sm text-amber-100">{{ pendingCount }} shot{{ pendingCount === 1 ? '' : 's' }} waiting</p>
|
||||
<button
|
||||
type="button"
|
||||
class="rounded-full border border-red-400/40 px-3 py-1.5 text-xs text-red-200 hover:border-red-300 hover:text-red-100 disabled:cursor-not-allowed disabled:opacity-50"
|
||||
:disabled="!clearableCount || Boolean(busyId)"
|
||||
@click="clearAll"
|
||||
>
|
||||
Clear queue
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p v-if="error" class="rounded-2xl border border-red-400/30 bg-red-400/10 px-4 py-3 text-sm text-red-200">{{ error }}</p>
|
||||
@@ -183,6 +193,8 @@ const dirty = new Set<string>()
|
||||
const sources = new Map<string, EventSource>()
|
||||
let pollTimer: ReturnType<typeof setInterval> | null = null
|
||||
|
||||
const clearableCount = computed(() => queues.value.filter(queue => queue.status !== 'running').length)
|
||||
|
||||
function dirtyKey(queueId: string, index: number) {
|
||||
return `${queueId}:${index}`
|
||||
}
|
||||
@@ -306,11 +318,17 @@ async function process(queue: Queue, count: number | 'all') {
|
||||
}
|
||||
}).catch(() => null)
|
||||
for (const segment of queue.segments) dirty.delete(dirtyKey(queue.id, segment.index))
|
||||
const started = await $fetch<{ jobId: string }>(`/api/queues/${queue.id}/process`, {
|
||||
const started = await $fetch<{ jobId: string; count?: number }>(`/api/queues/${queue.id}/process`, {
|
||||
method: 'POST',
|
||||
query: { count },
|
||||
body: { count }
|
||||
})
|
||||
queue.currentJobId = started.jobId
|
||||
const n = count === 'all' ? queue.pendingCount : Number(started.count || count)
|
||||
liveMessage.value = {
|
||||
...liveMessage.value,
|
||||
[queue.id]: n <= 1 ? 'Starting the next shot…' : `Starting ${n} shots…`
|
||||
}
|
||||
listen({ ...queue, currentJobId: started.jobId })
|
||||
await loadQueues()
|
||||
} catch (err: any) {
|
||||
@@ -333,6 +351,25 @@ async function remove(queue: Queue) {
|
||||
await loadQueues()
|
||||
}
|
||||
|
||||
async function clearAll() {
|
||||
const n = clearableCount.value
|
||||
if (!n) {
|
||||
error.value = 'Pause the batch that’s generating before clearing the queue.'
|
||||
return
|
||||
}
|
||||
const running = queues.value.some(queue => queue.status === 'running')
|
||||
const extra = running ? ' The batch that’s generating will be left until you pause it.' : ''
|
||||
const label = n === 1 ? 'this batch' : `all ${n} batches`
|
||||
if (!confirm(`Remove ${label} from the queue? Saved clips stay in the library.${extra}`)) return
|
||||
error.value = ''
|
||||
try {
|
||||
await $fetch('/api/queues', { method: 'DELETE' })
|
||||
await loadQueues()
|
||||
} catch (err: any) {
|
||||
error.value = err?.data?.statusMessage || err?.statusMessage || err?.message || 'Could not clear the queue'
|
||||
}
|
||||
}
|
||||
|
||||
let saveTimer: ReturnType<typeof setTimeout> | null = null
|
||||
function saveSegment(queue: Queue, segment: Segment) {
|
||||
markDirty(queue.id, segment.index)
|
||||
|
||||
Reference in New Issue
Block a user