mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-01-09 08:08:32 +00:00
26 lines
692 B
Python
26 lines
692 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)
|
|
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)
|