mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2024-11-22 20:19:02 +00:00
generate dist
This commit is contained in:
parent
27939a4b16
commit
7a06f49c68
4
dist/index.js
vendored
4
dist/index.js
vendored
@ -91,8 +91,6 @@ function analyzeCode(parsedDiff, prDetails) {
|
||||
for (const file of parsedDiff) {
|
||||
for (const chunk of file.chunks) {
|
||||
const prompt = createPrompt(file, chunk, prDetails);
|
||||
console.log("PROMPT:");
|
||||
console.log(prompt);
|
||||
const aiResponse = yield getAIResponse(prompt);
|
||||
if (aiResponse) {
|
||||
const newComments = createComment(file, chunk, aiResponse);
|
||||
@ -149,8 +147,6 @@ function getAIResponse(prompt) {
|
||||
},
|
||||
] }));
|
||||
const res = ((_b = (_a = response.data.choices[0].message) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.trim()) || "[]";
|
||||
console.log("AI Response:");
|
||||
console.log(res);
|
||||
return JSON.parse(res);
|
||||
}
|
||||
catch (error) {
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user