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
+28 -4
View File
@@ -41,14 +41,29 @@ export type StillGenerationSettings = {
export type SettingsRow = { label: string; value: string }
function pushPromptRows(rows: SettingsRow[], item: { prompt?: string; promptPre?: string; promptPost?: string }) {
const parts = restorePromptParts(item.prompt || '', {
function pushPromptRows(rows: SettingsRow[], item: {
prompt?: string
promptRaw?: string
promptPre?: string
promptPost?: string
studio2?: { prompt?: string; promptRaw?: string; compiledPrompt?: string }
}) {
// Sampled TextEncode string (after PE + stitch). Never a captioner dump of the PNG.
const sampled = String(
item.prompt
|| item.studio2?.prompt
|| item.studio2?.compiledPrompt
|| ''
).trim()
const typed = String(item.promptRaw || item.studio2?.promptRaw || '').trim()
const parts = restorePromptParts(sampled || item.prompt || '', {
pre: item.promptPre,
prompt: item.prompt,
prompt: sampled || item.prompt,
post: item.promptPost
})
if (parts.pre.trim()) rows.push({ label: 'Pre-text', value: parts.pre.trim() })
if (parts.prompt.trim()) rows.push({ label: 'Prompt', value: parts.prompt.trim() })
if (typed && typed !== parts.prompt.trim()) rows.push({ label: 'Typed', value: typed })
if (parts.post.trim()) rows.push({ label: 'Post-text', value: parts.post.trim() })
}
@@ -172,7 +187,16 @@ export function stillModeLabel(still: { filename?: string; settings?: StillGener
return ''
}
export function stillSettingsRows(still: { prompt?: string; promptPre?: string; promptPost?: string; width?: number; height?: number; settings?: StillGenerationSettings | null }) {
export function stillSettingsRows(still: {
prompt?: string
promptRaw?: string
promptPre?: string
promptPost?: string
studio2?: { prompt?: string; promptRaw?: string; compiledPrompt?: string }
width?: number
height?: number
settings?: StillGenerationSettings | null
}) {
const settings = still.settings
const rows: SettingsRow[] = []
pushPromptRows(rows, still)