feat(ai): ajouter une section de la reponse et supporter l'editeur Forge (BUG-057, #102)
CI / lint (push) Successful in 1m34s
CI / security (push) Successful in 1m1s
CI / test (push) Successful in 2m44s
CI / build (push) Successful in 1m1s
CI / e2e (push) Successful in 10m51s

L'assistant IA peut desormais inserer sa reponse dans l'editeur Forge (postMessage parent-insert) en plus d'Editer, et chaque bloc de code propose un bouton « Ajouter la section » pour n'inserer que ce bloc.
This commit is contained in:
2026-09-17 09:39:35 -04:00
parent 94ea5909f4
commit c0eea526de
19 changed files with 239 additions and 29 deletions
+7
View File
@@ -1474,6 +1474,13 @@ body { font-family: var(--sans); background: var(--bg); color: var(--text); heig
window.addEventListener('message', function(e) {
if (!e.data || !e.data.type) return;
if (e.data.type === 'parent-save') { forceSave(); }
// #102/BUG-057 — the parent AI assistant's « Ajouter » button inserts its
// answer (or a single code block) at the current cursor position.
if (e.data.type === 'parent-insert' && typeof e.data.text === 'string') {
var p = getPos();
insertAtCursor((p.s > 0 ? '\n' : '') + e.data.text);
showToast('Texte ajoute au document', 'ok');
}
// #93 — the parent reloads the document after an external write (AI
// assistant edit_file / append_to_file / create_file): re-read from disk
// and drop the stale local buffer that would otherwise be autosaved back