# Add to the chat response logic:
# If Eden says "I don't know" or response seems uncertain, auto-search

def auto_search_if_needed(user_input, response):
    """Search web if Eden seems unsure"""
    unsure_phrases = ["I don't know", "I'm not sure", "Let me check", "I think", "maybe"]
    
    if any(phrase.lower() in response.lower() for phrase in unsure_phrases):
        # Extract topic from user input
        import re
        topic = re.sub(r'(search|find|what is|tell me about|who is)', '', user_input, flags=re.I).strip()
        if topic:
            return web_search(topic)
    return None
