Refactor data sources and feed model

This commit is contained in:
2026-01-10 00:25:36 +00:00
parent 1e65a3f57d
commit 324b35a464
15 changed files with 631 additions and 609 deletions

View File

@@ -15,13 +15,18 @@ struct POIDataSourceConfig: Sendable {
/// Placeholder POI source. Hook point for MapKit / local cache / server-driven POIs.
final class POIDataSource {
struct POI: Sendable, Equatable {
let id: String
let name: String
}
private let config: POIDataSourceConfig
init(config: POIDataSourceConfig = .init()) {
self.config = config
}
func candidates(for location: CLLocation, now: Int) async throws -> [Candidate] {
func data(for location: CLLocation, now: Int) async throws -> [POI] {
// Phase 1 stub: return nothing.
// (Still async/throws so the orchestrator can treat it uniformly with real implementations later.)
_ = config
@@ -30,4 +35,3 @@ final class POIDataSource {
return []
}
}