Skip to content

Commit 96a94cb

Browse files
chore: remove debug logging
1 parent fc7d410 commit 96a94cb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/actions/auto-pr-description/generate_pr_description.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('fs');
44
const path = require('path');
55

66
// Configuration constants
7-
const MAX_TOKENS_PER_REQUEST = 100000; // Conservative limit for Gemini 2.5 Flash
7+
const MAX_TOKENS_PER_REQUEST = 80000; // Conservative limit for Gemini 2.5 Flash
88
const CHARS_PER_TOKEN = 4; // Rough estimation
99
//const MAX_CHARS_PER_CHUNK = MAX_TOKENS_PER_REQUEST * CHARS_PER_TOKEN;
1010
const MAX_CHUNKS = 3; // Limit to prevent excessive API calls
@@ -56,9 +56,9 @@ function chunkDiffByFiles(diffContent) {
5656

5757
for (const line of lines) {
5858
// Check if this is a new file header
59-
console.error(`Line is estimated at ${estimateTokens(line)} tokens`);
59+
//console.error(`Line is estimated at ${estimateTokens(line)} tokens`);
6060
tokenCount += estimateTokens(line);
61-
console.error(`Total tokens for this chunk is ${tokenCount}`);
61+
//console.error(`Total tokens for this chunk is ${tokenCount}`);
6262
if (line.startsWith('diff --git') || line.startsWith('+++') || line.startsWith('---')) {
6363
// If we have content and it's getting large, save current chunk
6464
if (currentChunk && tokenCount > MAX_TOKENS_PER_REQUEST) {

0 commit comments

Comments
 (0)