import SwiftUI import AppIntents extension View { /// Marks `bookmark` as the on-screen entity via an `NSUserActivity`, so /// Siri / Apple Intelligence can resolve references like "summarize this" /// or "open this one" while the bookmark is being viewed. /// /// iOS 26.0 ships no SwiftUI `.appEntityIdentifier` modifier, so this uses /// the supported path: the standard `.userActivity` modifier plus /// `NSUserActivity.appEntityIdentifier` (from `AppEntityAnnotatable`). func bookmarkOnscreen(_ bookmark: Bookmark) -> some View { userActivity("com.magicive.marks.viewBookmark", element: bookmark.id) { id, activity in activity.title = bookmark.displayTitle activity.appEntityIdentifier = EntityIdentifier(for: BookmarkEntity.self, identifier: id) activity.isEligibleForSearch = true } } }