diff --git a/src/dashboard/routes/agents.py b/src/dashboard/routes/agents.py index 6a758a9..31bd7ed 100644 --- a/src/dashboard/routes/agents.py +++ b/src/dashboard/routes/agents.py @@ -12,6 +12,7 @@ from timmy.tool_safety import ( format_action_description, get_impact_level, ) +from timmy.welcome import WELCOME_MESSAGE logger = logging.getLogger(__name__) @@ -56,7 +57,7 @@ async def get_history(request: Request): return templates.TemplateResponse( request, "partials/history.html", - {"messages": message_log.all()}, + {"messages": message_log.all(), "welcome_message": WELCOME_MESSAGE}, ) @@ -66,7 +67,7 @@ async def clear_history(request: Request): return templates.TemplateResponse( request, "partials/history.html", - {"messages": []}, + {"messages": [], "welcome_message": WELCOME_MESSAGE}, ) diff --git a/src/dashboard/templates/partials/history.html b/src/dashboard/templates/partials/history.html index 5698a78..85cfbe2 100644 --- a/src/dashboard/templates/partials/history.html +++ b/src/dashboard/templates/partials/history.html @@ -20,7 +20,7 @@ {% else %}
{% endif %} diff --git a/src/timmy/welcome.py b/src/timmy/welcome.py new file mode 100644 index 0000000..62fde80 --- /dev/null +++ b/src/timmy/welcome.py @@ -0,0 +1,7 @@ +"""Welcome message shown when the chat panel loads with no history.""" + +WELCOME_MESSAGE = ( + "Mission Control initialized. Timmy ready — awaiting input.\n" + "Note: I cannot access real-time data such as weather, live feeds," + " or current news. Please ask about topics I can handle." +) diff --git a/tests/timmy/test_welcome.py b/tests/timmy/test_welcome.py new file mode 100644 index 0000000..40d366f --- /dev/null +++ b/tests/timmy/test_welcome.py @@ -0,0 +1,14 @@ +"""Tests for the welcome message module.""" + +from timmy.welcome import WELCOME_MESSAGE + + +class TestWelcomeMessage: + def test_welcome_message_contains_disclaimer(self): + assert "real-time" in WELCOME_MESSAGE.lower() + + def test_welcome_message_mentions_weather(self): + assert "weather" in WELCOME_MESSAGE.lower() + + def test_welcome_message_contains_greeting(self): + assert "Mission Control initialized" in WELCOME_MESSAGE