From cf4b28273e380c92e4a91450af8383837ee3e76e Mon Sep 17 00:00:00 2001 From: Simos Mikelatos Date: Fri, 19 Jun 2026 14:22:47 +0000 Subject: [PATCH] fix: compile macos semantic helper --- .../semantics/helpers/macos/CloudCLISemantics.swift | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/server/modules/computer-use/semantics/helpers/macos/CloudCLISemantics.swift b/server/modules/computer-use/semantics/helpers/macos/CloudCLISemantics.swift index 780c5f0c..8b83f9ee 100644 --- a/server/modules/computer-use/semantics/helpers/macos/CloudCLISemantics.swift +++ b/server/modules/computer-use/semantics/helpers/macos/CloudCLISemantics.swift @@ -74,9 +74,13 @@ func bounds(_ element: AXUIElement) -> [String: Double]? { var point = CGPoint.zero var size = CGSize.zero - guard let positionAxValue = positionValue as? AXValue, - let sizeAxValue = sizeValue as? AXValue, - AXValueGetValue(positionAxValue, .cgPoint, &point), + guard CFGetTypeID(positionValue) == AXValueGetTypeID(), + CFGetTypeID(sizeValue) == AXValueGetTypeID() + else { return nil } + + let positionAxValue = positionValue as! AXValue + let sizeAxValue = sizeValue as! AXValue + guard AXValueGetValue(positionAxValue, .cgPoint, &point), AXValueGetValue(sizeAxValue, .cgSize, &size) else { return nil }