MCPcopy Create free account
hub / github.com/OpenRaiser/PaperFlow / looks_like_must_read_command

Function looks_like_must_read_command

agents/master-coordinator/main.py:1029–1052  ·  view source on GitHub ↗

Detect must-read list operations without colliding with profile edits.

(text: Any)

Source from the content-addressed store, hash-verified

1027
1028
1029def looks_like_must_read_command(text: Any) -> bool:
1030 """Detect must-read list operations without colliding with profile edits."""
1031 cleaned = first_meaningful_line(text)
1032 lowered = cleaned.lower().strip()
1033 if not lowered:
1034 return False
1035
1036 if looks_like_bot_authored_message(cleaned):
1037 return False
1038
1039 if any(hint in lowered for hint in MUST_READ_LIST_HINTS):
1040 return True
1041
1042 if any(hint in lowered for hint in MUST_READ_TARGET_HINTS):
1043 return True
1044
1045 has_action = any(hint in lowered for hint in MUST_READ_ACTION_HINTS)
1046 has_target = any(token in cleaned for token in MUST_READ_TARGET_TOKENS) or any(
1047 token in lowered for token in MUST_READ_TARGET_TOKENS
1048 )
1049 if has_action and has_target:
1050 return True
1051
1052 return False
1053
1054
1055def extract_google_scholar_url(text: Any) -> Optional[str]:

Callers 2

detect_intentMethod · 0.85

Calls 2

first_meaningful_lineFunction · 0.85

Tested by

no test coverage detected