Add Prompt Builder sequence section order.
Copied scene text and the scene editor follow a persisted sectionOrder, with legacy saves keeping the default style/settings/set/characters/prompt order. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -3,9 +3,16 @@ import { listPromptSequences, updatePromptSequence } from '~/server/utils/prompt
|
||||
export default defineEventHandler(async (event) => {
|
||||
const { owner } = assertLibraryOwner(event)
|
||||
const id = String(getRouterParam(event, 'id') || '')
|
||||
const body = await readBody<{ name?: string; characters?: unknown; sets?: unknown; scenes?: unknown }>(event).catch(() => ({}))
|
||||
const body = await readBody<{
|
||||
name?: string
|
||||
sectionOrder?: unknown
|
||||
characters?: unknown
|
||||
sets?: unknown
|
||||
scenes?: unknown
|
||||
}>(event).catch(() => ({}))
|
||||
const sequence = await updatePromptSequence(owner, id, {
|
||||
name: body?.name,
|
||||
sectionOrder: body?.sectionOrder,
|
||||
characters: body?.characters,
|
||||
sets: body?.sets,
|
||||
scenes: body?.scenes
|
||||
|
||||
Reference in New Issue
Block a user