Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions apps/desktop/native/computer-use/ComputerUse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ func dispatchAX(_ element: AXUIElement, press: Bool = false, _ operation: (AXUIE
let result = operation(element)
if ![.illegalArgument, .attributeUnsupported, .actionUnsupported, .notImplemented, .apiDisabled].contains(result) { inputDispatched = true }
if result == .success || result == .cannotComplete && press { return }
// Some elements advertise an action they then refuse (Finder and file-panel cells with AXOpen); nothing reached the app.
if result == .actionUnsupported {
throw ComputerError("unsupported_action", "The element advertises this action but refused it. Use another of its actions or click it instead (clickCount 2 opens most files and folders).")
}
try axCheck(result)
}
/// Some apps (Calendar on macOS 26) answer AXPress on a menu item by opening its menu with the item
Expand Down
Loading