fix: shortcuts

This commit is contained in:
Tienson Qin
2025-11-26 00:10:45 +08:00
parent 032a747ce4
commit 7413e6a884

View File

@@ -1,11 +1,17 @@
import AppIntents
import UIKit
import AppIntents
import UIKit
@available(iOS 18.0, *)
struct QuickAddIntent: AppIntent {
static var title: LocalizedStringResource = "Quick Add"
static var description = IntentDescription("Open Logseq Quick Add")
/// 🔑 ensure the app is launched when this intent runs
static var openAppWhenRun: Bool = true
func perform() async throws -> some IntentResult & OpensIntent {
let url = URL(string: "https://logseq.com/mobile/go/quick-add")!
return .result(opensIntent: OpenURLIntent(url))
@@ -17,6 +23,8 @@ struct RecordAudioIntent: AppIntent {
static var title: LocalizedStringResource = "Record Audio"
static var description = IntentDescription("Open Logseq Record Audio")
static var openAppWhenRun: Bool = true
func perform() async throws -> some IntentResult & OpensIntent {
let url = URL(string: "https://logseq.com/mobile/go/audio")!
return .result(opensIntent: OpenURLIntent(url))