Put studio scrolling back and actually save image pre-text and post-text.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { loraDisplayName, normalizeLoraStack, type LoraStackItem } from '~/utils/loras'
|
||||
import type { ImageV2Engine, ImageV2Mode, ImageV2Task } from '~/utils/imageV2'
|
||||
import { isXaigenStudio, type VideoWorkflowId } from '~/utils/videoModels'
|
||||
import { restorePromptParts } from '~/utils/promptParts'
|
||||
|
||||
export type StillGenerationKind = 'image' | 'imagev2'
|
||||
|
||||
@@ -34,9 +35,14 @@ export type StillGenerationSettings = {
|
||||
export type SettingsRow = { label: string; value: string }
|
||||
|
||||
function pushPromptRows(rows: SettingsRow[], item: { prompt?: string; promptPre?: string; promptPost?: string }) {
|
||||
if (item.promptPre?.trim()) rows.push({ label: 'Pre-text', value: item.promptPre.trim() })
|
||||
if (item.prompt?.trim()) rows.push({ label: 'Prompt', value: item.prompt.trim() })
|
||||
if (item.promptPost?.trim()) rows.push({ label: 'Post-text', value: item.promptPost.trim() })
|
||||
const parts = restorePromptParts(item.prompt || '', {
|
||||
pre: item.promptPre,
|
||||
prompt: 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 (parts.post.trim()) rows.push({ label: 'Post-text', value: parts.post.trim() })
|
||||
}
|
||||
|
||||
function finiteNumber(raw: unknown): number | undefined {
|
||||
|
||||
Reference in New Issue
Block a user