Auto-deploy: 2026-09-17 20:03:51
This commit is contained in:
@@ -39,20 +39,8 @@ function loadSettings() {
|
||||
document.getElementById('api-key-input').value = data.apiKey;
|
||||
setKeyStatus('ok');
|
||||
}
|
||||
// A profile saved before the CV was rewritten describes a different person
|
||||
// than the PDF we now generate, so every prompt built from it would
|
||||
// contradict the attached CV. Migrate it back to the source of truth.
|
||||
const STALE_MARKERS = [
|
||||
'CTO & Technical Architect',
|
||||
'Senior Backend Engineer & Systems Architect',
|
||||
'IntaleqMaps',
|
||||
'hamzaayed.dev@gmail.com'
|
||||
];
|
||||
let profile = data.userProfile || DEFAULT_PROFILE;
|
||||
if (STALE_MARKERS.some(marker => profile.includes(marker))) {
|
||||
profile = DEFAULT_PROFILE;
|
||||
chrome.storage.sync.set({ userProfile: profile });
|
||||
}
|
||||
// Preserve user edits: migration must never silently replace a saved CV.
|
||||
const profile = data.userProfile || DEFAULT_PROFILE;
|
||||
document.getElementById('profile-textarea').value = profile;
|
||||
document.getElementById('lang-select').value =
|
||||
data.language || 'auto';
|
||||
|
||||
Reference in New Issue
Block a user