* Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file.
(sessionId: UUID)
| 3862 | * Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file. |
| 3863 | */ |
| 3864 | async function loadSessionFile(sessionId: UUID): Promise<{ |
| 3865 | messages: Map<UUID, TranscriptMessage> |
| 3866 | summaries: Map<UUID, string> |
| 3867 | customTitles: Map<UUID, string> |
| 3868 | tags: Map<UUID, string> |
| 3869 | agentSettings: Map<UUID, string> |
| 3870 | worktreeStates: Map<UUID, PersistedWorktreeSession | null> |
| 3871 | fileHistorySnapshots: Map<UUID, FileHistorySnapshotMessage> |
| 3872 | attributionSnapshots: Map<UUID, AttributionSnapshotMessage> |
| 3873 | contentReplacements: Map<UUID, ContentReplacementRecord[]> |
| 3874 | contextCollapseCommits: ContextCollapseCommitEntry[] |
| 3875 | contextCollapseSnapshot: ContextCollapseSnapshotEntry | undefined |
| 3876 | }> { |
| 3877 | const sessionFile = join( |
| 3878 | getSessionProjectDir() ?? getProjectDir(getOriginalCwd()), |
| 3879 | `${sessionId}.jsonl`, |
| 3880 | ) |
| 3881 | return loadTranscriptFile(sessionFile) |
| 3882 | } |
| 3883 | |
| 3884 | /** |
| 3885 | * Gets message UUIDs for a specific session without loading all sessions. |
no test coverage detected