mirror of
https://github.com/msveshnikov/autocode-ai.git
synced 2026-10-19 11:04:26 +00:00
Minor
This commit is contained in:
parent
2cac0f1ec3
commit
a2e8aa399f
3 changed files with 19 additions and 3 deletions
|
|
@ -14,10 +14,18 @@ const ProjectManagerAgent = {
|
|||
async run(projectStructure, readme) {
|
||||
console.log(chalk.cyan("🚀 Project Manager Agent starting..."));
|
||||
|
||||
await this.orchestrateAgents(projectStructure, readme);
|
||||
await this.buildApp();
|
||||
await this.runTests();
|
||||
await this.performUIChecks();
|
||||
await this.checkDependencies();
|
||||
await this.optimizeAssets();
|
||||
await this.monitorPerformance();
|
||||
await this.generateDockerfile();
|
||||
await this.setupCICD();
|
||||
await this.generateChangeLog();
|
||||
await this.setupEnvironmentConfig();
|
||||
await this.generateBuildScript();
|
||||
await this.orchestrateAgents(projectStructure, readme);
|
||||
|
||||
console.log(chalk.green("✅ Project Manager Agent completed its tasks."));
|
||||
},
|
||||
|
|
|
|||
|
|
@ -86,3 +86,4 @@ AutoCode currently supports the following programming languages:
|
|||
- Swift
|
||||
|
||||
Each language has its own configuration for file extensions, recommended linter, formatter, and package manager.
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ class TesterAgent {
|
|||
await this.generateIntegrationTests(projectStructure, readme);
|
||||
await this.generateUnitTests(projectStructure, readme);
|
||||
await this.runTests();
|
||||
await this.optimizeTests();
|
||||
console.log("Tester Agent completed.");
|
||||
}
|
||||
|
||||
|
|
@ -74,7 +75,7 @@ Generate a complete Jest test file for this endpoint. Include necessary imports,
|
|||
messages: [{ role: "user", content: prompt }],
|
||||
});
|
||||
|
||||
const testContent = response.content[0].text;
|
||||
const testContent = this.extractCodeSnippet(response.content[0].text);
|
||||
const testFileName = `${endpoint.file.replace(".js", "")}.test.js`;
|
||||
const testFilePath = path.join(process.cwd(), this.testsDirectory, testFileName);
|
||||
|
||||
|
|
@ -122,7 +123,7 @@ Generate a complete Jest test file for this module. Include necessary imports, m
|
|||
messages: [{ role: "user", content: prompt }],
|
||||
});
|
||||
|
||||
const testContent = response.content[0].text;
|
||||
const testContent = this.extractCodeSnippet(response.content[0].text);
|
||||
const testFileName = `${path.basename(file, ".js")}.test.js`;
|
||||
const testFilePath = path.join(process.cwd(), this.testsDirectory, testFileName);
|
||||
|
||||
|
|
@ -157,6 +158,12 @@ Generate a complete Jest test file for this module. Include necessary imports, m
|
|||
await FileManager.write(testFile, optimizedContent);
|
||||
}
|
||||
}
|
||||
|
||||
extractCodeSnippet(text) {
|
||||
const codeBlockRegex = /```(?:javascript|js)?\n([\s\S]*?)\n```/;
|
||||
const match = text.match(codeBlockRegex);
|
||||
return match ? match[1] : text;
|
||||
}
|
||||
}
|
||||
|
||||
export default new TesterAgent();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue