From 0026d29b2767eb488525c3deea76a2b0854a3c83 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Mon, 6 Jul 2026 19:43:21 -0700 Subject: [PATCH] Transcript Incremental Projection Nucleic-Session: 0FFD007B-0696-4517-9429-129C7B0FD5AC Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/HostConnection.swift | 9 +++++++++ 1 file changed, 9 insertions(+) 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.