Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,21 @@ export class FileArchGenerateHandler implements BuildHandler<string> {

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
Expand Down
Original file line number Diff line number Diff line change
@@ -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 <GENERATEDCODE></GENERATEDCODE> tags.

Expand All @@ -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
Expand Down
Loading