Add AI-powered mental wellness features: Reflection Companion, Pattern Tags, Weekly Digest
Three new Foundation Models features to deepen user engagement with mental wellness: 1. AI Reflection Companion — personalized feedback after completing guided reflections, referencing the user's actual words with personality-pack-adapted tone 2. Mood Pattern Tags — auto-extracts theme tags (work, family, stress, etc.) from notes and reflections, displayed as colored pills on entries 3. Weekly Emotional Digest — BGTask-scheduled Sunday digest with headline, summary, highlight, and intention; shown as card in Insights tab with notification All features: on-device (zero cost), premium-gated, iOS 26+ with graceful degradation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
26
Shared/Models/AIReflectionFeedback.swift
Normal file
26
Shared/Models/AIReflectionFeedback.swift
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// AIReflectionFeedback.swift
|
||||
// Reflect
|
||||
//
|
||||
// @Generable model for AI-powered reflection feedback after guided reflection completion.
|
||||
//
|
||||
|
||||
import Foundation
|
||||
import FoundationModels
|
||||
|
||||
/// AI-generated personalized feedback after completing a guided reflection
|
||||
@available(iOS 26, *)
|
||||
@Generable
|
||||
struct AIReflectionFeedback: Equatable {
|
||||
@Guide(description: "A warm, specific affirmation of what the user did well in their reflection (1 sentence)")
|
||||
var affirmation: String
|
||||
|
||||
@Guide(description: "An observation connecting something the user wrote to a meaningful pattern or insight (1 sentence)")
|
||||
var observation: String
|
||||
|
||||
@Guide(description: "A brief, actionable takeaway the user can carry forward (1 sentence)")
|
||||
var takeaway: String
|
||||
|
||||
@Guide(description: "SF Symbol name for the feedback icon (e.g., sparkles, heart.fill, leaf.fill, star.fill)")
|
||||
var iconName: String
|
||||
}
|
||||
Reference in New Issue
Block a user