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

Function loadBranchContext

devctx/src/core/context.ts:43–49  ·  view source on GitHub ↗
(branch: string)

Source from the content-addressed store, hash-verified

41}
42
43export async function loadBranchContext(branch: string): Promise<ContextEntry[]> {
44 const dir = await getDevCtxDir();
45 const branchFile = path.join(dir, "branches", `${branch.replace(/\//g, "__")}.json`);
46
47 if (!fs.existsSync(branchFile)) return [];
48 return JSON.parse(fs.readFileSync(branchFile, "utf-8"));
49}
50
51export async function loadAllSessions(): Promise<ContextEntry[]> {
52 const dir = await getDevCtxDir();

Callers 6

mcp-server.tsFile · 0.90
compressCommandFunction · 0.90
diffCommandFunction · 0.90
resumeCommandFunction · 0.90
suggestCommandFunction · 0.90
logCommandFunction · 0.90

Calls 1

getDevCtxDirFunction · 0.85

Tested by

no test coverage detected