fix(cloud): fetch AI credits on startup with endpoint fallback and preserve cached credits

This commit is contained in:
Draculabo committed 2026-04-06 20:41:42 +08:00
1 parent ed0dd811a8
commit 61716bb512
5 files changed
+65 -12

No files matched your search

+5
View File
@@ -425,6 +425,11 @@ app
if (enabled) {
logger.info('Startup: Auto-Switch enabled, starting monitor...');
CloudMonitorService.start();
} else {
logger.info(
'Startup: Auto-Switch disabled, running one-time quota and AI credits sync...',
);
await CloudMonitorService.poll();
}
} catch (e) {
logger.error('Startup: Failed to initialize services', e);