* Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file.
(sessionId: UUID)
| 3921 | * Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file. |
| 3922 | */ |
| 3923 | async function loadSessionFile(sessionId: UUID): Promise<{ |
| 3924 | messages: Map<UUID, TranscriptMessage> |
| 3925 | summaries: Map<UUID, string> |
| 3926 | customTitles: Map<UUID, string> |
| 3927 | tags: Map<UUID, string> |
| 3928 | agentSettings: Map<UUID, string> |
| 3929 | worktreeStates: Map<UUID, PersistedWorktreeSession | null> |
| 3930 | goals: Map<UUID, GoalState> |
| 3931 | fileHistorySnapshots: Map<UUID, FileHistorySnapshotMessage> |
| 3932 | attributionSnapshots: Map<UUID, AttributionSnapshotMessage> |
| 3933 | contentReplacements: Map<UUID, ContentReplacementRecord[]> |
| 3934 | contextCollapseCommits: ContextCollapseCommitEntry[] |
| 3935 | contextCollapseSnapshot: ContextCollapseSnapshotEntry | undefined |
| 3936 | }> { |
| 3937 | const sessionFile = join( |
| 3938 | getSessionProjectDir() ?? getProjectDir(getOriginalCwd()), |
| 3939 | `${sessionId}.jsonl`, |
| 3940 | ) |
| 3941 | return loadTranscriptFile(sessionFile) |
| 3942 | } |
| 3943 | |
| 3944 | /** |
| 3945 | * Gets message UUIDs for a specific session without loading all sessions. |
no test coverage detected