From a56906f653df333f9cd5d25ba2ef21106a64abcc Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Tue, 30 Sep 2025 14:40:55 +0530 Subject: [PATCH] refactor: migrate loadConversationProvider family (Phase 3, 1/4) - Converted FutureProvider.family to @riverpod function - Provider name unchanged: loadConversationProvider - Usage: ref.watch(loadConversationProvider(id)) --- lib/core/providers/app_providers.dart | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/core/providers/app_providers.dart b/lib/core/providers/app_providers.dart index 21c3563..3c53a35 100644 --- a/lib/core/providers/app_providers.dart +++ b/lib/core/providers/app_providers.dart @@ -989,10 +989,8 @@ class ActiveConversationNotifier extends Notifier { } // Provider to load full conversation with messages -final loadConversationProvider = FutureProvider.family(( - ref, - conversationId, -) async { +@riverpod +Future loadConversation(Ref ref, String conversationId) async { final api = ref.watch(apiServiceProvider); if (api == null) { throw Exception('No API service available'); @@ -1011,7 +1009,7 @@ final loadConversationProvider = FutureProvider.family(( ); return fullConversation; -}); +} // Provider to automatically load and set the default model from user settings or OpenWebUI final defaultModelProvider = FutureProvider((ref) async {