From 5ee79c7c53ee21a400c361fe9d1c0fd16f9d0354 Mon Sep 17 00:00:00 2001 From: osy <50960678+osy@users.noreply.github.com> Date: Sat, 3 Jan 2026 09:12:09 -0800 Subject: [PATCH] intents: properly fix LNPerformActionErrorCodeActionNotFound --- Intents/UTMActionIntent.swift | 18 ++++++------------ Intents/UTMInputIntent.swift | 9 +++------ 2 files changed, 9 insertions(+), 18 deletions(-) diff --git a/Intents/UTMActionIntent.swift b/Intents/UTMActionIntent.swift index de0dd1ea..25c9a544 100644 --- a/Intents/UTMActionIntent.swift +++ b/Intents/UTMActionIntent.swift @@ -20,8 +20,7 @@ import AppKit #endif @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMStatusActionIntent: UTMIntent { - static var id: String = "UTMStatusActionIntent" +struct UTMStatusActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Get Virtual Machine Status" static let description = IntentDescription("Get the status of a virtual machine.") static var parameterSummary: some ParameterSummary { @@ -41,8 +40,7 @@ struct UTMStatusActionIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMStartActionIntent: UTMIntent { - static var id: String = "UTMStartActionIntent" +struct UTMStartActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Start Virtual Machine" static let description = IntentDescription("Start a virtual machine.") static var parameterSummary: some ParameterSummary { @@ -99,8 +97,7 @@ struct UTMStartActionIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMStopActionIntent: UTMIntent { - static var id: String = "UTMStopActionIntent" +struct UTMStopActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Stop Virtual Machine" static let description = IntentDescription("Stop a virtual machine.") static var parameterSummary: some ParameterSummary { @@ -138,8 +135,7 @@ extension UTMVirtualMachineStopMethod: AppEnum { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMPauseActionIntent: UTMIntent { - static var id: String = "UTMPauseActionIntent" +struct UTMPauseActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Pause Virtual Machine" static let description = IntentDescription("Pause a virtual machine.") static var parameterSummary: some ParameterSummary { @@ -168,8 +164,7 @@ struct UTMPauseActionIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMResumeActionIntent: UTMIntent { - static var id: String = "UTMResumeActionIntent" +struct UTMResumeActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Resume Virtual Machine" static let description = IntentDescription("Resume a virtual machine.") static var parameterSummary: some ParameterSummary { @@ -195,8 +190,7 @@ struct UTMResumeActionIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMRestartActionIntent: UTMIntent { - static var id: String = "UTMRestartActionIntent" +struct UTMRestartActionIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Restart Virtual Machine" static let description = IntentDescription("Restart a virtual machine.") static var parameterSummary: some ParameterSummary { diff --git a/Intents/UTMInputIntent.swift b/Intents/UTMInputIntent.swift index 64918120..34085058 100644 --- a/Intents/UTMInputIntent.swift +++ b/Intents/UTMInputIntent.swift @@ -19,8 +19,7 @@ import AppIntents private let kDelayNs: UInt64 = 20000000 @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMSendScanCodeIntent: UTMIntent { - static var id: String = "UTMSendScanCodeIntent" +struct UTMSendScanCodeIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Send Scan Code" static let description = IntentDescription("Send a sequence of raw keyboard scan codes to the virtual machine. Only supported on QEMU backend.") static var parameterSummary: some ParameterSummary { @@ -63,8 +62,7 @@ struct UTMSendScanCodeIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMSendKeystrokesIntent: UTMIntent { - static var id: String = "UTMSendKeystrokesIntent" +struct UTMSendKeystrokesIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Send Keystrokes" static let description = IntentDescription("Send text as a sequence of keystrokes to the virtual machine. Only supported on QEMU backend.") static var parameterSummary: some ParameterSummary { @@ -155,8 +153,7 @@ struct UTMSendKeystrokesIntent: UTMIntent { } @available(iOS 16, macOS 13, tvOS 16, watchOS 9, *) -struct UTMMouseClickIntent: UTMIntent { - static var id: String = "UTMMouseClickIntent" +struct UTMMouseClickIntent: AppIntent, UTMIntent { static let title: LocalizedStringResource = "Send Mouse Click" static let description = IntentDescription("Send a mouse position and click to the virtual machine. Only supported on QEMU backend.") static var parameterSummary: some ParameterSummary {