mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-05-04 08:42:38 +00:00
Copy all CLI source modules from lib/crewai/src/crewai/cli/ to the new lib/cli/src/crewai_cli/ package, updating internal imports from crewai.cli.* to crewai_cli.* throughout. Includes: authentication, deploy, enterprise, organization, settings, tools, triggers, templates, and all top-level CLI command modules. Also excludes lib/cli/ from pre-commit mypy checks to match existing behavior (original CLI code has the same type gaps).
26 lines
710 B
Python
26 lines
710 B
Python
import subprocess
|
|
|
|
import click
|
|
|
|
|
|
def replay_task_command(task_id: str) -> None:
|
|
"""
|
|
Replay the crew execution from a specific task.
|
|
|
|
Args:
|
|
task_id (str): The ID of the task to replay from.
|
|
"""
|
|
command = ["uv", "run", "replay", task_id]
|
|
|
|
try:
|
|
result = subprocess.run(command, capture_output=False, text=True, check=True) # noqa: S603
|
|
if result.stderr:
|
|
click.echo(result.stderr, err=True)
|
|
|
|
except subprocess.CalledProcessError as e:
|
|
click.echo(f"An error occurred while replaying the task: {e}", err=True)
|
|
click.echo(e.output, err=True)
|
|
|
|
except Exception as e:
|
|
click.echo(f"An unexpected error occurred: {e}", err=True)
|