From 25f5f7d6b2ab22bd3b0df49fe39e513b43dab8ac Mon Sep 17 00:00:00 2001 From: Shirone Date: Sat, 13 Dec 2025 04:42:08 +0100 Subject: [PATCH] Update apps/app/src/store/app-store.ts Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> --- apps/app/src/store/app-store.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/app/src/store/app-store.ts b/apps/app/src/store/app-store.ts index 76b552d8..972b9b55 100644 --- a/apps/app/src/store/app-store.ts +++ b/apps/app/src/store/app-store.ts @@ -1120,10 +1120,9 @@ export const useAppStore = create()( 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