def supports_emoji():
    """Detect if the terminal supports emoji output."""
    term = os.getenv("TERM")
    if not term or term in ("dumb", "linux"):
        return False

    return is_locale_utf8()
Detect if the terminal supports emoji output.
ramalama/console.py