macos: intents all ask for permission

This commit is contained in:
Mitchell Hashimoto
2025-06-20 11:06:05 -07:00
parent 027171bd5d
commit 647f29bad1
11 changed files with 252 additions and 0 deletions

View File

@@ -10,6 +10,10 @@ struct QuickTerminalIntent: AppIntent {
@MainActor
func perform() async throws -> some IntentResult & ReturnsValue<[TerminalEntity]> {
guard await requestIntentPermission() else {
throw GhosttyIntentError.permissionDenied
}
guard let delegate = NSApp.delegate as? AppDelegate else {
throw GhosttyIntentError.appUnavailable
}