Persist selections and compile song output

This commit is contained in:
diyaa
2026-09-14 21:56:26 +02:00
parent 35703f89a8
commit 7bf4df79f9
10 changed files with 490 additions and 11 deletions
@@ -156,9 +156,12 @@ struct FinalReviewView: View {
private func ensureSunoOutput() {
guard project.sunoOutput == nil else { return }
let compiledOutput = (try? SongProjectPromptCompiler().compile(project: project))
?? CompiledSunoOutput(lyricsText: project.lyrics.text, stylePrompt: "")
project.sunoOutput = SunoOutput(
lyricsText: project.lyrics.text,
stylePrompt: "",
lyricsText: compiledOutput.lyricsText,
stylePrompt: compiledOutput.stylePrompt,
generatedAt: Date()
)
}