Files
EvoScientist-Multi/EvoScientist/cli/_constants.py
T
X-iZhang 03f4134190 feat: add UserMessage widget and UI backend selection during onboarding
- Introduced UserMessage widget for displaying user input with a styled prompt.
- Updated onboarding steps to include UI backend selection (Rich CLI or Textual TUI).
- Modified EvoScientistConfig to store selected UI backend.
- Enhanced configuration handling to support UI backend environment variable.
- Updated README with new UI backend options and commands.
- Added tests for new UI backend functionality and UserMessage widget.
- Removed obsolete test files and ensured existing tests are updated accordingly.
2026-02-21 01:18:33 +00:00

40 lines
2.7 KiB
Python

"""Shared constants and utilities for CLI and TUI modules."""
from datetime import datetime, timezone
from ..sessions import AGENT_NAME
WELCOME_SLOGANS = [
"Ready for vibe research? What would you want cooking?",
"Science doesn't sleep. Neither do your sub-agents.",
"From hypothesis to paper — let's cook.",
"Your research kitchen is ready. What's on the menu?",
"Experiments don't run themselves. Oh wait — they do now.",
"Drop a question. We'll bring the citations.",
"Vibe-driven discovery starts here.",
"What breakthrough are we cooking today?",
]
# ASCII art logo — shared by both Rich CLI and Textual TUI banners.
LOGO_LINES = (
r" ███████╗ ██╗ ██╗ ██████╗ ███████╗ ██████╗ ██╗ ███████╗ ███╗ ██╗ ████████╗ ██╗ ███████╗ ████████╗",
r" ██╔════╝ ██║ ██║ ██╔═══██╗ ██╔════╝ ██╔════╝ ██║ ██╔════╝ ████╗ ██║ ╚══██╔══╝ ██║ ██╔════╝ ╚══██╔══╝",
r" █████╗ ██║ ██║ ██║ ██║ ███████╗ ██║ ██║ █████╗ ██╔██╗ ██║ ██║ ██║ ███████╗ ██║ ",
r" ██╔══╝ ╚██╗ ██╔╝ ██║ ██║ ╚════██║ ██║ ██║ ██╔══╝ ██║╚██╗██║ ██║ ██║ ╚════██║ ██║ ",
r" ███████╗ ╚████╔╝ ╚██████╔╝ ███████║ ╚██████╗ ██║ ███████╗ ██║ ╚████║ ██║ ██║ ███████║ ██║ ",
r" ╚══════╝ ╚═══╝ ╚═════╝ ╚══════╝ ╚═════╝ ╚═╝ ╚══════╝ ╚═╝ ╚═══╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ ",
)
# Blue gradient: deep navy -> royal blue -> sky blue -> cyan
LOGO_GRADIENT = ["#1a237e", "#1565c0", "#1e88e5", "#42a5f5", "#64b5f6", "#90caf9"]
def build_metadata(workspace_dir: str | None, model: str | None) -> dict:
"""Build metadata dict for LangGraph checkpoint persistence."""
return {
"agent_name": AGENT_NAME,
"updated_at": datetime.now(timezone.utc).isoformat(),
"workspace_dir": workspace_dir or "",
"model": model or "",
}