1
0

auto-git:

[change] main.js
This commit is contained in:
2025-05-24 14:50:03 +02:00
parent 3c58583b29
commit cc0748d9e4

View File

@@ -202,7 +202,6 @@ async function getCommitsForLLM(folderPath, hashes) {
return commits; return commits;
} }
// 2. Prompts für LLM bauen
async function getPrompt(folderPath, hashes) { async function getPrompt(folderPath, hashes) {
const commits = await getCommitsForLLM(folderPath, hashes); const commits = await getCommitsForLLM(folderPath, hashes);
@@ -214,7 +213,8 @@ Generate a concise git commit message for these changes:
${diff} ${diff}
Don't give any feedback on the code, just analyze what changed and write the git commit message. Keep it short! A commit message MUST NOT exceed 70 characters!`; Don't give any feedback on the code, just analyze what changed and write the git commit message. Keep it short! A commit message MUST NOT BE STRAIGHT TO THE POINT!
Also reply to my message, just give me the commit message.`;
} else if (commits.length > 1) { } else if (commits.length > 1) {
// Multiple commits: Squash them, give all diffs as a big change. // Multiple commits: Squash them, give all diffs as a big change.
const combinedDiffs = commits.map(c => c.diff).join('\n\n'); const combinedDiffs = commits.map(c => c.diff).join('\n\n');
@@ -226,7 +226,8 @@ Here are the combined diffs:
-------------------------------------- --------------------------------------
Even if this might seem like a lot of code, I need you to answer in a SINGLE SENTENCE. A git commit message to be precise is what I need from you, to protocol these changes. Even if this might seem like a lot of code, I need you to answer in a SINGLE SENTENCE. A git commit message to be precise is what I need from you, to protocol these changes.
Don't give any feedback on the code! Just analyze what changed and write the git commit message. Keep it short! A commit message MUST NOT exceed 70 characters!`; Don't give any feedback on the code! Just analyze what changed and write the git commit message. Keep it short! A commit message MUST NOT BE STRAIGHT TO THE POINT!
Don't reply to my message, just give me the commit message.`;
} else { } else {
throw new Error('No commits found for LLM prompt.'); throw new Error('No commits found for LLM prompt.');
} }