🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
refine code
geekan1162f21b6cee
diff --git a/metagpt/config.py b/metagpt/config.pyindex 50ad6a3b2..68b7a2a96 100644--- a/metagpt/config.py+++ b/metagpt/config.py@@ -131,8 +131,20 @@ class Config(metaclass=Singleton):self.workspace_path = Path(self._get("WORKSPACE_PATH", DEFAULT_WORKSPACE_ROOT))self._ensure_workspace_exists()+ def _init_cli_paras(self):+ self.project_path = None+ self.project_name = None+ self.inc = None+ self.reqa_file = None+ self.max_auto_summarize_code = None+def update_via_cli(self, project_path, project_name, inc, reqa_file, max_auto_summarize_code):"""update config via cli"""++ # Use in the PrepareDocuments action according to Section 2.2.3.5.1 of RFC 135.+ if project_path:+ inc = True+ project_name = project_name or Path(project_path).nameself.project_path = project_pathself.project_name = project_nameself.inc = incdiff --git a/metagpt/startup.py b/metagpt/startup.pyindex 6ae47213e..a25b71cd0 100644--- a/metagpt/startup.py+++ b/metagpt/startup.py@@ -1,7 +1,6 @@#!/usr/bin/env python# -*- coding: utf-8 -*-import asyncio-from pathlib import Pathimport typer@@ -42,10 +41,6 @@ def startup()from metagpt.team import Team- # Use in the PrepareDocuments action according to Section 2.2.3.5.1 of RFC 135.- if project_path:- inc = True- project_name = project_name or Path(project_path).nameCONFIG.update_via_cli(project_path, project_name, inc, reqa_file, max_auto_summarize_code)if not recover_path: