Add TFL train disruption alerts integration
Query TFL API for Tube and Elizabeth Line status, displaying disruptions as feed cards. Major disruptions (severity 1-6) appear as RIGHT_NOW spotlight cards, minor delays (7-9) as FYI items. - Add TFLDataSource with 2-min cache and severity classification - Add .transitAlert FeedItemType with 0.85 base weight - Wire up async fetch in ContextOrchestrator pipeline - Handle timeout and failure cases gracefully 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -86,6 +86,7 @@ final class HeuristicRanker {
|
||||
switch type {
|
||||
case .weatherWarning: return 1.0
|
||||
case .weatherAlert: return 0.9
|
||||
case .transitAlert: return 0.85
|
||||
case .calendarEvent: return 0.8
|
||||
case .transit: return 0.75
|
||||
case .poiNearby: return 0.6
|
||||
|
||||
@@ -17,5 +17,6 @@ enum FeedItemType: String, Codable, CaseIterable {
|
||||
case currentWeather = "CURRENT_WEATHER"
|
||||
case calendarEvent = "CALENDAR_EVENT"
|
||||
case stock = "STOCK"
|
||||
case transitAlert = "TRANSIT_ALERT"
|
||||
case allQuiet = "ALL_QUIET"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user