Align H3 prompt refs with beat numbering
This commit is contained in:
@@ -714,6 +714,27 @@ class DumasH3LongVideosHelperTests(unittest.TestCase):
|
||||
self.assertIn("Location context for Hangar: wet concrete floor.", context)
|
||||
self.assertIn("Location notes for Hangar: cold industrial lighting.", context)
|
||||
|
||||
def test_reference_context_uses_resolved_picture_numbers_for_per_beat_refs(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": "img1", "name": "Bill", "description": "very tall", "facts": {"age": "25"}},
|
||||
{"kind": "location", "image": "img2", "name": "Pub", "description": "warm wood bar"},
|
||||
]
|
||||
|
||||
rewritten, resolved_refs, dropped = self.module.resolve_prompt_refs(
|
||||
"[Generation 1] Bill leans on <Picture 2>.",
|
||||
refs,
|
||||
)
|
||||
context = self.module._reference_context_for_text(
|
||||
rewritten,
|
||||
refs,
|
||||
resolved_refs=resolved_refs,
|
||||
)
|
||||
|
||||
self.assertEqual(dropped, [])
|
||||
self.assertIn("Character facts for <Picture 2> Bill: 25 years old.", context)
|
||||
self.assertIn("Persistent appearance for <Picture 2> Bill: very tall.", context)
|
||||
self.assertIn("Location context for <Picture 1> Pub: warm wood bar.", context)
|
||||
|
||||
def test_reference_context_skips_ambiguous_name_matches(self):
|
||||
refs = [
|
||||
{"kind": "character", "image": "img1", "name": "Alex", "description": "short dark hair"},
|
||||
|
||||
Reference in New Issue
Block a user