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