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

Function getSessionIdFromLog

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

Source from the content-addressed store, hash-verified

2925 * For full logs, extracts from the first message.
2926 */
2927export function getSessionIdFromLog(log: LogOption): UUID | undefined {
2928 // For lite logs, use the direct sessionId field
2929 if (log.sessionId) {
2930 return log.sessionId as UUID
2931 }
2932 // Fall back to extracting from first message (full logs)
2933 return log.messages[0]?.sessionId as UUID | undefined
2934}
2935
2936/**
2937 * Checks if a log is a lite log that needs full loading.

Callers 14

runFunction · 0.85
SessionPreviewFunction · 0.85
LogSelectorFunction · 0.85
_temp2Function · 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