agent-gui / data /tests /test_message_sanitize.py
introvoyz041's picture
Migrated from GitHub
c453128 verified
Raw
History Blame Contribute Delete
462 Bytes
from agent_gui.message_sanitize import strip_injected_prefix
_COMPACT = (
"[Workspace: all tools run inside Docker — use /workspace/ paths.\n"
" - Workspace root: /workspace/]\n\n"
"Do the thing"
)
def test_strip_compact_workspace():
assert strip_injected_prefix(_COMPACT) == "Do the thing"
def test_strip_attachment_marker():
text = "[Attached image: shot.png]\nExplain this"
assert strip_injected_prefix(text) == "Explain this"