intents: properly fix LNPerformActionErrorCodeActionNotFound

This commit is contained in:
osy
2026-01-03 09:12:09 -08:00
parent 57162ae90e
commit 5ee79c7c53
2 changed files with 9 additions and 18 deletions
+6 -12
View File
@@ -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 {
+3 -6
View File
@@ -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 {