Files
beenvoice-app/plugins/app-intents/ClockInIntent.swift
T
soconnorandCursor 6762a9bff3 Move production to beenvoice.app with migrated accounts, refreshed auth and timer UX, and expanded invoice flows.
Official URL migration preserves sessions, shortcuts prefs, and last clock-in client; auth screens match web with legal links; time clock and invoice editor/send flows are updated for the new domain and UI patterns.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-06-26 03:40:48 -04:00

32 lines
885 B
Swift

import AppIntents
struct ClockInIntent: AppIntent {
static var title: LocalizedStringResource = "Clock In"
static var description = IntentDescription("Start the beenvoice time clock with your last client.")
static var openAppWhenRun: Bool = true
static var isDiscoverable: Bool = true
@Parameter(title: "Title")
var title: String?
@MainActor
func perform() async throws -> some IntentResult {
var components = URLComponents()
components.scheme = "beenvoice"
components.host = "shortcuts"
components.path = "/clock-in"
if let title, !title.isEmpty {
components.queryItems = [URLQueryItem(name: "title", value: title)]
}
guard let url = components.url else {
return .result()
}
BeenVoiceIntentHelpers.openDeepLink(url)
return .result()
}
}