MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / project

Function project

__tests__/steps-server-rendered-replies.test.ts:66–75  ·  view source on GitHub ↗
(files: Record<string, string>)

Source from the content-addressed store, hash-verified

64});
65
66async function project(files: Record<string, string>): Promise<{ cg: CodeGraph; root: string }> {
67 await loadAllGrammars();
68 const root = fs.mkdtempSync(path.join(os.tmpdir(), 'cg-steps-replies-'));
69 projects.push(root);
70 for (const [rel, content] of Object.entries(files)) {
71 fs.mkdirSync(path.dirname(path.join(root, rel)), { recursive: true });
72 fs.writeFileSync(path.join(root, rel), content);
73 }
74 return { cg: await CodeGraph.init(root, { index: true }), root };
75}
76
77/** Each reply the route's picture draws, as `status · text · when`. */
78async function replies(cg: CodeGraph, root: string, routeName: string): Promise<string[]> {

Calls 4

loadAllGrammarsFunction · 0.90
pushMethod · 0.80
joinMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected