MCPcopy Index your code
hub / github.com/codeaashu/claude-code / loadSessionFile

Function loadSessionFile

src/utils/sessionStorage.ts:3818–3836  ·  view source on GitHub ↗

* Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file.

(sessionId: UUID)

Source from the content-addressed store, hash-verified

3816 * Loads all messages, summaries, file history snapshots, and attribution snapshots from a specific session file.
3817 */
3818async 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.

Callers 2

sessionStorage.tsFile · 0.85
getLastSessionLogFunction · 0.85

Calls 4

getSessionProjectDirFunction · 0.85
getOriginalCwdFunction · 0.85
loadTranscriptFileFunction · 0.85
getProjectDirFunction · 0.70

Tested by

no test coverage detected