fix: cache macos computer-use snapshot ax reads (#6130)

Co-authored-by: Orca <help@stably.ai>
This commit is contained in:
Jinwoo Hong
2026-06-22 20:57:13 -07:00
committed by GitHub
co-authored by Orca
parent 5d7368dcd2
commit f3e379d6dc
3 changed files with 362 additions and 180 deletions
@@ -60,6 +60,20 @@ public struct SnapshotTabStripCompaction: Equatable {
}
public enum SnapshotRenderHeuristics {
public static func shouldProbeSecureTextMetadata(role: String) -> Bool {
let normalized = role.lowercased()
return normalized.contains("text") ||
normalized.contains("field") ||
normalized.contains("password") ||
normalized.contains("search") ||
normalized.contains("combo")
}
public static func supportsAttribute(_ attribute: String, advertisedAttributes: Set<String>?) -> Bool {
guard let advertisedAttributes else { return true }
return advertisedAttributes.contains(attribute)
}
public static func displayName(_ node: SnapshotRenderNode) -> String? {
if let title = clean(node.title) {
return title