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:
@@ -132,14 +132,19 @@ class ActionExecutorV1:
|
|||||||
Utilisé pour les notifications et le logging quand la cible n'est pas trouvée.
|
Utilisé pour les notifications et le logging quand la cible n'est pas trouvée.
|
||||||
"""
|
"""
|
||||||
parts = []
|
parts = []
|
||||||
if target_spec.get("by_role"):
|
by_text = target_spec.get("by_text", "").strip()
|
||||||
parts.append(target_spec["by_role"])
|
window = target_spec.get("window_title", "").strip()
|
||||||
if target_spec.get("by_text"):
|
if by_text:
|
||||||
parts.append(f"'{target_spec['by_text']}'")
|
parts.append(f"'{by_text}'")
|
||||||
if target_spec.get("vlm_description"):
|
if window:
|
||||||
parts.append(target_spec["vlm_description"][:80])
|
parts.append(f"dans {window}")
|
||||||
if target_spec.get("window_title"):
|
if not parts:
|
||||||
parts.append(f"dans {target_spec['window_title']}")
|
# 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:
|
if parts:
|
||||||
return " ".join(parts)
|
return " ".join(parts)
|
||||||
return "élément inconnu"
|
return "élément inconnu"
|
||||||
|
|||||||
Reference in New Issue
Block a user