mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-21 18:16:47 +00:00
CICO-113127: Test2
This commit is contained in:
parent
9afc21f502
commit
987649d2b4
3 changed files with 7 additions and 1 deletions
3
dist/index.js
vendored
3
dist/index.js
vendored
|
@ -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;
|
||||
}
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue