feat(chat): Refactor model selection to use shared restore logic

This commit is contained in:
cogwheel
2025-12-22 11:00:23 +05:30
parent 0f8003e210
commit 9e73fc93c6
5 changed files with 56 additions and 194 deletions

View File

@@ -523,6 +523,8 @@ Future<void> _confirmAndDeleteConversation(
if (active?.id == conversationId) {
ref.read(activeConversationProvider.notifier).clear();
ref.read(chat.chatMessagesProvider.notifier).clearMessages();
// Reset to default model for new conversations (fixes #296)
chat.restoreDefaultModel(ref);
}
refreshConversationsCache(ref);
} catch (_) {