refactor(telepathic_engine): ruthless deletion of hardcoded DM and comment edge-case guards to enforce true VLM autonomy
This commit is contained in:
@@ -64,20 +64,6 @@ class TelepathicEngine:
|
||||
"""
|
||||
logger.debug(f"🧠 [SpatialEngine] Resolving intent: '{intent_description}'")
|
||||
|
||||
# 0. DM Thread Guard: Block profile intents inside DM threads
|
||||
is_dm_thread = "direct_thread_header" in xml_string or "row_thread_composer_edittext" in xml_string
|
||||
if is_dm_thread:
|
||||
profile_keywords = ["profile", "follow", "first image", "grid", "avatar", "story ring", "feed"]
|
||||
if any(k in intent_description.lower() for k in profile_keywords):
|
||||
logger.warning(f"🛡️ [DM Guard] Blocked profile/feed intent '{intent_description}' inside DM thread.")
|
||||
return {"blocked_by_dm_thread": True}
|
||||
|
||||
# 0.5 Comments Disabled Guard
|
||||
if "comment" in intent_description.lower():
|
||||
if "comments are turned off" in xml_string.lower():
|
||||
logger.warning("🛡️ [Comment Guard] Comments are disabled on this post.")
|
||||
return {"skip": True, "semantic": "comments disabled"}
|
||||
|
||||
# 1.25 Structural Fast-Paths (Deterministically bypass VLM for fixed UI elements)
|
||||
nodes_dicts = self._extract_semantic_nodes(xml_string)
|
||||
fast_node = self._structural_fast_path(intent_description, nodes_dicts, kwargs.get("skip_positions"), xml_string)
|
||||
|
||||
Reference in New Issue
Block a user