fix: change banner when DO_NOT_TRACK == 'true' (#7678)

* change banner when DO_NOT_TRACK == 'true'

* delete blank line

* Update src/backend/base/langflow/__main__.py

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>

---------

Co-authored-by: Gabriel Luiz Freitas Almeida <gabriel@langflow.org>
This commit is contained in:
Gustavo Costa 2025-04-16 18:15:54 -03:00 • committed by GitHub
commit 1a04e59e68
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -405,8 +405,15 @@ def print_banner(host: str, port: int, protocol: str) -> None:
":speech_balloon: Discord: Join for support → https://discord.com/invite/EqksyE2EX9"
)
telemetry_text = (
"We collect anonymous usage data to improve Langflow.\n"
"To opt out, set: [bold]DO_NOT_TRACK=true[/bold] in your environment."
(
"We collect anonymous usage data to improve Langflow.\n"
"To opt out, set: [bold]DO_NOT_TRACK=true[/bold] in your environment."
)
if os.getenv("DO_NOT_TRACK", os.getenv("LANGFLOW_DO_NOT_TRACK", "False")).lower() != "true"
else (
"We are [bold]not[/bold] collecting anonymous usage data to improve Langflow.\n"
"To contribute, set: [bold]DO_NOT_TRACK=false[/bold] in your environment."
)
)
access_link = f"[bold]🟢 Open Langflow →[/bold] [link={protocol}://{host}:{port}]{protocol}://{host}:{port}[/link]"