🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
feat: +tool log
莘权 马0251e7ad2020
diff --git a/metagpt/tools/libs/software_development.py b/metagpt/tools/libs/software_development.pyindex 04da431b7..c5b38e00a 100644--- a/metagpt/tools/libs/software_development.py+++ b/metagpt/tools/libs/software_development.py@@ -51,13 +51,21 @@ async def write_prd(idea: str, project_path: Optional[str | Path] = None) -> Patawait role.run(with_message=msg)outputs = [- ToolLogItem(name="PRD File", value=str(ctx.repo.docs.prd.workdir / i))+ ToolLogItem(name="Intermedia PRD File", value=str(ctx.repo.docs.prd.workdir / i))for i in ctx.repo.docs.prd.changed_files.keys()]- for i in ctx.repo.resources.competitive_analysis.changed_files.keys():- outputs.append(+ outputs.extend(+ [+ ToolLogItem(name="PRD File", value=str(ctx.repo.resources.prd.workdir / i))+ for i in ctx.repo.resources.prd.changed_files.keys()+ ]+ )+ outputs.extend(+ [ToolLogItem(name="Competitive Analysis", value=str(ctx.repo.resources.competitive_analysis.workdir / i))- )+ for i in ctx.repo.resources.competitive_analysis.changed_files.keys()+ ]+ )log_tool_output(output=outputs, tool_name=write_prd.__name__)return ctx.repo.docs.prd.workdir@@ -327,9 +335,12 @@ async def git_archive(project_path: str | Path) -> str:ctx = Context()ctx.set_repo_dir(project_path)+ files = " ".join(ctx.git_repo.changed_files.keys())+ outputs = [ToolLogItem(name="cmd", value=f"git add {files}")]+ log_tool_output(output=outputs, tool_name=git_archive.__name__)ctx.git_repo.archive()- outputs = [ToolLogItem(name="Git Commit", value=str(ctx.repo.workdir))]+ outputs = [ToolLogItem(name="cmd", value="git commit -m 'Archive'")]log_tool_output(output=outputs, tool_name=git_archive.__name__)return ctx.git_repo.log()