From 55d5aebbd2fa72a80e326851ee9db4949585225d Mon Sep 17 00:00:00 2001 From: Dom Date: Mon, 20 Apr 2026 11:53:38 +0200 Subject: [PATCH] =?UTF-8?q?feat(knowledge):=20v=C3=A9rification=20post-wor?= =?UTF-8?q?kflow=20=E2=80=94=20dialogues=20restants?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Après la dernière étape, Léa vérifie l'écran et gère les dialogues restants (jusqu'à 3 vérifications en cascade). Le workflow laisse l'écran propre à la fin. Co-Authored-By: Claude Opus 4.6 (1M context) --- visual_workflow_builder/backend/api_v3/execute.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/visual_workflow_builder/backend/api_v3/execute.py b/visual_workflow_builder/backend/api_v3/execute.py index 2c4a098a5..2e9de2dd1 100644 --- a/visual_workflow_builder/backend/api_v3/execute.py +++ b/visual_workflow_builder/backend/api_v3/execute.py @@ -560,6 +560,20 @@ def execute_workflow_thread(execution_id: str, workflow_id: str, app): db.session.commit() break + # Vérification finale : gérer les dialogues restants après la dernière étape + if _execution_state.get('execution_mode') in ('intelligent', 'debug'): + print(f"\n{'='*60}") + print(f"🔎 [Post-workflow] Vérification écran final...") + time.sleep(1.0) + for attempt in range(3): + detected = _check_screen_for_patterns() + if detected: + print(f"🧠 [Post-workflow] Dialogue détecté: {detected.get('pattern')}") + _handle_detected_pattern(detected) + time.sleep(1.0) + else: + break + # Finaliser l'exécution if execution.status == 'running': execution.status = 'completed'