Add EV charging discovery feature (disabled by flag)
- Create EVChargingService using MapKit POI search for EV chargers - Add ItineraryBuilder.enrichWithEVChargers() for post-planning enrichment - Update TravelSection in TripDetailView with expandable charger list - Add FeatureFlags.enableEVCharging toggle (default: false) - Include EVChargingFeature.md documenting API overhead 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -313,11 +313,19 @@ final class TripCreationViewModel {
|
||||
let result = planningEngine.planItineraries(request: request)
|
||||
|
||||
switch result {
|
||||
case .success(let options):
|
||||
case .success(var options):
|
||||
guard !options.isEmpty else {
|
||||
viewState = .error("No valid itinerary found")
|
||||
return
|
||||
}
|
||||
|
||||
// Enrich with EV chargers if requested and feature is enabled
|
||||
if FeatureFlags.enableEVCharging && needsEVCharging {
|
||||
print("[TripCreation] Enriching \(options.count) options with EV chargers...")
|
||||
options = await ItineraryBuilder.enrichWithEVChargers(options)
|
||||
print("[TripCreation] EV charger enrichment complete")
|
||||
}
|
||||
|
||||
// Store preferences for later conversion
|
||||
currentPreferences = preferences
|
||||
|
||||
|
||||
Reference in New Issue
Block a user