mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-01 20:23:36 +00:00
feat: initialize API key on module import for improved async handling
- Start API key initialization immediately upon importing the HTTP API client module to ensure the init promise is created early. - Log errors during API key initialization to aid in debugging. Additionally, added a version field to the setup store for proper state hydration, aligning with the app-store pattern.
This commit is contained in:
@@ -172,6 +172,7 @@ export const useSetupStore = create<SetupState & SetupActions>()(
|
||||
}),
|
||||
{
|
||||
name: 'automaker-setup',
|
||||
version: 1, // Add version field for proper hydration (matches app-store pattern)
|
||||
partialize: (state) => ({
|
||||
isFirstRun: state.isFirstRun,
|
||||
setupComplete: state.setupComplete,
|
||||
|
||||
Reference in New Issue
Block a user