Added revised book feature.

This commit is contained in:
2026-02-05 08:20:08 -05:00
parent 92336e4f29
commit e6110a6a54
3 changed files with 59 additions and 1 deletions

View File

@@ -170,12 +170,38 @@
<a href="{{ url_for('check_consistency', run_id=run.id, book_folder=book.folder) }}" class="btn btn-outline-warning ms-2">
<i class="fas fa-search me-2"></i>Check Consistency
</a>
<button class="btn btn-warning ms-2" data-bs-toggle="modal" data-bs-target="#reviseBookModal{{ loop.index }}" title="Regenerate this book with changes, keeping others.">
<i class="fas fa-pencil-alt me-2"></i>Revise
</button>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Revise Book Modal -->
<div class="modal fade" id="reviseBookModal{{ loop.index }}" tabindex="-1">
<div class="modal-dialog">
<form class="modal-content" action="{{ url_for('revise_book', run_id=run.id, book_folder=book.folder) }}" method="POST">
<div class="modal-header">
<h5 class="modal-title">Revise Book</h5>
<button type="button" class="btn-close" data-bs-dismiss="modal"></button>
</div>
<div class="modal-body">
<p class="text-muted small">This will start a <strong>new run</strong>. All other books will be copied over, but this book will be regenerated based on your instructions.</p>
<div class="mb-3">
<label class="form-label">Instructions</label>
<textarea name="instruction" class="form-control" rows="4" placeholder="e.g. 'Change the ending', 'Make the pacing faster', 'Add a scene about X'." required></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Cancel</button>
<button type="submit" class="btn btn-warning">Start Revision</button>
</div>
</form>
</div>
</div>
{% endfor %}
<div class="row mb-4">