fix: preserve enhancement settings when power mode is disabled - Remove forced disabling of enhancement, add early return to skip configuration application, maintain user's existing settings

This commit is contained in:
Beingpax 2025-03-02 17:49:23 +05:45
parent 9e5bb56242
commit 34fada2b26

View File

@ -14,6 +14,12 @@ class ActiveWindowService: ObservableObject {
}
func applyConfigurationForCurrentApp() async {
// If power mode is disabled, don't do anything
guard PowerModeManager.shared.isPowerModeEnabled else {
print("🔌 Power Mode is disabled globally - skipping configuration application")
return
}
guard let frontmostApp = NSWorkspace.shared.frontmostApplication,
let bundleIdentifier = frontmostApp.bundleIdentifier else { return }
@ -77,9 +83,8 @@ class ActiveWindowService: ObservableObject {
}
}
} else {
// If power mode is disabled globally, disable AI enhancement
enhancementService.isEnhancementEnabled = false
print("🔌 Power Mode is disabled globally")
print("🔌 Power Mode is disabled globally - skipping configuration application")
return
}
}
}