refactor: migrate image gen to task based

This commit is contained in:
cogwheel0
2025-09-02 11:12:48 +05:30
parent 1ce981937d
commit dc231cfa52
4 changed files with 200 additions and 6 deletions

View File

@@ -2513,12 +2513,13 @@ final regenerateLastMessageProvider = Provider<Future<void> Function()>((ref) {
return;
}
// Resend the message via normal flow
await _sendMessageInternal(
ref,
lastUserMessage.content,
lastUserMessage.attachmentIds,
);
// Resend the message via task queue (unified flow)
final activeConv = ref.read(activeConversationProvider);
await ref.read(taskQueueProvider.notifier).enqueueSendText(
conversationId: activeConv?.id,
text: lastUserMessage.content,
attachments: lastUserMessage.attachmentIds,
);
};
});