fix: message notification humain (plus de "yolo") + description cible améliorée

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) <noreply@anthropic.com>
This commit is contained in:
Dom
2026-04-05 20:52:34 +02:00
parent 46206d9396
commit 3bcf59e16f

View File

@@ -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"