Files
EvoScientist-Multi/EvoScientist/cli/widgets/user_message.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

26 lines
515 B
Python

"""User message widget."""
from __future__ import annotations
from rich.text import Text
from textual.widgets import Static
class UserMessage(Static):
"""Displays user input with a blue prompt marker."""
DEFAULT_CSS = """
UserMessage {
height: auto;
margin: 1 0 0 0;
}
"""
def __init__(self, content: str) -> None:
renderable = Text.assemble(
("> ", "bold #38bdf8"),
(content, "#e5e7eb"),
)
super().__init__(renderable)