diff --git a/src/reviewllama/cli.py b/src/reviewllama/cli.py index 4f4c96e..146c4f6 100644 --- a/src/reviewllama/cli.py +++ b/src/reviewllama/cli.py @@ -5,7 +5,7 @@ from typing import List, Optional from reviewllama.git_diff import analyze_git_repository -from .configs import OllamaConfig, ReviewConfig, create_config_from_vars +from .configs import ReviewConfig, create_config_from_vars from .logger import (log_git_analysis_result, log_git_analysis_start, log_paths, log_review_start) @@ -108,8 +108,8 @@ def cli() -> None: # TODO: Pass config to review engine log_review_start(config) log_paths(config.paths) - - for path in Paths: + + for path in config.paths: analysis = analyze_git_repository(path, config.base_branch) log_git_analysis_start(path, config.base_branch) log_git_analysis_result(analysis) diff --git a/src/reviewllama/configs.py b/src/reviewllama/configs.py index b658113..ac9741e 100644 --- a/src/reviewllama/configs.py +++ b/src/reviewllama/configs.py @@ -2,8 +2,6 @@ from dataclasses import dataclass from pathlib import Path from typing import List -from .cli import normalize_server_url - @dataclass(frozen=True) class OllamaConfig: @@ -30,7 +28,7 @@ def create_ollama_config( """Create OllamaConfig with validated parameters.""" return OllamaConfig( model=model, - server_url=normalize_server_url(server_url), + server_url=server_url, timeout=timeout, max_retries=max_retries, ) diff --git a/src/reviewllama/logger.py b/src/reviewllama/logger.py index f51eda2..00efb02 100644 --- a/src/reviewllama/logger.py +++ b/src/reviewllama/logger.py @@ -22,18 +22,18 @@ def log_review_start(config: ReviewConfig) -> None: console = create_console() """Log the start of review process with colored output.""" console.print( - f"[bold blue]ReviewLlama[/bold blue] - Starting review of {len(config.paths)} path(s)", + f"ReviewLlama - Starting review of {len(config.paths)} path(s)", style="bold", ) - console.print(f"[dim]Model:[/dim] [cyan]{config.ollama.model}[/cyan]") - console.print(f"[dim]Server:[/dim] [cyan]{config.ollama.server_url}[/cyan]") + console.print(f"Model: [cyan]{config.ollama.model}[/cyan]") + console.print(f"Server: [cyan]{config.ollama.server_url}[/cyan]") console.print() def log_paths(paths: List[Path]) -> None: """Log the paths being reviewed with colored output.""" console = create_console() - console.print("[bold]Paths to review:[/bold]") + console.print("Paths to review:") for path in paths: console.print(f" • {path}") console.print() @@ -47,21 +47,17 @@ def log_error(error: str) -> None: def log_git_analysis_start(path: Path, base_branch: str) -> None: """Log the start of git analysis.""" - console = create_console - console.print(f"[dim]Analyzing git repository at:[/dim] [yellow]{path}[/yellow]") - console.print(f"[dim]Base branch:[/dim] [cyan]{base_branch}[/cyan]") + console = create_console() + console.print(f"[dim]Analyzing git repository at:[/dim] {path}") + console.print(f"[dim]Base branch:[/dim] {base_branch}") def log_git_analysis_result(analysis: GitAnalysis) -> None: """Log the results of git analysis.""" console = create_console() - console.print( - f"[dim]Current branch:[/dim] [green]{analysis.current_branch}[/green]" - ) - console.print(f"[dim]Comparing against:[/dim] [cyan]{analysis.base_branch}[/cyan]") - console.print( - f"[dim]Files changed:[/dim] [yellow]{analysis.total_files_changed}[/yellow]" - ) + console.print(f"[dim]Current branch:[/dim] {analysis.current_branch}") + console.print(f"[dim]Comparing against:[/dim] {analysis.base_branch}") + console.print(f"[dim]Files changed:[/dim] {analysis.total_files_changed}") if analysis.diffs: console.print("\n[bold]Changed files:[/bold]")