Filter all warnings in CLI when DEBUG is disabled (#11246)

Co-authored-by: openhands <openhands@all-hands.dev>
This commit is contained in:
Xingyao Wang
2025-10-06 09:26:04 -04:00
committed by GitHub
parent 0e2edb63f5
commit fbf0429434

View File

@@ -7,10 +7,12 @@ This is a simplified version that demonstrates the TUI functionality.
import argparse
import logging
import os
import warnings
debug_env = os.getenv('DEBUG', 'false').lower()
if debug_env != '1' and debug_env != 'true':
logging.disable(logging.WARNING)
warnings.filterwarnings('ignore')
from prompt_toolkit import print_formatted_text
from prompt_toolkit.formatted_text import HTML