refactor : IA éditeur — un seul bouton analyse+réécriture combinées
Un seul appel API retourne l'analyse critique ET la proposition d'article via le séparateur ===CRITIQUE===/===REWRITE===. Le panneau affiche les deux sections avec un bouton « Appliquer la proposition ». Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+14
-14
@@ -63,25 +63,25 @@ $_hasUuid = $_wizUuid !== '';
|
||||
<div class="card border-secondary-subtle">
|
||||
<div class="card-header bg-transparent py-2 small fw-semibold text-muted">IA</div>
|
||||
<div class="card-body p-2">
|
||||
<div class="d-flex flex-column gap-2">
|
||||
<button type="button" id="btn-ai-critique" class="btn btn-outline-secondary btn-sm">
|
||||
Analyse critique
|
||||
</button>
|
||||
<button type="button" id="btn-ai-rewrite" class="btn btn-outline-secondary btn-sm">
|
||||
Réécrire l'article
|
||||
</button>
|
||||
</div>
|
||||
<button type="button" id="btn-ai-analyze" class="btn btn-outline-secondary btn-sm w-100">
|
||||
Analyser et proposer
|
||||
</button>
|
||||
<div id="ai-result-panel" class="mt-2" style="display:none">
|
||||
<div class="d-flex align-items-center justify-content-between mb-1">
|
||||
<span id="ai-result-label" class="fw-semibold small"></span>
|
||||
<span class="fw-semibold small">Ce qui n'allait pas</span>
|
||||
<button type="button" id="btn-ai-close" class="btn-close btn-sm" aria-label="Fermer"></button>
|
||||
</div>
|
||||
<div id="ai-result-content"
|
||||
class="border rounded p-2 small"
|
||||
style="max-height:340px;overflow-y:auto;white-space:pre-wrap;font-family:inherit;background:#f8f9fa">
|
||||
<div id="ai-critique-content"
|
||||
class="border rounded p-2 small mb-2"
|
||||
style="max-height:220px;overflow-y:auto;white-space:pre-wrap;font-family:inherit;background:#f8f9fa">
|
||||
</div>
|
||||
<button type="button" id="btn-ai-apply" class="btn btn-warning btn-sm mt-2" style="display:none">
|
||||
Appliquer dans l'éditeur
|
||||
<div class="fw-semibold small mb-1">Proposition</div>
|
||||
<div id="ai-rewrite-content"
|
||||
class="border rounded p-2 small"
|
||||
style="max-height:220px;overflow-y:auto;white-space:pre-wrap;font-family:inherit;background:#f8f9fa">
|
||||
</div>
|
||||
<button type="button" id="btn-ai-apply" class="btn btn-warning btn-sm mt-2 w-100" style="display:none">
|
||||
Appliquer la proposition
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user