(text)
| 141 | |
| 142 | |
| 143 | def handle_user_text(text): |
| 144 | cleaned = normalize_text(text) |
| 145 | if cleaned.startswith("remember that "): |
| 146 | return remember_note(text.split("remember that", 1)[1].strip()) |
| 147 | action = rule_based_action(text) or classify_action(text) |
| 148 | if action.strip().lower() == "blocked" and not is_dangerous_request(text): |
| 149 | action = "chat" |
| 150 | answer = run_action(action) |
| 151 | if answer: |
| 152 | return answer |
| 153 | return ask_model(text) |
no test coverage detected