Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/gep/selfPR.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function writeState(state) {
const dir = getEvolutionDir();
if (!fs.existsSync(dir)) fs.mkdirSync(dir, { recursive: true });
fs.writeFileSync(getStatePath(), JSON.stringify(state, null, 2) + '\n');
} catch (_) {}
} catch (e) { console.warn('[SelfPR] Failed to save state:', e.message); }
}

function isInCooldown() {
Expand Down Expand Up @@ -225,15 +225,15 @@ function getGitDiff(changedFiles, repoRoot) {
{ cwd: repoRoot, timeout: 10000, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'], maxBuffer: MAX_EXEC_BUFFER }
);
if (result && result.trim()) parts.push(result.trim());
} catch (_) {}
} catch (e) { console.warn('[SelfPR] Summary method failed:', e.message); }
if (parts.length === before) {
try {
const result = execSync(
'git diff -- "' + f + '"',
{ cwd: repoRoot, timeout: 10000, encoding: 'utf8', stdio: ['pipe', 'pipe', 'pipe'], maxBuffer: MAX_EXEC_BUFFER }
);
if (result && result.trim()) parts.push(result.trim());
} catch (_) {}
} catch (e) { console.warn('[SelfPR] Fallback summary failed:', e.message); }
}
}
return parts.join('\n');
Expand Down