03f4134190
- 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.
21 lines
444 B
Python
21 lines
444 B
Python
"""System message widget."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from rich.text import Text
|
|
|
|
from textual.widgets import Static
|
|
|
|
|
|
class SystemMessage(Static):
|
|
"""Displays a system/status message (replaces ``_append_system``)."""
|
|
|
|
DEFAULT_CSS = """
|
|
SystemMessage {
|
|
height: auto;
|
|
}
|
|
"""
|
|
|
|
def __init__(self, content: str, *, msg_style: str = "dim") -> None:
|
|
super().__init__(Text(content, style=msg_style))
|