mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-17 14:04:27 +01:00
removed frontend command from the cli
This commit is contained in:
20
CLI-USAGE.md
20
CLI-USAGE.md
@@ -181,23 +181,3 @@ Displays the details of the 'TestWriteFile' benchmark test.
|
|||||||
```
|
```
|
||||||
|
|
||||||
Displays the results of the benchmark tests on 'my_agent'.
|
Displays the results of the benchmark tests on 'my_agent'.
|
||||||
|
|
||||||
### 5. Frontend Command
|
|
||||||
|
|
||||||
```sh
|
|
||||||
./run frontend
|
|
||||||
```
|
|
||||||
|
|
||||||
**Output**:
|
|
||||||
|
|
||||||
```
|
|
||||||
Agent is running.
|
|
||||||
Launching frontend
|
|
||||||
... (more details about the launch process)
|
|
||||||
```
|
|
||||||
|
|
||||||
Launches the frontend, with debugging and service details mentioned.
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
Remember to start an agent before launching the frontend and that the `agents stop` command terminates any process on port 8000.
|
|
||||||
26
cli.py
26
cli.py
@@ -569,32 +569,6 @@ def benchmark_tests_details(test_name):
|
|||||||
print(f"IOError: file could not be read: {data_file}")
|
print(f"IOError: file could not be read: {data_file}")
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
|
||||||
@cli.command()
|
|
||||||
def frontend():
|
|
||||||
"""Starts the frontend"""
|
|
||||||
import os
|
|
||||||
import socket
|
|
||||||
import subprocess
|
|
||||||
|
|
||||||
try:
|
|
||||||
output = subprocess.check_output(["lsof", "-t", "-i", ":8000"])
|
|
||||||
if output:
|
|
||||||
click.echo("Agent is running.")
|
|
||||||
else:
|
|
||||||
click.echo("Error: Agent is not running. Please start an agent first.")
|
|
||||||
except subprocess.CalledProcessError as e:
|
|
||||||
click.echo("Error: Unexpected error occurred.")
|
|
||||||
return
|
|
||||||
frontend_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)), "frontend")
|
|
||||||
run_file = os.path.join(frontend_dir, "run")
|
|
||||||
if os.path.exists(frontend_dir) and os.path.isfile(run_file):
|
|
||||||
subprocess.Popen(["./run"], cwd=frontend_dir)
|
|
||||||
click.echo("Launching frontend")
|
|
||||||
else:
|
|
||||||
click.echo("Error: Frontend directory or run file does not exist.")
|
|
||||||
|
|
||||||
|
|
||||||
@cli.group()
|
@cli.group()
|
||||||
def arena():
|
def arena():
|
||||||
"""Commands to enter the arena"""
|
"""Commands to enter the arena"""
|
||||||
|
|||||||
Reference in New Issue
Block a user