From d1c6a9899478d409709ce543d4684adb2828dba3 Mon Sep 17 00:00:00 2001 From: pacnpal <183241239+pacnpal@users.noreply.github.com> Date: Mon, 10 Feb 2025 17:08:21 -0500 Subject: [PATCH] Update action.js --- action.js | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/action.js b/action.js index 1e194a7..3949a4b 100644 --- a/action.js +++ b/action.js @@ -48,26 +48,7 @@ async function getDiff(baseSha, headSha) { } }); - // Filter for relevant files - const lines = diffContent.split('\n'); - let filtered = ''; - let keep = false; - - for (const line of lines) { - if (line.startsWith('diff --git')) { - keep = false; - // Check if file type should be included - if (line.match(/\.(js|ts|py|cpp|h|java|cs)$/) && - !line.match(/(package-lock\.json|yarn\.lock|\.md|\.json)/)) { - keep = true; - } - } - if (keep) { - filtered += line + '\n'; - } - } - - return filtered; + return diffContent; } catch (error) { throw new Error(`Failed to generate diff: ${error.message}`); } @@ -113,7 +94,7 @@ ${diffContent} 'anthropic-version': '2023-06-01' }, body: JSON.stringify({ - model: 'claude-3-sonnet-20240229', + model: 'claude-3-5-sonnet-20241022', max_tokens: 4096, temperature: 0.7, messages: [{