fix issue where narration responses starting with # would result in empty messages

This commit is contained in:
vegu-ai-tools 2025-05-12 02:24:37 +03:00
parent 5b88700660
commit 5afff02f28

View file

@ -252,13 +252,15 @@ class NarratorAgent(
result = result.strip().strip(":").strip()
if "#" in result:
result = result.split("#")[0]
character_names = [c.name for c in self.scene.get_characters()]
cleaned = []
for line in result.split("\n"):
# skip lines that start with a #
if line.startswith("#"):
continue
log.debug("clean_result", line=line)
character_dialogue_detected = False