auto-git:
[change] main.js
This commit is contained in:
9
main.js
9
main.js
@@ -995,7 +995,7 @@ ${JSON.stringify(commits, null, 2)}
|
|||||||
}
|
}
|
||||||
|
|
||||||
// ---- 3. LLM Streaming Call ----
|
// ---- 3. LLM Streaming Call ----
|
||||||
async function streamLLMCommitMessages(prompt, onDataChunk, win, timeoutMs = 30000) {
|
async function streamLLMCommitMessages(prompt, onDataChunk, win, timeoutMs = 120000) {
|
||||||
await ensureOllamaRunning();
|
await ensureOllamaRunning();
|
||||||
const selectedModel = store.get('commitModel') || 'qwen2.5-coder:7b';
|
const selectedModel = store.get('commitModel') || 'qwen2.5-coder:7b';
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
@@ -1051,7 +1051,7 @@ async function streamLLMCommitMessages(prompt, onDataChunk, win, timeoutMs = 300
|
|||||||
return fullOutput;
|
return fullOutput;
|
||||||
}
|
}
|
||||||
|
|
||||||
async function streamLLMREADME(prompt, onDataChunk, win, timeoutMs = 30000) {
|
async function streamLLMREADME(prompt, onDataChunk, win, timeoutMs = 120000) {
|
||||||
await ensureOllamaRunning();
|
await ensureOllamaRunning();
|
||||||
const selectedModel = store.get('readmeModel') || 'qwen2.5-coder:32b';
|
const selectedModel = store.get('readmeModel') || 'qwen2.5-coder:32b';
|
||||||
const controller = new AbortController();
|
const controller = new AbortController();
|
||||||
@@ -1281,9 +1281,10 @@ async function runLLMCommitRewrite(folderObj, win) {
|
|||||||
if (idx !== -1) {
|
if (idx !== -1) {
|
||||||
const buffer = folders[idx].llmBuffer || [];
|
const buffer = folders[idx].llmBuffer || [];
|
||||||
if (error) {
|
if (error) {
|
||||||
if (String(error.message || error).includes('LLM prompt too large')) {
|
const errMsg = String(error.message || error);
|
||||||
|
if (errMsg.includes('LLM prompt too large') || errMsg.includes('aborted')) {
|
||||||
// Skip this batch: drop candidates to unblock pipeline
|
// Skip this batch: drop candidates to unblock pipeline
|
||||||
debug(`[runLLMCommitRewrite] Dropping candidates for ${folderPath} because prompt was too large.`);
|
debug(`[runLLMCommitRewrite] Dropping candidates for ${folderPath} due to error: ${errMsg}`);
|
||||||
folders[idx].llmCandidates = buffer; // keep only buffered, newer commits
|
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 {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user