1
0

Save commit threshold and model selections in settings.html

This commit is contained in:
2025-05-24 20:36:56 +02:00
parent 21856d702f
commit abd7eed440

View File

@@ -114,6 +114,18 @@
ok.addEventListener('click', async () => {
await window.settingsAPI.setSkipPrompt(cbSkip.checked);
// SkyMode haben wir ja schon beim Change gesetzt
// NEU: Speichere Threshold & Dropdowns
let threshold = parseInt(thresholdInput.value, 10);
if (isNaN(threshold)) threshold = 10;
await window.settingsAPI.setIntelligentCommitThreshold(threshold);
// Nur wenn Dropdowns existieren!
const commitSel = document.getElementById('commitModelSelect');
const readmeSel = document.getElementById('readmeModelSelect');
if (commitSel) await window.settingsAPI.setCommitModel(commitSel.value);
if (readmeSel) await window.settingsAPI.setReadmeModel(readmeSel.value);
window.close();
});