mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-01-30 06:12:03 +00:00
Update apps/app/src/store/app-store.ts
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -1120,10 +1120,9 @@ export const useAppStore = create<AppState & AppActions>()(
|
||||
|
||||
resetAIProfiles: () => {
|
||||
// Merge: keep user-created profiles, but refresh all built-in profiles to latest defaults
|
||||
const currentProfiles = get().aiProfiles;
|
||||
const userProfiles = currentProfiles.filter((p) => !p.isBuiltIn);
|
||||
const mergedProfiles = [...DEFAULT_AI_PROFILES, ...userProfiles];
|
||||
set({ aiProfiles: mergedProfiles });
|
||||
const defaultProfileIds = new Set(DEFAULT_AI_PROFILES.map(p => p.id));
|
||||
const userProfiles = get().aiProfiles.filter(p => !p.isBuiltIn && !defaultProfileIds.has(p.id));
|
||||
set({ aiProfiles: [...DEFAULT_AI_PROFILES, ...userProfiles] });
|
||||
},
|
||||
|
||||
// Project Analysis actions
|
||||
|
||||
Reference in New Issue
Block a user