mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-09-29 14:38:35 +00:00

SwiftUI's ImageRenderer must not be called outside the main thread. The `@MainActor` annotation is only relevant for our own code, not for calls from frameworks. The machinations around Shortcuts end up calling the displayRepresentation method outside the main thread. By capturing the screenshot as NSImage, all data is retained and can be processed outside the main thread.