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

@@ -21,6 +21,10 @@ struct KeybindIntent: AppIntent {
@MainActor
func perform() async throws -> some IntentResult & ReturnsValue<Bool> {
guard await requestIntentPermission() else {
throw GhosttyIntentError.permissionDenied
}
guard let surface = terminal.surfaceModel else {
throw GhosttyIntentError.surfaceNotFound
}