1
0

auto-git:

[change] main.js
This commit is contained in:
2025-05-26 06:31:18 +02:00
parent d3c946dd27
commit 0a2dd0d5ac

View File

@@ -22,7 +22,8 @@ const store = new Store({
minutesCommitThreshold: 5, minutesCommitThreshold: 5,
autostart: false, autostart: false,
closeToTray: true, closeToTray: true,
needsRelocation: false needsRelocation: false,
dailyCommitStats: {}
} }
}); });
@@ -658,6 +659,12 @@ async function autoCommit(folderPath, message, win) {
debug('[autoCommit] Alle Änderungen gestaged.'); debug('[autoCommit] Alle Änderungen gestaged.');
await git.commit(message || '[auto]'); await git.commit(message || '[auto]');
debug('[autoCommit] Commit erfolgreich erstellt.'); debug('[autoCommit] Commit erfolgreich erstellt.');
// --- Gamification: Commit-Statistik speichern ---
const today = new Date().toISOString().slice(0, 10); // Format: 'YYYY-MM-DD'
const stats = store.get('dailyCommitStats') || {};
stats[today] = (stats[today] || 0) + 1;
store.set('dailyCommitStats', stats);
// Nach Commit: neuen HEAD ermitteln und in llmCandidates speichern // Nach Commit: neuen HEAD ermitteln und in llmCandidates speichern
const newHead = (await git.revparse(['HEAD'])).trim(); const newHead = (await git.revparse(['HEAD'])).trim();