Skip to content

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

feat: merge feature/rfc135_merge_send18_dev_config

莘权 马739348e8f149
diff --cc metagpt/actions/prepare_documents.py
index 3d202e762,8656de812..b751dc970
--- a/metagpt/actions/prepare_documents.py
+++ b/metagpt/actions/prepare_documents.py
@@@ -23,17 -23,11 +23,14 @@@ class PrepareDocuments(Action)
super().__init__(name, context, llm)
async def run(self, with_messages, **kwargs):
- if CONFIG.git_repo:
- doc = await FileRepository.get_file(filename=REQUIREMENT_FILENAME, relative_path=DOCS_FILE_REPO)
- return ActionOutput(content=doc.json(exclue="content"), instruct_content=doc)
-
- # Create and initialize the workspace folder, initialize the Git environment.
- project_name = CONFIG.project_name or FileRepository.new_filename()
- workdir = Path(CONFIG.project_path or DEFAULT_WORKSPACE_ROOT / project_name)
- if not CONFIG.inc and workdir.exists():
- shutil.rmtree(workdir)
- CONFIG.git_repo = GitRepository()
- CONFIG.git_repo.open(local_path=workdir, auto_init=True)
+ if not CONFIG.git_repo:
+ # Create and initialize the workspace folder, initialize the Git environment.
++ project_name = CONFIG.project_name or FileRepository.new_filename()
++ workdir = Path(CONFIG.project_path or DEFAULT_WORKSPACE_ROOT / project_name)
++ if not CONFIG.inc and workdir.exists():
++ shutil.rmtree(workdir)
+ CONFIG.git_repo = GitRepository()
- workdir = Path(CONFIG.WORKDIR) if CONFIG.WORKDIR else WORKSPACE_ROOT / FileRepository.new_filename()
+ CONFIG.git_repo.open(local_path=workdir, auto_init=True)
# Write the newly added requirements from the main parameter idea to `docs/requirement.txt`.
doc = Document(root_path=DOCS_FILE_REPO, filename=REQUIREMENT_FILENAME, content=with_messages[0].content)