MCPcopy
hub / github.com/claude-code-best/claude-code / getSessionIdFromLog

Function getSessionIdFromLog

src/utils/sessionStorage.ts:3011–3018  ·  view source on GitHub ↗
(log: LogOption)

Source from the content-addressed store, hash-verified

3009 * For full logs, extracts from the first message.
3010 */
3011export function getSessionIdFromLog(log: LogOption): UUID | undefined {
3012 // For lite logs, use the direct sessionId field
3013 if (log.sessionId) {
3014 return log.sessionId as UUID
3015 }
3016 // Fall back to extracting from first message (full logs)
3017 return log.messages[0]?.sessionId as UUID | undefined
3018}
3019
3020/**
3021 * Checks if a log is a lite log that needs full loading.

Callers 14

runFunction · 0.85
SessionPreviewFunction · 0.85
LogSelectorFunction · 0.85
getExpandCollapseHintFunction · 0.85
groupLogsBySessionIdFunction · 0.85
checkCrossProjectResumeFunction · 0.85
logToSessionMetaFunction · 0.85
handleSelectFunction · 0.85
filterResumableSessionsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected