AppShortcuts.swift 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import AppIntents
  2. import Foundation
  3. @available(iOS 16.0, *) struct AppShortcuts: AppShortcutsProvider {
  4. @AppShortcutsBuilder static var appShortcuts: [AppShortcut] {
  5. AppShortcut(
  6. intent: BolusIntent(),
  7. phrases: [
  8. "\(.applicationName) bolus",
  9. "Enacts a \(.applicationName) Bolus"
  10. ]
  11. )
  12. AppShortcut(
  13. intent: ApplyTempPresetIntent(),
  14. phrases: [
  15. "Activate \(.applicationName) temporary target ?",
  16. "\(.applicationName) apply a temporary target"
  17. ]
  18. )
  19. AppShortcut(
  20. intent: ListStateIntent(),
  21. phrases: [
  22. "List \(.applicationName) state",
  23. "\(.applicationName) state"
  24. ]
  25. )
  26. AppShortcut(
  27. intent: AddCarbPresetIntent(),
  28. phrases: [
  29. "Add carbs in \(.applicationName)",
  30. "\(.applicationName) allows to add carbs"
  31. ]
  32. )
  33. AppShortcut(
  34. intent: ApplyOverridePresetIntent(),
  35. phrases: [
  36. "Activate \(.applicationName) override",
  37. "Activates an available \(.applicationName) override"
  38. ]
  39. )
  40. AppShortcut(
  41. intent: CancelOverrideIntent(),
  42. phrases: [
  43. "Cancel \(.applicationName) override",
  44. "Cancels an active \(.applicationName) override"
  45. ]
  46. )
  47. }
  48. }