generate dist

This commit is contained in:
Ville Saukkonen 2023-03-28 01:53:27 +03:00
parent 27939a4b16
commit 7a06f49c68
2 changed files with 1 additions and 5 deletions

4
dist/index.js vendored

@ -91,8 +91,6 @@ function analyzeCode(parsedDiff, prDetails) {
for (const file of parsedDiff) { for (const file of parsedDiff) {
for (const chunk of file.chunks) { for (const chunk of file.chunks) {
const prompt = createPrompt(file, chunk, prDetails); const prompt = createPrompt(file, chunk, prDetails);
console.log("PROMPT:");
console.log(prompt);
const aiResponse = yield getAIResponse(prompt); const aiResponse = yield getAIResponse(prompt);
if (aiResponse) { if (aiResponse) {
const newComments = createComment(file, chunk, 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()) || "[]"; 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); return JSON.parse(res);
} }
catch (error) { catch (error) {

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long