CICO-113127: Test2

This commit is contained in:
Arun Murugan 2024-09-24 22:23:09 +05:30
parent 9afc21f502
commit 987649d2b4
3 changed files with 7 additions and 1 deletions

3
dist/index.js vendored
View file

@ -97,6 +97,8 @@ function analyzeCode(parsedDiff, prDetails) {
continue;
const prompt = createPrompt(file, chunk, prDetails);
const aiResponse = yield getAIResponse(prompt);
console.log('AI Prompt:', prompt);
console.log('AI Response:', aiResponse);
if (aiResponse) {
const newComments = createComment(file, chunk, aiResponse, existingComments);
if (newComments) {
@ -168,6 +170,7 @@ function getAIResponse(prompt) {
return JSON.parse(jsonContent).reviews;
}
catch (error) {
console.error("Error in AI Response:", error);
return null;
}
});