"""
SIMONE Chatbot Launcher
-----------------------
Run this from SIMONE UI (Tools menu / script runner).
It opens the chatbot in a NEW console window and exits immediately,
so SIMONE UI stays responsive.

The new window inherits SIMONE's environment, so simone_init("") works.
"""
import subprocess
import sys
import os

chatbot_script = os.path.join(os.path.dirname(os.path.abspath(__file__)), "simone_chatbot.py")

subprocess.Popen(
    [sys.executable, chatbot_script],
    creationflags=subprocess.CREATE_NEW_CONSOLE,
)
