feat(ai): ajouter une section de la reponse et supporter l'editeur Forge (BUG-057, #102)
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:
@@ -347,6 +347,13 @@ test("editor-poc.html reloads Forge buffer on parent-reload", () => {
|
||||
assert.match(handler[1], /loadFile\(\);/);
|
||||
});
|
||||
|
||||
test("editor-poc.html inserts assistant text on parent-insert (BUG-057)", () => {
|
||||
assert.match(forgeSrc, /if \(e\.data\.type === 'parent-insert' && typeof e\.data\.text === 'string'\) \{/);
|
||||
const handler = forgeSrc.match(/if \(e\.data\.type === 'parent-insert' && typeof e\.data\.text === 'string'\) \{([\s\S]*?)\n \}/);
|
||||
assert.ok(handler, "parent-insert handler not found");
|
||||
assert.match(handler[1], /insertAtCursor\(/);
|
||||
});
|
||||
|
||||
test("style.css lets the inline editor fill the content area", () => {
|
||||
assert.match(cssSrc, /\.editor-modal\.editor-inline-mode \{/);
|
||||
assert.match(cssSrc, /\.editor-modal\.editor-inline-mode \{[\s\S]*?pointer-events: none;/);
|
||||
|
||||
Reference in New Issue
Block a user