mirror of
https://github.com/AutoMaker-Org/automaker.git
synced 2026-02-03 21:03:08 +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: () => {
|
resetAIProfiles: () => {
|
||||||
// Merge: keep user-created profiles, but refresh all built-in profiles to latest defaults
|
// Merge: keep user-created profiles, but refresh all built-in profiles to latest defaults
|
||||||
const currentProfiles = get().aiProfiles;
|
const defaultProfileIds = new Set(DEFAULT_AI_PROFILES.map(p => p.id));
|
||||||
const userProfiles = currentProfiles.filter((p) => !p.isBuiltIn);
|
const userProfiles = get().aiProfiles.filter(p => !p.isBuiltIn && !defaultProfileIds.has(p.id));
|
||||||
const mergedProfiles = [...DEFAULT_AI_PROFILES, ...userProfiles];
|
set({ aiProfiles: [...DEFAULT_AI_PROFILES, ...userProfiles] });
|
||||||
set({ aiProfiles: mergedProfiles });
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// Project Analysis actions
|
// Project Analysis actions
|
||||||
|
|||||||
Reference in New Issue
Block a user