Skip to content

Commit 5ee79c7

Browse files
committed
intents: properly fix LNPerformActionErrorCodeActionNotFound
1 parent 57162ae commit 5ee79c7

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

Intents/UTMActionIntent.swift

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ import AppKit
2020
#endif
2121

2222
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
23-
struct UTMStatusActionIntent: UTMIntent {
24-
static var id: String = "UTMStatusActionIntent"
23+
struct UTMStatusActionIntent: AppIntent, UTMIntent {
2524
static let title: LocalizedStringResource = "Get Virtual Machine Status"
2625
static let description = IntentDescription("Get the status of a virtual machine.")
2726
static var parameterSummary: some ParameterSummary {
@@ -41,8 +40,7 @@ struct UTMStatusActionIntent: UTMIntent {
4140
}
4241

4342
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
44-
struct UTMStartActionIntent: UTMIntent {
45-
static var id: String = "UTMStartActionIntent"
43+
struct UTMStartActionIntent: AppIntent, UTMIntent {
4644
static let title: LocalizedStringResource = "Start Virtual Machine"
4745
static let description = IntentDescription("Start a virtual machine.")
4846
static var parameterSummary: some ParameterSummary {
@@ -99,8 +97,7 @@ struct UTMStartActionIntent: UTMIntent {
9997
}
10098

10199
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
102-
struct UTMStopActionIntent: UTMIntent {
103-
static var id: String = "UTMStopActionIntent"
100+
struct UTMStopActionIntent: AppIntent, UTMIntent {
104101
static let title: LocalizedStringResource = "Stop Virtual Machine"
105102
static let description = IntentDescription("Stop a virtual machine.")
106103
static var parameterSummary: some ParameterSummary {
@@ -138,8 +135,7 @@ extension UTMVirtualMachineStopMethod: AppEnum {
138135
}
139136

140137
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
141-
struct UTMPauseActionIntent: UTMIntent {
142-
static var id: String = "UTMPauseActionIntent"
138+
struct UTMPauseActionIntent: AppIntent, UTMIntent {
143139
static let title: LocalizedStringResource = "Pause Virtual Machine"
144140
static let description = IntentDescription("Pause a virtual machine.")
145141
static var parameterSummary: some ParameterSummary {
@@ -168,8 +164,7 @@ struct UTMPauseActionIntent: UTMIntent {
168164
}
169165

170166
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
171-
struct UTMResumeActionIntent: UTMIntent {
172-
static var id: String = "UTMResumeActionIntent"
167+
struct UTMResumeActionIntent: AppIntent, UTMIntent {
173168
static let title: LocalizedStringResource = "Resume Virtual Machine"
174169
static let description = IntentDescription("Resume a virtual machine.")
175170
static var parameterSummary: some ParameterSummary {
@@ -195,8 +190,7 @@ struct UTMResumeActionIntent: UTMIntent {
195190
}
196191

197192
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
198-
struct UTMRestartActionIntent: UTMIntent {
199-
static var id: String = "UTMRestartActionIntent"
193+
struct UTMRestartActionIntent: AppIntent, UTMIntent {
200194
static let title: LocalizedStringResource = "Restart Virtual Machine"
201195
static let description = IntentDescription("Restart a virtual machine.")
202196
static var parameterSummary: some ParameterSummary {

Intents/UTMInputIntent.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@ import AppIntents
1919
private let kDelayNs: UInt64 = 20000000
2020

2121
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
22-
struct UTMSendScanCodeIntent: UTMIntent {
23-
static var id: String = "UTMSendScanCodeIntent"
22+
struct UTMSendScanCodeIntent: AppIntent, UTMIntent {
2423
static let title: LocalizedStringResource = "Send Scan Code"
2524
static let description = IntentDescription("Send a sequence of raw keyboard scan codes to the virtual machine. Only supported on QEMU backend.")
2625
static var parameterSummary: some ParameterSummary {
@@ -63,8 +62,7 @@ struct UTMSendScanCodeIntent: UTMIntent {
6362
}
6463

6564
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
66-
struct UTMSendKeystrokesIntent: UTMIntent {
67-
static var id: String = "UTMSendKeystrokesIntent"
65+
struct UTMSendKeystrokesIntent: AppIntent, UTMIntent {
6866
static let title: LocalizedStringResource = "Send Keystrokes"
6967
static let description = IntentDescription("Send text as a sequence of keystrokes to the virtual machine. Only supported on QEMU backend.")
7068
static var parameterSummary: some ParameterSummary {
@@ -155,8 +153,7 @@ struct UTMSendKeystrokesIntent: UTMIntent {
155153
}
156154

157155
@available(iOS 16, macOS 13, tvOS 16, watchOS 9, *)
158-
struct UTMMouseClickIntent: UTMIntent {
159-
static var id: String = "UTMMouseClickIntent"
156+
struct UTMMouseClickIntent: AppIntent, UTMIntent {
160157
static let title: LocalizedStringResource = "Send Mouse Click"
161158
static let description = IntentDescription("Send a mouse position and click to the virtual machine. Only supported on QEMU backend.")
162159
static var parameterSummary: some ParameterSummary {

0 commit comments

Comments
 (0)