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:
@@ -45,6 +45,9 @@ final class MoodEntryModel {
|
||||
// Weather
|
||||
var weatherJSON: String?
|
||||
|
||||
// Guided Reflection
|
||||
var reflectionJSON: String?
|
||||
|
||||
// Computed properties
|
||||
var mood: Mood {
|
||||
Mood(rawValue: moodValue) ?? .missing
|
||||
@@ -62,7 +65,8 @@ final class MoodEntryModel {
|
||||
canDelete: Bool = true,
|
||||
notes: String? = nil,
|
||||
photoID: UUID? = nil,
|
||||
weatherJSON: String? = nil
|
||||
weatherJSON: String? = nil,
|
||||
reflectionJSON: String? = nil
|
||||
) {
|
||||
self.forDate = forDate
|
||||
self.moodValue = mood.rawValue
|
||||
@@ -74,6 +78,7 @@ final class MoodEntryModel {
|
||||
self.notes = notes
|
||||
self.photoID = photoID
|
||||
self.weatherJSON = weatherJSON
|
||||
self.reflectionJSON = reflectionJSON
|
||||
}
|
||||
|
||||
// Convenience initializer for raw values
|
||||
@@ -87,7 +92,8 @@ final class MoodEntryModel {
|
||||
canDelete: Bool = true,
|
||||
notes: String? = nil,
|
||||
photoID: UUID? = nil,
|
||||
weatherJSON: String? = nil
|
||||
weatherJSON: String? = nil,
|
||||
reflectionJSON: String? = nil
|
||||
) {
|
||||
self.forDate = forDate
|
||||
self.moodValue = moodValue
|
||||
@@ -99,5 +105,6 @@ final class MoodEntryModel {
|
||||
self.notes = notes
|
||||
self.photoID = photoID
|
||||
self.weatherJSON = weatherJSON
|
||||
self.reflectionJSON = reflectionJSON
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user