fix: branding circular dependency
This commit is contained in:
parent
55d03e335b
commit
dad75c2d37
|
|
@ -0,0 +1,17 @@
|
|||
"""Honcho CLI brand constants — colours, icons, and the ASCII banner.
|
||||
"""
|
||||
|
||||
BRAND = "#B6DAFD"
|
||||
|
||||
BANNER = r"""
|
||||
██╗ ██╗ ██████╗ ███╗ ██╗ ██████╗██╗ ██╗ ██████╗
|
||||
██║ ██║██╔═══██╗████╗ ██║██╔════╝██║ ██║██╔═══██╗
|
||||
███████║██║ ██║██╔██╗ ██║██║ ███████║██║ ██║
|
||||
██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██║ ██║
|
||||
██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║╚██████╔╝
|
||||
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝
|
||||
""".strip()
|
||||
|
||||
ICON_OK = "[green]✓[/green]"
|
||||
ICON_FAIL = "[red]✗[/red]"
|
||||
ICON_RUN = f"[{BRAND}]→[/{BRAND}]"
|
||||
|
|
@ -19,16 +19,11 @@ from honcho_cli.config import (
|
|||
DEFAULT_BASE_URL,
|
||||
CLIConfig,
|
||||
)
|
||||
from honcho_cli.main import BANNER, get_resolved_config
|
||||
from honcho_cli.branding import BANNER, BRAND, ICON_FAIL, ICON_OK, ICON_RUN
|
||||
from honcho_cli.output import print_error, print_result
|
||||
|
||||
_console = Console(stderr=True)
|
||||
|
||||
BRAND = "#B6DAFD"
|
||||
ICON_OK = "[green]✓[/green]"
|
||||
ICON_FAIL = "[red]✗[/red]"
|
||||
ICON_RUN = f"[{BRAND}]→[/{BRAND}]"
|
||||
|
||||
|
||||
# --------------------------------------------------------------------------- #
|
||||
# shared helpers
|
||||
|
|
@ -211,6 +206,8 @@ def doctor(
|
|||
if not use_json():
|
||||
_console.print(f"\n[bold {BRAND}]Honcho Doctor[/bold {BRAND}]\n")
|
||||
|
||||
from honcho_cli.main import get_resolved_config
|
||||
|
||||
config = get_resolved_config()
|
||||
_add("Config file", CONFIG_FILE.exists(),
|
||||
str(CONFIG_FILE) if CONFIG_FILE.exists() else f"{CONFIG_FILE} not found")
|
||||
|
|
|
|||
|
|
@ -10,17 +10,9 @@ from typing import Optional
|
|||
import typer
|
||||
|
||||
from honcho_cli import __version__
|
||||
from honcho_cli.branding import BANNER, BRAND
|
||||
from honcho_cli.output import set_json_mode
|
||||
|
||||
BANNER = r"""
|
||||
██╗ ██╗ ██████╗ ███╗ ██╗ ██████╗██╗ ██╗ ██████╗
|
||||
██║ ██║██╔═══██╗████╗ ██║██╔════╝██║ ██║██╔═══██╗
|
||||
███████║██║ ██║██╔██╗ ██║██║ ███████║██║ ██║
|
||||
██╔══██║██║ ██║██║╚██╗██║██║ ██╔══██║██║ ██║
|
||||
██║ ██║╚██████╔╝██║ ╚████║╚██████╗██║ ██║╚██████╔╝
|
||||
╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚═╝ ╚═╝ ╚═════╝
|
||||
""".strip()
|
||||
|
||||
app = typer.Typer(
|
||||
name="honcho",
|
||||
help="A terminal for Honcho — memory that reasons.",
|
||||
|
|
@ -77,7 +69,7 @@ def main(
|
|||
|
||||
console = Console()
|
||||
if not use_json():
|
||||
console.print(f"[bold #B6DAFD]{BANNER}[/bold #B6DAFD]")
|
||||
console.print(f"[bold {BRAND}]{BANNER}[/bold {BRAND}]")
|
||||
console.print(f" [dim]v{__version__}[/dim]\n")
|
||||
console.print(ctx.get_help())
|
||||
raise typer.Exit()
|
||||
|
|
|
|||
Loading…
Reference in New Issue