From 59f6318d77475f4ea3239e57748e1e4b53824053 Mon Sep 17 00:00:00 2001 From: vegu-ai-tools <152010387+vegu-ai-tools@users.noreply.github.com> Date: Sun, 11 May 2025 17:03:04 +0300 Subject: [PATCH] editor never attempt to fix exposition on user input if input starts with command characters @, ! or / --- src/talemate/agents/editor/__init__.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/talemate/agents/editor/__init__.py b/src/talemate/agents/editor/__init__.py index f231eeac..d9cbae77 100644 --- a/src/talemate/agents/editor/__init__.py +++ b/src/talemate/agents/editor/__init__.py @@ -244,6 +244,12 @@ class EditorAgent( @set_processing async def cleanup_user_input(self, text: str, as_narration: bool = False, force: bool = False): + + # special prefix characters - when found, never edit + PREFIX_CHARACTERS = ("!", "@", "/") + if text.startswith(PREFIX_CHARACTERS): + return text + if (not self.fix_exposition_user_input or not self.fix_exposition_enabled) and not force: return text