diff --git a/src/main.ts b/src/main.ts index f73ea7f..f971d45 100644 --- a/src/main.ts +++ b/src/main.ts @@ -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) {