Drop in a screenshot and convert it to clean code (HTML/Tailwind/React/Vue)
Python
Images in Update History
Status: ✅ IMPLEMENTED
Multiple images in update history are fully supported in the backend.
Implementation
Core Function
create_message_from_history_item()inprompts/__init__.pyhandles image processing- User messages with
imagesarray create multipart content (images + text) - Assistant messages remain text-only (code)
- Empty
imagesarrays gracefully fallback to text-only
Supported Flows
- ✅ Regular updates with images
- ✅ Imported code updates with images
- ✅ Multiple images per message
- ✅ Backward compatibility (no images)
Tests
- ✅ Single image in history (
test_prompts.py) - ✅ Multiple images in history (
test_prompts.py,test_prompts_additional.py) - ✅ Imported code with images (
test_prompts.py,test_prompts_additional.py) - ✅ Empty images arrays (
test_prompts_additional.py)
Usage
Frontend can send update history items with:
{
text: "Update instructions",
images: ["data:image/png;base64,img1", "data:image/png;base64,img2"]
}
Backend automatically creates proper multipart messages for AI models.