Add guided reflection flow with mood-adaptive CBT/ACT questions
Walks users through 3-4 guided questions based on mood category: positive (great/good) gets gratitude-oriented questions, neutral (average) gets exploratory questions, and negative (bad/horrible) gets empathetic questions. Stored as JSON in MoodEntryModel, integrated into PDF reports, AI summaries, and CSV export. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -322,7 +322,12 @@ class ReportsViewModel: ObservableObject {
|
||||
let day = entry.date.formatted(.dateTime.weekday(.abbreviated))
|
||||
let mood = entry.mood.widgetDisplayName
|
||||
let notes = entry.notes ?? "no notes"
|
||||
return "\(day): \(mood) (\(notes))"
|
||||
let reflectionSummary = entry.reflection?.responses
|
||||
.filter { !$0.answer.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty }
|
||||
.map { "\($0.question): \(String($0.answer.prefix(150)))" }
|
||||
.joined(separator: " | ") ?? ""
|
||||
let reflectionStr = reflectionSummary.isEmpty ? "" : " [reflection: \(reflectionSummary)]"
|
||||
return "\(day): \(mood) (\(notes))\(reflectionStr)"
|
||||
}.joined(separator: "\n")
|
||||
|
||||
let prompt = """
|
||||
|
||||
Reference in New Issue
Block a user