/
githubmirror
/
crewai
Обзор
Документация
Войти
/
githubmirror
/
crewai
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
lib/cli/src/crewai_cli/plot_flow.py
31 строка
917 B
Vinicius Brasil
Add declarative Flow CLI support (#6294)
23 июн 2026, 05:58
Не верифицирован
23 июн 2026, 05:58
4b2ce00
Код
Авторство
О чём код?
import subprocess import click def plot_flow() -> None: """ Plot the flow from declarative config or the Python UV entrypoint. """ from crewai_cli.run_declarative_flow import ( configured_project_declarative_flow, plot_declarative_flow_in_project_env, ) if definition := configured_project_declarative_flow(): plot_declarative_flow_in_project_env(definition) else: command = ["uv", "run", "plot"] try: subprocess.run( # noqa: S603 command, capture_output=False, text=True, check=True ) except subprocess.CalledProcessError as e: click.echo(f"An error occurred while plotting the flow: {e}", err=True) raise SystemExit(1) from e except Exception as e: click.echo(f"An unexpected error occurred: {e}", err=True) raise SystemExit(1) from e