1
0

Refactor commit queue check to use startsWith

This commit is contained in:
2025-05-26 11:42:43 +02:00
parent 8b97b9c2b4
commit 01f3089c8d

View File

@@ -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°