MCPcopy Create free account
hub / github.com/HELPMEEADICE/doge-code / loadSessionFile

Function loadSessionFile

src/utils/sessionStorage.ts:3864–3882  ·  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

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

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