The image takes a couple seconds to process the different size variants (within documents.rb) yet it's trying to render the view and run the AI job right away. This PR adds some intelligence to it:
Have the GetNextAIMessageJob blocks until the image is finished processing before sending to the AI's API
When the conversation is rendering the list of messages, do not block if the image is not finished processing, instead insert a redirect URL and retry a few times until it properly loads. Show a spinner while we wait.
The image takes a couple seconds to process the different size variants (within documents.rb) yet it's trying to render the view and run the AI job right away. This PR adds some intelligence to it:
GetNextAIMessageJob
blocks until the image is finished processing before sending to the AI's API