From cb11fa21b4cc9ff61263f2f52dea56623ea36a32 Mon Sep 17 00:00:00 2001 From: Andrew Blakeslee Moore Date: Sun, 5 Jul 2026 22:36:29 -0700 Subject: [PATCH] Session Cache Implementation Nucleic-Session: B2346642-3353-4BD5-9DE2-A8B77BD66C98 Co-authored-by: Nucleic --- NucleicRemote/NucleicRemote/Models/SessionCache.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/NucleicRemote/NucleicRemote/Models/SessionCache.swift b/NucleicRemote/NucleicRemote/Models/SessionCache.swift index 118d543..fa8b0f2 100644 --- a/NucleicRemote/NucleicRemote/Models/SessionCache.swift +++ b/NucleicRemote/NucleicRemote/Models/SessionCache.swift @@ -70,7 +70,7 @@ enum SessionCache { let kept = Array(summaries.sorted { $0.updatedAt > $1.updatedAt }.prefix(sessionLimit)) if let data = try? JSONEncoder().encode(kept) { try? data.write(to: url, options: .atomic) } // Drop transcript files for sessions that fell out of the recent set. - let keep = Set(kept.map(transcriptFileName)) + let keep = Set(kept.map { transcriptFileName($0.sessionID) }) if let files = try? FileManager.default.contentsOfDirectory( at: dir, includingPropertiesForKeys: nil) { for file in files where !keep.contains(file.lastPathComponent) {