Workaround for #8669

pull/8838/head
Lars 2025-09-22 14:52:10 +02:00
parent 485b6b73bf
commit 8600954526
No known key found for this signature in database
GPG Key ID: 845CB61BD38F4E49
1 changed files with 4 additions and 2 deletions

View File

@ -43,11 +43,13 @@ struct NewTerminalIntent: AppIntent {
) )
var parent: TerminalEntity? var parent: TerminalEntity?
// Performing in the background can avoid opening multiple windows at the same time
// using `foreground` will cause `perform` and `AppDelegate.applicationDidBecomeActive(_:)`/`AppDelegate.applicationShouldHandleReopen(_:hasVisibleWindows:)` running at the 'same' time
@available(macOS 26.0, *) @available(macOS 26.0, *)
static var supportedModes: IntentModes = .foreground(.immediate) static var supportedModes: IntentModes = .background
@available(macOS, obsoleted: 26.0, message: "Replaced by supportedModes") @available(macOS, obsoleted: 26.0, message: "Replaced by supportedModes")
static var openAppWhenRun = true static var openAppWhenRun = false
@MainActor @MainActor
func perform() async throws -> some IntentResult & ReturnsValue<TerminalEntity?> { func perform() async throws -> some IntentResult & ReturnsValue<TerminalEntity?> {