Skip to content

Commit 06db09b

Browse files
authored
improvement(computer-use): name the activation step when an element refuses an advertised action (#10189)
1 parent 796c04a commit 06db09b

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎apps/desktop/native/computer-use/ComputerUse.swift‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,8 @@ func performAXAction(_ element: AXUIElement, _ action: String, press: Bool = fal
6969
return result
7070
}
7171
} catch where refused {
72-
throw ComputerError("unsupported_action", "The element refused this action although it advertises it. Use another of its actions or click it instead (clickCount 2 opens most files and folders).")
72+
// The fallback click needs the app in front, so the activation step comes first.
73+
throw ComputerError("unsupported_action", "The element refused this action although it advertises it. Use another of its actions, or call activate_app for this app and then click it (clickCount 2 opens most files and folders).")
7374
}
7475
}
7576
/// Some apps (Calendar on macOS 26) answer AXPress on a menu item by opening its menu with the item

0 commit comments

Comments
 (0)