mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-06-29 04:24:13 +00:00
feat(ai): Ignore diffs longer than 2000 characters to improve performance
This commit is contained in:
parent
1f74cac971
commit
871e421ec8
1 changed files with 3 additions and 0 deletions
|
@ -66,6 +66,9 @@ async function analyzeCode(
|
|||
for (const file of parsedDiff) {
|
||||
if (file.to === "/dev/null") continue; // Ignore deleted files
|
||||
for (const chunk of file.chunks) {
|
||||
// Ignore diffs longer than 2000 characters
|
||||
if (chunk.content.length > 2000) continue;
|
||||
|
||||
const prompt = createPrompt(file, chunk, prDetails);
|
||||
const aiResponse = await getAIResponse(prompt);
|
||||
if (aiResponse) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue