Move email writing style into AI settings

This commit is contained in:
pewdiepie-archdaemon
2026-06-28 14:27:52 +00:00
parent 7094c8e285
commit 6b617f9cad
2 changed files with 10 additions and 32 deletions
-18
View File
@@ -1722,24 +1722,6 @@ async function initAgentSettings() {
(curR != null ? ' · ' + curR + ' steps/message' : '') +
(supInput && supInput.checked ? ' · supervisor on' : '');
// Standalone Email Safety toggle (separate card on the AI Defaults tab).
// Default to ON if the setting isn't present so a fresh install is safe.
var emailConfirm = el('set-agentEmailConfirm');
if (emailConfirm) {
try {
var s = await fetch('/api/auth/settings', { credentials: 'same-origin' }).then(r => r.json());
emailConfirm.checked = s.agent_email_confirm !== false;
} catch (_) {}
emailConfirm.addEventListener('change', async () => {
try {
await fetch('/api/auth/settings', {
method: 'POST', credentials: 'same-origin',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ agent_email_confirm: !!emailConfirm.checked }),
});
} catch (_) {}
});
}
}
/*