From 01f3089c8da969e243e79d2eadbe9db7b310ca99 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Mon, 26 May 2025 11:42:43 +0200 Subject: [PATCH] Refactor commit queue check to use startsWith --- renderer.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/renderer.js b/renderer.js index 1750fc3..849958e 100644 --- a/renderer.js +++ b/renderer.js @@ -474,8 +474,9 @@ async function startLiveCountdown(folderObj, msLeft) { } contentList.innerHTML = commits.map(c => { // Prüfe, ob der Commit in der Rewrite-Queue ist: - console.log('Commit hash:', c.hash, 'length:', c.hash.length); - const isQueued = folderObj.llmCandidates && folderObj.llmCandidates.includes(c.hash); + const isQueued = folderObj.llmCandidates && folderObj.llmCandidates.some(fullHash => + fullHash.startsWith(c.hash) + ); if(isQueued) console.log("hi"); // Für random-Winkel (zwischen -10 und +15 Grad, z.B.) const pawRotate = (Math.random() * 25 - 10).toFixed(1); // -10° bis +15°