MCPcopy Create free account
hub / github.com/GongShichen/LuminaCode / loadGenerationTriplet

Method loadGenerationTriplet

session/store.go:354–368  ·  view source on GitHub ↗
(sessionID, payloadPath string)

Source from the content-addressed store, hash-verified

352 meta := s.LoadMeta(sessionID)
353 if meta == nil {
354 meta = &Meta{SessionID: sessionID}
355 }
356 if meta.CreatedAt == 0 {
357 now := float64(time.Now().UnixNano()) / 1e9
358 meta.CreatedAt = now
359 meta.LastUpdated = now
360 }
361 meta.Pinned = pinned
362 return meta, atomicWriteJSON(s.metaPath(sessionID), meta)
363}
364
365func (s *Store) upsertMeta(sessionID string, messageCount, turnCount int, provided *Meta) (*Meta, error) {
366 now := float64(time.Now().UnixNano()) / 1e9
367 meta := provided
368 if meta == nil {
369 meta = s.LoadMeta(sessionID)
370 }
371 if meta == nil {

Callers 2

LoadSkillRecoveryMethod · 0.95

Calls 4

stateReadPathMethod · 0.95
loadJSONMapFunction · 0.85
stringFromAnyFunction · 0.70

Tested by

no test coverage detected