CGJI01_v0.2 / core /intent_detector.py
prashantmatlani's picture
updated jung_agent
7fafb5b
# core/intent_detector.py
def detect_intent(text: str):
"""
Detects whether input requires full psychological analysis
or is a system/meta/diagnostic message.
"""
lowered = text.lower()
diagnostic_markers = [
"test",
"testing",
"system check",
"confirm",
"working",
"is this working",
"respond with",
"just respond",
"only confirm",
"only a test",
"hello",
"hi",
"ping"
]
for marker in diagnostic_markers:
if marker in lowered:
return "diagnostic"
# length heuristic (very short = not depth material)
if len(text.split()) < 4:
return "minimal"
return "analysis"