feat: session start screen, question context input, and G4F-style AI multi-provider fallback

This commit is contained in:
Alma Alexyz
2026-08-31 13:43:45 +05:00
parent c99e36e9ac
commit a24fdaee97
11 changed files with 857 additions and 99 deletions
+34
View File
@@ -7,6 +7,8 @@ class HistoryEntry {
final String symbolicMeaning;
final String readingType;
final String? positionTitle;
final String? question;
final String? aiInterpretation;
const HistoryEntry({
required this.id,
@@ -17,8 +19,36 @@ class HistoryEntry {
required this.symbolicMeaning,
this.readingType = 'Жребий',
this.positionTitle,
this.question,
this.aiInterpretation,
});
HistoryEntry copyWith({
String? id,
DateTime? timestamp,
String? word,
int? sessionNumber,
String? partOfSpeech,
String? symbolicMeaning,
String? readingType,
String? positionTitle,
String? question,
String? aiInterpretation,
}) {
return HistoryEntry(
id: id ?? this.id,
timestamp: timestamp ?? this.timestamp,
word: word ?? this.word,
sessionNumber: sessionNumber ?? this.sessionNumber,
partOfSpeech: partOfSpeech ?? this.partOfSpeech,
symbolicMeaning: symbolicMeaning ?? this.symbolicMeaning,
readingType: readingType ?? this.readingType,
positionTitle: positionTitle ?? this.positionTitle,
question: question ?? this.question,
aiInterpretation: aiInterpretation ?? this.aiInterpretation,
);
}
String get formattedSessionNumber => sessionNumber.toString().padLeft(3, '0');
String get formattedDate {
@@ -41,6 +71,8 @@ class HistoryEntry {
'symbolicMeaning': symbolicMeaning,
'readingType': readingType,
'positionTitle': positionTitle,
'question': question,
'aiInterpretation': aiInterpretation,
};
}
@@ -54,6 +86,8 @@ class HistoryEntry {
symbolicMeaning: map['symbolicMeaning'] as String? ?? '',
readingType: map['readingType'] as String? ?? 'Жребий',
positionTitle: map['positionTitle'] as String?,
question: map['question'] as String?,
aiInterpretation: map['aiInterpretation'] as String?,
);
}
}