1
0

auto-git:

[change] main.js
This commit is contained in:
Victor Giers
2025-12-08 14:11:23 +01:00
parent ddf534e72b
commit 2eb45ac67f

14
main.js
View File

@@ -1298,16 +1298,10 @@ async function runLLMCommitRewrite(folderObj, win) {
const buffer = folders[idx].llmBuffer || []; const buffer = folders[idx].llmBuffer || [];
if (error) { if (error) {
const errMsg = String(error.message || error); const errMsg = String(error.message || error);
if (errMsg.includes('LLM prompt too large') || errMsg.includes('aborted')) { // Drop this batch on any error to avoid getting stuck; keep buffered new commits
// Skip this batch: drop candidates to unblock pipeline debug(`[runLLMCommitRewrite] Dropping candidates for ${folderPath} due to error: ${errMsg}`);
debug(`[runLLMCommitRewrite] Dropping candidates for ${folderPath} due to error: ${errMsg}`); folders[idx].llmCandidates = buffer;
folders[idx].llmCandidates = buffer; // keep only buffered, newer commits folders[idx].firstCandidateBirthday = buffer.length ? Date.now() : null;
folders[idx].firstCandidateBirthday = buffer.length ? Date.now() : null;
} else {
// Requeue original candidates plus anything that arrived during rewrite
folders[idx].llmCandidates = hashes.concat(buffer);
folders[idx].firstCandidateBirthday = originalBirthday || (folders[idx].llmCandidates.length ? Date.now() : null);
}
} else { } else {
// Promote buffered commits to become the next batch // Promote buffered commits to become the next batch
folders[idx].llmCandidates = buffer; folders[idx].llmCandidates = buffer;