Skip to content

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming

fobidden using "npm run dev" in terminal

黄伟韬151a17159d29
diff --git a/metagpt/roles/di/role_zero.py b/metagpt/roles/di/role_zero.py
index d4c77630c..041990372 100644
--- a/metagpt/roles/di/role_zero.py
+++ b/metagpt/roles/di/role_zero.py
@@ -546,7 +546,7 @@ class RoleZero(Role):
elif cmd["command_name"] == "Terminal.run_command":
if "npm run dev" in cmd["args"]:
command_output = "command run failed! Pleae use Delopyer to deploy your project after build."
-
+ return command_output
tool_obj = self.tool_execution_map[cmd["command_name"]]
tool_output = await tool_obj(**cmd["args"])
if len(tool_output) <= 10:
diff --git a/metagpt/tools/libs/deployer.py b/metagpt/tools/libs/deployer.py
index 85f06695b..4f1ac0ecf 100644
--- a/metagpt/tools/libs/deployer.py
+++ b/metagpt/tools/libs/deployer.py
@@ -12,13 +12,6 @@ class Deployer:
async def static_server(self, src_path: str) -> str:
"""This function will be implemented in the remote service."""
- # app = aiohttp.web.Application()
- # app.router.add_static('/', src_path, show_index=True)
- # runner = aiohttp.web.AppRunner(app)
- # await runner.setup()
- # site = aiohttp.web.TCPSite(runner, "127.0.0.1", 0)
- # await site.start()
- # port = site._server.sockets[0].getsockname()[1]
return f"http://127.0.0.1:{8000}/index.html"
async def deploy_to_public(self, dist_dir: str):