MCPcopy
hub / github.com/RedPlanetHQ/core / loadSessions

Function loadSessions

packages/cli/src/utils/coding-sessions.ts:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30function loadSessions(): SessionsData {
31 ensureSessionsDir();
32 try {
33 if (existsSync(SESSIONS_FILE)) {
34 const data = readFileSync(SESSIONS_FILE, 'utf-8');
35 return JSON.parse(data) as SessionsData;
36 }
37 } catch {
38 // Ignore, return empty
39 }
40 return {sessions: {}};
41}
42
43function saveSessions(data: SessionsData): void {
44 ensureSessionsDir();

Callers 4

getSessionFunction · 0.85
upsertSessionFunction · 0.85
deleteSessionFunction · 0.85
listRunningSessionsFunction · 0.85

Calls 2

ensureSessionsDirFunction · 0.85
parseMethod · 0.45

Tested by

no test coverage detected