I am trying to create an AppIntent
that takes a rich text parameter. When I try the following it seems to work, but I get compiler errors because AttributedString
doesn't conform to Sendable
.
struct RichTextIntent: AppIntent {
static var title: LocalizedStringResource = "Rich Text"
@Parameter(title: "Text")
var richText: AttributedString
func perform() async throws -> some IntentResult {
.result()
}
}
Is there a way to accept a rich text parameter without compiler warnings?