mirror of
https://github.com/MBombeck/HealthLog.git
synced 2026-11-14 14:40:52 +00:00
fix(coach): compose deterministic memory facts in English by default
The deterministic fact-pattern pass fell back to German when no locale was passed, the same de-default polarity the narrative surface just lost. Fact text is model-facing memory, so English is the fallback for every locale without a reviewed body; German stays for German readers. Also correct the InsightNarrative.locale doc comment — the column holds any shipped UI locale, not just de/en. Comment only, no SQL change.
This commit is contained in:
1 parent
93738ae968
commit
d6692e3a4b
2 files changed
+6
-2
No files matched your search
@@ -558,7 +558,10 @@ function deterministicFactText(
|
||||
subject: string,
|
||||
locale: string | undefined,
|
||||
): string {
|
||||
const de = locale?.toLowerCase().startsWith("de") ?? true;
|
||||
// German only for a German reader; every other locale — and an absent one —
|
||||
// composes ENGLISH. The fact text is model-facing memory, so English is the
|
||||
// fallback body; the previous `?? true` made an unknown locale German.
|
||||
const de = locale?.toLowerCase().startsWith("de") ?? false;
|
||||
switch (kind) {
|
||||
case "allergy":
|
||||
return de
|
||||
|
||||
Reference in new issue
Block a user