From 969236da03bff525e5b66eae40cb9e4c0c8545e6 Mon Sep 17 00:00:00 2001 From: Dom Date: Sat, 18 Apr 2026 19:48:26 +0200 Subject: [PATCH] fix(vision): distance max 500px pour template global et SeeClick MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le template matching global trouvait l'icône Chrome à 0.99 de confiance mais la rejetait car elle avait bougé de >150px. Même problème pour SeeClick (>200px). Aligné tous les seuils de distance à 500px pour supporter les workflows VWB cross-résolution. Co-Authored-By: Claude Opus 4.6 (1M context) --- .../backend/services/intelligent_executor.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/visual_workflow_builder/backend/services/intelligent_executor.py b/visual_workflow_builder/backend/services/intelligent_executor.py index 016c7ee9d..599e11268 100644 --- a/visual_workflow_builder/backend/services/intelligent_executor.py +++ b/visual_workflow_builder/backend/services/intelligent_executor.py @@ -759,8 +759,7 @@ def find_and_click( found_y = global_result['coordinates']['y'] distance = np.sqrt((found_x - orig_x)**2 + (found_y - orig_y)**2) - # Rejeter si trop loin (> 150px de la position originale) - MAX_GLOBAL_DISTANCE = 150 + MAX_GLOBAL_DISTANCE = 500 if distance > MAX_GLOBAL_DISTANCE: print(f"⛔ [Vision] Template global rejeté: distance {distance:.0f}px > {MAX_GLOBAL_DISTANCE}px max") else: @@ -797,7 +796,7 @@ def find_and_click( orig_y = anchor_bbox.get('y', 0) + anchor_bbox.get('height', 0) // 2 distance = np.sqrt((found_x - orig_x)**2 + (found_y - orig_y)**2) - MAX_SEECLICK_DISTANCE = 200 # Plus permissif car c'est un fallback + MAX_SEECLICK_DISTANCE = 500 if distance > MAX_SEECLICK_DISTANCE: print(f"⛔ [Vision] SeeClick rejeté: distance {distance:.0f}px > {MAX_SEECLICK_DISTANCE}px max") accept_seeclick = False