Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GmHhg7bzeoxrPsLnJ4nor4
This commit is contained in:
@ -7743,11 +7743,33 @@ async fn systemprompt_ebenen_ersetzen_sich_statt_sich_zu_stapeln() {
|
||||
assert_eq!(st, 303);
|
||||
let luna = gw.state.store().personas(TEST_NUTZER).unwrap()[0].id;
|
||||
let antwort = systeme_chat(&gw, &nutzer, &ncsrf, Some(luna)).await;
|
||||
assert!(antwort.contains("SYSTEM=PERSONA|STIL"), "{antwort}");
|
||||
// Eine Systemnachricht aus Systemprompt und Stil (→ #1257), nicht zwei.
|
||||
assert!(antwort.contains("SYSTEM=PERSONA\\n\\nSTIL"), "{antwort}");
|
||||
assert!(
|
||||
!antwort.contains("MODELL") && !antwort.contains("GLOBAL"),
|
||||
"{antwort}"
|
||||
);
|
||||
// Nur Stil (→ #1256): Der Stil wird an die Grundlage des Modells angehängt, sie wird nicht ersetzt und nicht doppelt gesetzt.
|
||||
let (st, _, _) = ui_post(
|
||||
&gw,
|
||||
"/ui/personas/speichern",
|
||||
&nutzer,
|
||||
&format!("csrf={ncsrf}&name=NurStil&systemprompt=&stil=NURSTIL"),
|
||||
)
|
||||
.await;
|
||||
assert_eq!(st, 303);
|
||||
let nur_stil = gw
|
||||
.state
|
||||
.store()
|
||||
.personas(TEST_NUTZER)
|
||||
.unwrap()
|
||||
.into_iter()
|
||||
.find(|p| p.name == "NurStil")
|
||||
.unwrap()
|
||||
.id;
|
||||
let antwort = systeme_chat(&gw, &nutzer, &ncsrf, Some(nur_stil)).await;
|
||||
assert!(antwort.contains("SYSTEM=MODELL\\n\\nNURSTIL"), "{antwort}");
|
||||
assert_eq!(antwort.matches("MODELL").count(), 1, "{antwort}");
|
||||
// Eine Persona ohne Text ersetzt nichts: Modell gilt weiter.
|
||||
let (st, _, _) = ui_post(
|
||||
&gw,
|
||||
|
||||
Reference in New Issue
Block a user