"""cf analyze — AI-анализ финансовой модели (заглушка).""" import typer from infrastructure.cli.i18n import t from infrastructure.cli.services import build_services, console, load_model, resolve_currency app = typer.Typer() CURRENCY_OPTION = typer.Option(None, "--currency", "-c", help=t("cmd.forecast.opt.currency")) @app.command() def analyze( months: int = typer.Option(12, "--months", "-m", help=t("cmd.analyze.opt.months")), currency: str | None = CURRENCY_OPTION, ) -> None: """AI-анализ финансовой модели""" model = load_model() target_curr, _ = resolve_currency(model, currency) _, _, assistant, _ = build_services(model) assistant.display_currency = target_curr result = assistant.analyze(months) console.print(f"[bold]{t('cmd.analyze.title.prompt')}:[/bold]") console.print(result["prompt"][:500] + "...\n") console.print(f"[bold]{t('cmd.analyze.title.summary')}:[/bold]") console.print(t("cmd.analyze.base_currency", currency=model.base_currency)) console.print(f"\n[yellow]{t('cmd.analyze.stub')}[/yellow]")