MCPcopy Create free account
hub / github.com/Noumena-Network/code / getSessionIdFromLog

Function getSessionIdFromLog

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

Source from the content-addressed store, hash-verified

3105 * For full logs, extracts from the first message.
3106 */
3107export function getSessionIdFromLog(log: LogOption): UUID | undefined {
3108 // For lite logs, use the direct sessionId field
3109 if (log.sessionId) {
3110 return log.sessionId as UUID
3111 }
3112 // Fall back to extracting from first message (full logs)
3113 return log.messages[0]?.sessionId as UUID | undefined
3114}
3115
3116/**
3117 * Checks if a log is a lite log that needs full loading.

Callers 15

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