fix: FORMAT NATIF hors cadre, apercu glossaire toujours FR/IR, prompt juridique par defaut
All checks were successful
Deploy to Production / Build and Deploy (push) Successful in 2m32s

This commit is contained in:
2026-05-31 13:29:12 +02:00
parent 85cd5456f8
commit d657b65adb
3 changed files with 16 additions and 4 deletions

View File

@@ -130,6 +130,17 @@ export const useTranslationStore = create<TranslationState>()(
}),
{
name: "translation-settings",
version: 2,
migrate: (persistedState: unknown, fromVersion: number) => {
// v1 → v2: clear systemPrompt that may have been pre-filled with legal text
if (fromVersion < 2) {
const state = persistedState as { settings?: { systemPrompt?: string } };
if (state?.settings) {
state.settings.systemPrompt = "";
}
}
return persistedState as TranslationState;
},
},
),
);