Place ref context after anchor in H3 prompts

This commit is contained in:
2026-08-27 08:08:53 +00:00
parent a660919425
commit f96a3344e7
2 changed files with 38 additions and 6 deletions
+16
View File
@@ -340,6 +340,22 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
self.assertIn("Persistent appearance for Mara: silver hair.", context)
self.assertIn("Persistent wardrobe/style for Mara: red jacket.", context)
def test_reference_context_injects_after_anchor_sentence(self):
block = (
"[Generation 1] Classic sitcom lighting and staging. "
"Duke walks into the room."
)
context = "Character facts for Duke: female, 25 years old."
result = self.module._inject_reference_context(block, context)
self.assertEqual(
result,
"[Generation 1] Classic sitcom lighting and staging. "
"Character facts for Duke: female, 25 years old. "
"Duke walks into the room.",
)
def test_reference_character_memory_uses_character_wardrobe_only(self):
refs = [
{"kind": "character", "image": "img1", "name": "Mara", "wardrobe": "red jacket, black boots"},