diff --git a/frontend/utils/profileService.ts b/frontend/utils/profileService.ts index 33192e6..c7ec9db 100644 --- a/frontend/utils/profileService.ts +++ b/frontend/utils/profileService.ts @@ -58,7 +58,13 @@ export const updateProfile = async ( body: JSON.stringify(profileData), }); await handleAuthResponse(response, 'Failed to update profile.'); - return await response.json(); + const updatedProfile = await response.json(); + + if ('task_intelligence_enabled' in profileData) { + localStorage.removeItem('taskIntelligenceEnabled'); + } + + return updatedProfile; }; export const fetchSchedulerStatus = async (): Promise => {