Route references found in full chunk prompts
tests / test (push) Canceled after 0s
tests / windows-storage (push) Canceled after 0s

This commit is contained in:
2026-10-15 20:59:33 +00:00
parent 92ed0cfc31
commit 6aae047401
2 changed files with 33 additions and 1 deletions
+11 -1
View File
@@ -181,10 +181,20 @@ class DumasH3SequencePromptBuilder:
default_seconds=float(default_chunk_seconds),
)
selectors = []
directive = str(shared_directive or "").strip()
sound = str(soundscape or "").strip() or "N/A"
music_text = str(music or "").strip() or "N/A"
for reference_index in range(1, 10):
chunks = []
for chunk_index, clip in enumerate(sequence["clips"], start=1):
text = "\n".join(str(slot.get("text", "")) for slot in clip["slots"])
# Match against the same per-chunk content emitted by
# format_sequence_prompt, not only the editable shot lines.
text = "\n".join([
directive,
*(str(slot.get("text", "")) for slot in clip["slots"]),
f"overall_soundscape: {sound}",
f"non_diegetic_music: {music_text}",
])
if kwargs.get(f"reference_image_{reference_index}") is not None and re.search(
rf"@(R{reference_index}|image{reference_index})(?![A-Za-z0-9_])",
text,