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:
@@ -1,10 +1,17 @@
|
||||
import { startQueueBurst } from '~/server/utils/videoChain'
|
||||
|
||||
function parseCount(raw: unknown): number | 'all' {
|
||||
if (raw === 'all' || raw === 'remaining') return 'all'
|
||||
const n = typeof raw === 'number' ? raw : Number(raw)
|
||||
if (!Number.isFinite(n)) return 1
|
||||
return Math.max(1, Math.min(50, Math.floor(n)))
|
||||
}
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { owner } = assertLibraryOwner(event)
|
||||
const id = String(getRouterParam(event, 'id') || '')
|
||||
const body = await readBody<{ count?: number | 'all' }>().catch(() => ({}))
|
||||
const raw = body?.count
|
||||
const count = raw === 'all' || raw === 'remaining' ? 'all' as const : Math.max(1, Math.min(50, Number(raw) || 1))
|
||||
const body = await readBody<{ count?: number | 'all' | 'remaining' }>(event).catch(() => ({} as { count?: number | 'all' }))
|
||||
const query = getQuery(event)
|
||||
const count = parseCount(body?.count ?? query.count)
|
||||
return startQueueBurst(owner, id, count)
|
||||
})
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
import { clearShotQueues } from '~/server/utils/shotQueue'
|
||||
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { owner } = assertLibraryOwner(event)
|
||||
return clearShotQueues(owner)
|
||||
})
|
||||
Reference in New Issue
Block a user