diff --git a/backend/src/build-system/handlers/file-manager/file-arch/index.ts b/backend/src/build-system/handlers/file-manager/file-arch/index.ts index b35b130e..a3deb09d 100644 --- a/backend/src/build-system/handlers/file-manager/file-arch/index.ts +++ b/backend/src/build-system/handlers/file-manager/file-arch/index.ts @@ -14,21 +14,21 @@ export class FileArchGenerateHandler implements BuildHandler { const fileStructure = context.getNodeData('op:FILE:STRUCT'); // TODO: here should use datamap struct - const dataMapStruct = context.getNodeData('op:UX:DATAMAP:DOC'); + const datamapDoc = context.getNodeData('op:UX:DATAMAP:DOC'); // TODO: adding page by page analysis - if (!fileStructure || !dataMapStruct) { + if (!fileStructure || !datamapDoc) { return { success: false, error: new Error( - 'Missing required parameters: fileStructure or dataMapStruct', + 'Missing required parameters: fileStructure or datamapDoc', ), }; } const prompt = generateFileArchPrompt( JSON.stringify(fileStructure, null, 2), - JSON.stringify(dataMapStruct, null, 2), + JSON.stringify(datamapDoc, null, 2), ); // fileArchContent generate diff --git a/backend/src/build-system/handlers/file-manager/file-arch/prompt.ts b/backend/src/build-system/handlers/file-manager/file-arch/prompt.ts index d0ec16cf..3dee8a70 100644 --- a/backend/src/build-system/handlers/file-manager/file-arch/prompt.ts +++ b/backend/src/build-system/handlers/file-manager/file-arch/prompt.ts @@ -1,6 +1,6 @@ export const generateFileArchPrompt = ( fileStructure: string, - pageByPageAnalysis: string, + datamapDoc: string, ): string => { return `You are a File Architecture Analyzer. Your task is to analyze the given project directory structure and the detailed page-by-page analysis, then output a JSON object detailing the file dependencies. The output JSON must be wrapped in tags. @@ -15,7 +15,7 @@ ${fileStructure} The following is a detailed analysis of each page. Use this information to understand specific roles, interactions, and dependencies. \`\`\` -${pageByPageAnalysis} +${datamapDoc} \`\`\` ### Instructions