refactor(streaming): Optimize image collection and debounce mechanism

This commit is contained in:
cogwheel0
2025-11-02 22:14:45 +05:30
parent cfadeffd24
commit a05837b985
4 changed files with 211 additions and 69 deletions

View File

@@ -647,13 +647,6 @@ class ChatMessagesNotifier extends Notifier<List<ChatMessage>> {
return;
}
// Log content replacement for debugging
DebugLogger.log(
'Replacing message content: messageId=${lastMessage.id}, '
'oldLength=${lastMessage.content.length}, newLength=${content.length}',
scope: 'chat/providers',
);
_ensureFormatterForMessage(lastMessage);
// Defensive check: ensure the formatter is for the correct message