Store the Edit TextEncode prompt on library stills, not a Start still caption.

Edit + Enhance always leads with the keep/<image1> stanza and typed change; PE describe dumps are dropped, and Typed stays promptRaw.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-26 15:14:20 -05:00
co-authored by Cursor
parent c46e827c68
commit 58c5458c87
9 changed files with 177 additions and 46 deletions
+7 -1
View File
@@ -108,6 +108,7 @@ export interface LibraryStill {
role: StillRole
name?: string
prompt?: string
promptRaw?: string
promptPre?: string
promptPost?: string
familyId?: string
@@ -1333,6 +1334,7 @@ export async function saveStill(params: {
role?: StillRole
name?: string
prompt?: string
promptRaw?: string
promptPre?: string
promptPost?: string
familyId?: string
@@ -1354,8 +1356,9 @@ export async function saveStill(params: {
const hideInput = typeof params.hideInput === 'boolean' ? params.hideInput === true : existing.hideInput
const name = typeof params.name === 'string' ? params.name.trim().slice(0, 80) : existing.name
const prompt = typeof params.prompt === 'string' ? params.prompt : existing.prompt
const promptRaw = typeof params.promptRaw === 'string' ? params.promptRaw : existing.promptRaw
const nextSettings = params.settings ? normalizeStillSettings(params.settings) : undefined
if (existing.hideInput !== hideInput || existing.name !== name || existing.prompt !== prompt || nextSettings) {
if (existing.hideInput !== hideInput || existing.name !== name || existing.prompt !== prompt || existing.promptRaw !== promptRaw || nextSettings) {
await mutate(params.ownerKey, (next) => {
const item = next.stills.find(still => still.id === existing.id)
if (!item) return
@@ -1363,6 +1366,7 @@ export async function saveStill(params: {
item.role = role
if (name) item.name = name
if (prompt) item.prompt = prompt
if (params.promptRaw != null) item.promptRaw = params.promptRaw || undefined
if (params.promptPre != null) item.promptPre = params.promptPre || undefined
if (params.promptPost != null) item.promptPost = params.promptPost || undefined
if (params.familyId) item.familyId = params.familyId
@@ -1374,6 +1378,7 @@ export async function saveStill(params: {
existing.role = role
if (name) existing.name = name
if (prompt) existing.prompt = prompt
if (params.promptRaw != null) existing.promptRaw = params.promptRaw || undefined
if (params.promptPre != null) existing.promptPre = params.promptPre || undefined
if (params.promptPost != null) existing.promptPost = params.promptPost || undefined
if (nextSettings) existing.settings = nextSettings
@@ -1395,6 +1400,7 @@ export async function saveStill(params: {
role,
name: params.name?.trim().slice(0, 80) || undefined,
prompt: params.prompt || undefined,
promptRaw: params.promptRaw || undefined,
promptPre: params.promptPre || undefined,
promptPost: params.promptPost || undefined,
familyId: params.familyId,