Przeglądaj źródła

Update Add Carbs shortcut's text responses

Mike Plante 3 miesięcy temu
rodzic
commit
9919b8e555

+ 3 - 3
Trio/Sources/Shortcuts/Carbs/AddCarbPresetIntent.swift

@@ -15,24 +15,24 @@ struct AddCarbPresetIntent: AppIntent {
         description: "Quantity of carbs in g",
         controlStyle: .field,
         inclusiveRange: (lowerBound: 0, upperBound: 300),
-        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of carbs did you eat?"))
     ) var carbQuantity: Double?
+        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of carbs?"))
 
     @Parameter(
         title: "Quantity Fat",
         description: "Quantity of fat in g",
         default: 0.0,
         inclusiveRange: (0, 300),
-        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of fat did you eat?"))
     ) var fatQuantity: Double
+        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of fat?"))
 
     @Parameter(
         title: "Quantity Protein",
         description: "Quantity of Protein in g",
         default: 0.0,
         inclusiveRange: (0, 300),
-        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of protein did you eat?"))
     ) var proteinQuantity: Double
+        requestValueDialog: IntentDialog(stringLiteral: String(localized: "How many grams of protein?"))
 
     @Parameter(
         title: "Date",

+ 1 - 1
Trio/Sources/Shortcuts/Carbs/CarbPresetIntentRequest.swift

@@ -11,7 +11,7 @@ final class CarbPresetIntentRequest: BaseIntentsRequest {
         _ dateDefinedByUser: Bool
     ) async throws -> String {
         guard quantityCarbs >= 0.0 || quantityFat >= 0.0 || quantityProtein >= 0.0 else {
-            return "not adding carbs in Trio"
+            return "Amount must be positive."
         }
 
         let carbs = min(Decimal(quantityCarbs), settingsManager.settings.maxCarbs)