diff --git a/NucleicRemote/NucleicRemote/Models/HostConnection.swift b/NucleicRemote/NucleicRemote/Models/HostConnection.swift index 6021e0a..0753185 100644 --- a/NucleicRemote/NucleicRemote/Models/HostConnection.swift +++ b/NucleicRemote/NucleicRemote/Models/HostConnection.swift @@ -61,6 +61,15 @@ final class HostConnection { private var transcriptFetchRequestID: String? private var didStartFullFetch = false + /// The in-flight *background* transcript prefetch (one at a time): its request id, target + /// session, and accumulated chunks. Independent of the open-session fetch above — replies + /// are matched on this id, so the two flows never mix, and prefetching keeps working while a + /// different session is open on screen. Driven by RemoteStore, which warms the offline cache + /// with the result so a never-before-opened session still opens at its end instantly. + private var prefetchRequestID: String? + private var prefetchSessionID: SessionID? + private var prefetchEvents: [AgentEvent] = [] + // MARK: Callbacks up to RemoteStore (aggregate concerns) /// How a `HostConnection` talks back to `RemoteStore`. All fire on the main actor.