mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 05:54:26 +01:00
Serving frontend from the forge agent server (#5252)
This commit is contained in:
4
cli.py
4
cli.py
@@ -264,9 +264,13 @@ def start(agent_name):
|
||||
|
||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
agent_dir = os.path.join(script_dir, f"autogpts/{agent_name}")
|
||||
frontend_dir = os.path.join(script_dir, "frontend")
|
||||
frontend_build = os.path.join(frontend_dir, "build.sh")
|
||||
run_command = os.path.join(agent_dir, "run")
|
||||
if os.path.exists(agent_dir) and os.path.isfile(run_command):
|
||||
subprocess.Popen([frontend_build], cwd=frontend_dir)
|
||||
os.chdir(agent_dir)
|
||||
|
||||
subprocess.Popen(["./run"], cwd=agent_dir)
|
||||
click.echo(f"Agent '{agent_name}' started")
|
||||
elif not os.path.exists(agent_dir):
|
||||
|
||||
Reference in New Issue
Block a user