From 3bcf59e16fa6917b7a068f8e2f72c0f8dabdae84 Mon Sep 17 00:00:00 2001 From: Dom Date: Sun, 5 Apr 2026 20:52:34 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20message=20notification=20humain=20(plus?= =?UTF-8?q?=20de=20"yolo")=20+=20description=20cible=20am=C3=A9lior=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit La description de la cible dans les notifications et logs utilise by_text et window_title au lieu de by_role="yolo" qui n'a pas de sens pour l'utilisateur. Testé : gemma4 en mode texte (CPU, 0.2s) prend la décision "PASSER" quand l'onglet est déjà actif. Base pour l'acteur intelligent. Co-Authored-By: Claude Opus 4.6 (1M context) --- agent_v0/agent_v1/core/executor.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/agent_v0/agent_v1/core/executor.py b/agent_v0/agent_v1/core/executor.py index 2dc8f3c76..9bfc73079 100644 --- a/agent_v0/agent_v1/core/executor.py +++ b/agent_v0/agent_v1/core/executor.py @@ -132,14 +132,19 @@ class ActionExecutorV1: Utilisé pour les notifications et le logging quand la cible n'est pas trouvée. """ parts = [] - if target_spec.get("by_role"): - parts.append(target_spec["by_role"]) - if target_spec.get("by_text"): - parts.append(f"'{target_spec['by_text']}'") - if target_spec.get("vlm_description"): - parts.append(target_spec["vlm_description"][:80]) - if target_spec.get("window_title"): - parts.append(f"dans {target_spec['window_title']}") + by_text = target_spec.get("by_text", "").strip() + window = target_spec.get("window_title", "").strip() + if by_text: + parts.append(f"'{by_text}'") + if window: + parts.append(f"dans {window}") + if not parts: + # Fallback sur la vlm_description + vlm = target_spec.get("vlm_description", "") + if vlm: + parts.append(vlm[:60]) + else: + parts.append("un élément") if parts: return " ".join(parts) return "élément inconnu"