Structure webber into three independent subprojects: - webber-api/: FastAPI backend server with all agent code - webber-cli/: Standalone CLI client (renamed from cli/ to webber_cli/) - webber-sandbox/: Test project for functional testing Key changes: - Each subproject has its own .venv (Python 3.12+) - Added sandbox.sh for managing test project templates - Created sandbox-templates/ with calculator-cli and empty starter - Updated CI/CD for prefixed tags (api/v*, cli/v*) - Added comprehensive AGENTS.md with operational instructions - Added gitignore filtering to glob and grep tools - Created pyproject.toml for each subproject Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
38 lines
894 B
Python
38 lines
894 B
Python
"""
|
|
Rich console helpers.
|
|
"""
|
|
from functools import lru_cache
|
|
|
|
from rich.console import Console
|
|
from rich.theme import Theme
|
|
|
|
from src.cli.theme import get_theme
|
|
|
|
|
|
@lru_cache
|
|
def get_console() -> Console:
|
|
"""Get the shared console instance with theme applied."""
|
|
theme = get_theme()
|
|
rich_theme = Theme(theme.to_rich_theme_dict())
|
|
return Console(theme=rich_theme)
|
|
|
|
|
|
def print_info(message: str) -> None:
|
|
"""Print an info message."""
|
|
get_console().print(f"[info]{message}[/]")
|
|
|
|
|
|
def print_warning(message: str) -> None:
|
|
"""Print a warning message."""
|
|
get_console().print(f"[warning]Warning:[/] {message}")
|
|
|
|
|
|
def print_error(message: str) -> None:
|
|
"""Print an error message."""
|
|
get_console().print(f"[error]Error:[/] {message}")
|
|
|
|
|
|
def print_success(message: str) -> None:
|
|
"""Print a success message."""
|
|
get_console().print(f"[success]{message}[/]")
|