MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / buildImportGraphForFiles

Function buildImportGraphForFiles

src/orchestration/context-injection.ts:185–193  ·  view source on GitHub ↗

Build a graph scoped to the node's neighborhood when no shared graph was passed.

(deps: SlicerDeps, node: TaskNode)

Source from the content-addressed store, hash-verified

183
184/** Build a graph scoped to the node's neighborhood when no shared graph was passed. */
185async function buildImportGraphForFiles(deps: SlicerDeps, node: TaskNode): Promise<ImportGraph> {
186 const files = [...new Set([...node.targetFiles, ...node.contextFiles])];
187 const withContent: Array<{ rel: string; content?: string }> = [];
188 for (const f of files) {
189 const c = await readFile(deps, f);
190 withContent.push({ rel: f, content: c ?? undefined });
191 }
192 return buildImportGraph(deps.cwd, withContent, async (rel) => readFile(deps, rel));
193}
194
195/**
196 * Render a TaskContext into the actual prompt string handed to the worker.

Callers 1

buildTaskContextFunction · 0.85

Calls 3

readFileFunction · 0.85
buildImportGraphFunction · 0.85
pushMethod · 0.45

Tested by

no test coverage detected