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