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
+12
View File
@@ -166,6 +166,18 @@ class WordsRepository {
await _saveHistoryToPrefs();
}
Future<void> updateHistoryEntry(String id, {String? aiInterpretation, String? question}) async {
final idx = _history.indexWhere((e) => e.id == id);
if (idx != -1) {
final old = _history[idx];
_history[idx] = old.copyWith(
aiInterpretation: aiInterpretation ?? old.aiInterpretation,
question: question ?? old.question,
);
await _saveHistoryToPrefs();
}
}
Future<void> deleteHistoryEntry(String id) async {
_history.removeWhere((e) => e.id == id);
await _saveHistoryToPrefs();