macos: Terminal entity has screen contents deferred
parent
93f0ee2089
commit
e51a93ee7c
|
|
@ -11,6 +11,26 @@ struct TerminalEntity: AppEntity {
|
|||
@Property(title: "Working Directory")
|
||||
var workingDirectory: String?
|
||||
|
||||
@MainActor
|
||||
@DeferredProperty(title: "Full Contents")
|
||||
@available(macOS 26.0, *)
|
||||
var screenContents: String? {
|
||||
get async {
|
||||
guard let surfaceView else { return nil }
|
||||
return surfaceView.cachedScreenContents.get()
|
||||
}
|
||||
}
|
||||
|
||||
@MainActor
|
||||
@DeferredProperty(title: "Visible Contents")
|
||||
@available(macOS 26.0, *)
|
||||
var visibleContents: String? {
|
||||
get async {
|
||||
guard let surfaceView else { return nil }
|
||||
return surfaceView.cachedVisibleContents.get()
|
||||
}
|
||||
}
|
||||
|
||||
var screenshot: Image?
|
||||
|
||||
static var typeDisplayRepresentation: TypeDisplayRepresentation {
|
||||
|
|
|
|||
Loading…
Reference in New Issue