* Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file.
(sessionId: UUID)
| 3816 | * Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file. |
| 3817 | */ |
| 3818 | async function loadSessionFile(sessionId: UUID): Promise<{ |
| 3819 | messages: Map<UUID, TranscriptMessage> |
| 3820 | summaries: Map<UUID, string> |
| 3821 | customTitles: Map<UUID, string> |
| 3822 | tags: Map<UUID, string> |
| 3823 | agentSettings: Map<UUID, string> |
| 3824 | worktreeStates: Map<UUID, PersistedWorktreeSession | null> |
| 3825 | fileHistorySnapshots: Map<UUID, FileHistorySnapshotMessage> |
| 3826 | attributionSnapshots: Map<UUID, AttributionSnapshotMessage> |
| 3827 | contentReplacements: Map<UUID, ContentReplacementRecord[]> |
| 3828 | contextCollapseCommits: ContextCollapseCommitEntry[] |
| 3829 | contextCollapseSnapshot: ContextCollapseSnapshotEntry | undefined |
| 3830 | }> { |
| 3831 | const sessionFile = join( |
| 3832 | getSessionProjectDir() ?? getProjectDir(getOriginalCwd()), |
| 3833 | `${sessionId}.jsonl`, |
| 3834 | ) |
| 3835 | return loadTranscriptFile(sessionFile) |
| 3836 | } |
| 3837 | |
| 3838 | /** |
| 3839 | * Gets message UUIDs for a specific session without loading all sessions. |
no test coverage detected