feat: image generation integrated into content creation flow
Backend: - When content_types includes "image", generate image via configured image provider (DALL-E, Replicate) after text generation - Image prompt built from character niche + topic + visual style - Graceful fallback: if image generation fails, post is text-only - Post content_type set to "text+image" when image is attached Frontend: - ContentPage preview shows generated image above text when present - Image displayed with full width and border Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -442,6 +442,10 @@ export default function ContentPage() {
|
||||
</div>
|
||||
) : (
|
||||
<div style={{ padding: '1rem', backgroundColor: 'var(--cream)', marginBottom: '1rem' }}>
|
||||
{generated.image_url && (
|
||||
<img src={generated.image_url} alt="Immagine generata"
|
||||
style={{ width: '100%', marginBottom: '0.75rem', border: '1px solid var(--border)' }} />
|
||||
)}
|
||||
<p style={{ fontSize: '0.875rem', whiteSpace: 'pre-wrap', lineHeight: 1.7, color: 'var(--ink)', margin: 0 }}>
|
||||
{generated.text_content}
|
||||
</p>
|
||||
|
||||
Reference in New Issue
Block a user