mirror of
https://github.com/Xe138/AI-Trader.git
synced 2026-04-08 11:47:24 -04:00
feat: add prominent startup warning for DEV mode
Add comprehensive warning display when server starts in development mode to ensure users are aware of simulated AI calls and data handling. Changes: - Add log_dev_mode_startup_warning() function in deployment_config.py - Display warning on main.py startup when DEPLOYMENT_MODE=DEV - Display warning on API server startup (api/main.py) - Warning shows AI simulation status and data persistence behavior - Provides clear instructions for switching to PROD mode The warning is highly visible and informs users that: - AI API calls are simulated (no costs incurred) - Data may be reset between runs (based on PRESERVE_DEV_DATA) - System is using isolated dev database and paths Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
8
main.py
8
main.py
@@ -12,7 +12,8 @@ from prompts.agent_prompt import all_nasdaq_100_symbols
|
||||
from tools.deployment_config import (
|
||||
is_dev_mode,
|
||||
get_deployment_mode,
|
||||
log_api_key_warning
|
||||
log_api_key_warning,
|
||||
log_dev_mode_startup_warning
|
||||
)
|
||||
from api.database import initialize_dev_database
|
||||
|
||||
@@ -108,16 +109,13 @@ async def main(config_path=None):
|
||||
|
||||
# Initialize dev environment if needed
|
||||
if is_dev_mode():
|
||||
print("=" * 60)
|
||||
print("🛠️ DEVELOPMENT MODE ACTIVE")
|
||||
print("=" * 60)
|
||||
log_dev_mode_startup_warning()
|
||||
log_api_key_warning()
|
||||
|
||||
# Initialize dev database (reset unless PRESERVE_DEV_DATA=true)
|
||||
from tools.deployment_config import get_db_path
|
||||
dev_db_path = get_db_path("data/jobs.db")
|
||||
initialize_dev_database(dev_db_path)
|
||||
print("=" * 60)
|
||||
|
||||
# Get Agent type
|
||||
agent_type = config.get("agent_type", "BaseAgent")
|
||||
|
||||
Reference in New Issue
Block a user