MCPcopy Create free account
hub / github.com/IAmUnbounded/devctx / loadAllSessions

Function loadAllSessions

devctx/src/core/context.ts:51–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

49}
50
51export async function loadAllSessions(): Promise<ContextEntry[]> {
52 const dir = await getDevCtxDir();
53 const sessionsDir = path.join(dir, "sessions");
54
55 if (!fs.existsSync(sessionsDir)) return [];
56
57 const files = fs.readdirSync(sessionsDir).filter((f) => f.endsWith(".json")).sort().reverse();
58 return files.map((f) => JSON.parse(fs.readFileSync(path.join(sessionsDir, f), "utf-8")));
59}
60
61/**
62 * Merge context entries from multiple sources (e.g., after git pull).

Callers 2

mcp-server.tsFile · 0.90
logCommandFunction · 0.90

Calls 1

getDevCtxDirFunction · 0.85

Tested by

no test coverage detected