This commit is contained in:
IGNY8 VPS (Salman)
2026-01-11 16:58:57 +00:00
parent e9369df151
commit 75e5b148f5
5 changed files with 59 additions and 0 deletions

View File

@@ -291,6 +291,65 @@
- [ ] Avoid confusing pricing tiers - [ ] Avoid confusing pricing tiers
- [ ] Mobile-responsive pricing tables - [ ] Mobile-responsive pricing tables
# Phase 11 : Content View - Image Regeneration
### NEW FEATURE - Enhancement
**Problem:**
Need ability to regenerate images from the content view with:
- Custom prompt input
- Option to regenerate from original prompt
- Option to generate at higher quality tier
**Current State:**
- Backend: API endpoint documented but NOT implemented
- Frontend: No regenerate buttons exist
**Implementation Plan:**
### Backend:
Add `regenerate` action to `ImageViewSet`:
```python
# In modules/writer/views.py - ImageViewSet
@action(detail=True, methods=['post'])
def regenerate(self, request, pk=None):
image = self.get_object()
custom_prompt = request.data.get('custom_prompt', '')
quality_tier = request.data.get('quality_tier', image.quality_tier)
# Append custom prompt to original if provided
prompt = image.prompt
if custom_prompt:
prompt = f"{prompt}. {custom_prompt}"
# Check credits for quality tier
# Generate new image
# Update image record
# Return result
```
### Frontend:
Add regenerate button to content view:
```tsx
// In ContentViewTemplate or similar
<Button
variant="secondary"
size="sm"
onClick={() => setShowRegenerateModal(true)}
>
<RefreshIcon /> Regenerate Image
</Button>
// Modal with options:
// - Custom prompt textarea
// - Quality tier selector (Basic/Quality/Premium)
// - "Use original prompt" checkbox
```
**Credit Calculation:**
- Show credit cost before regeneration
- Different costs for different quality tiers
--- ---
# Quick Reference: Execution Checklist # Quick Reference: Execution Checklist