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>
71 lines
1.8 KiB
Python
71 lines
1.8 KiB
Python
"""
|
|
CLI theme configuration.
|
|
|
|
Centralized color and style definitions for the Webber CLI.
|
|
All color choices should be defined here for easy customization.
|
|
"""
|
|
from dataclasses import dataclass
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ThemeColors:
|
|
"""Color palette for the CLI."""
|
|
|
|
# Semantic colors
|
|
info: str = "steel_blue"
|
|
warning: str = "dark_orange"
|
|
error: str = "red3"
|
|
success: str = "sea_green3"
|
|
|
|
# UI elements
|
|
prompt: str = "steel_blue bold"
|
|
title: str = "steel_blue bold"
|
|
path: str = "steel_blue underline"
|
|
code: str = "sea_green3"
|
|
highlight: str = "medium_purple1"
|
|
dim: str = "dim white"
|
|
|
|
# Panel borders
|
|
border_default: str = "steel_blue"
|
|
border_success: str = "sea_green3"
|
|
border_error: str = "red3"
|
|
border_warning: str = "dark_orange"
|
|
|
|
|
|
@dataclass(frozen=True)
|
|
class ThemeConfig:
|
|
"""Complete theme configuration."""
|
|
|
|
colors: ThemeColors = ThemeColors()
|
|
|
|
# Spinner style for loading indicators
|
|
spinner: str = "dots"
|
|
|
|
# Code syntax highlighting theme
|
|
syntax_theme: str = "monokai"
|
|
|
|
def to_rich_theme_dict(self) -> dict[str, str]:
|
|
"""Convert to Rich theme dictionary."""
|
|
return {
|
|
"info": self.colors.info,
|
|
"warning": self.colors.warning,
|
|
"error": self.colors.error,
|
|
"success": self.colors.success,
|
|
"prompt": self.colors.prompt,
|
|
"title": self.colors.title,
|
|
"path": self.colors.path,
|
|
"code": self.colors.code,
|
|
"highlight": self.colors.highlight,
|
|
"dim": self.colors.dim,
|
|
}
|
|
|
|
|
|
# Default theme instance
|
|
DEFAULT_THEME = ThemeConfig()
|
|
|
|
|
|
def get_theme() -> ThemeConfig:
|
|
"""Get the current theme configuration."""
|
|
# Future: could load from config file or env vars
|
|
return DEFAULT_THEME
|