editor never attempt to fix exposition on user input if input starts with command characters @, ! or /
Some checks failed
Python Tests / test (3.10) (push) Has been cancelled
Python Tests / test (3.11) (push) Has been cancelled
Python Tests / test (3.12) (push) Has been cancelled
Python Tests / test (3.13) (push) Has been cancelled

This commit is contained in:
vegu-ai-tools 2025-05-11 17:03:04 +03:00
parent 2355f9fd4f
commit 59f6318d77

View file

@ -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