diff --git a/metagpt/actions/write_code_review.py b/metagpt/actions/write_code_review.py index 1278d6a72..7f6a7a38e 100644 --- a/metagpt/actions/write_code_review.py +++ b/metagpt/actions/write_code_review.py @@ -24,7 +24,6 @@ ATTENTION: Use '##' to SPLIT SECTIONS, not '#'. Output format carefully referenc 3. Check 2: Does the existing code follow the "Data structures and interface definitions"? 4. Check 3: Is there a function in the code that is omitted or not fully implemented that needs to be implemented? 5. Check 4: Does the code have unnecessary or lack dependencies? -6. Check 5: Does the code have ? ``` ## Rewrite Code: {filename} Base on "Code Review" and the source code, rewrite code with triple quotes. Do your utmost to optimize THIS SINGLE FILE. diff --git a/metagpt/roles/engineer.py b/metagpt/roles/engineer.py index e38518675..affccc81b 100644 --- a/metagpt/roles/engineer.py +++ b/metagpt/roles/engineer.py @@ -143,15 +143,14 @@ class Engineer(Role): return msg async def _act_sp_precision(self) -> Message: - """ - # 从历史信息中挑选必须的信息,以减少prompt长度(人工经验总结) - 1. Architect全部 - 2. ProjectManager全部 - 3. 是否需要其他代码(暂时需要)? - TODO:目标是不需要。在任务拆分清楚后,根据设计思路,不需要其他代码也能够写清楚单个文件,如果不能则表示还需要在定义的更清晰,这个是代码能够写长的关键 - :return: - """ for todo in self.todos: + """ + # 从历史信息中挑选必须的信息,以减少prompt长度(人工经验总结) + 1. Architect全部 + 2. ProjectManager全部 + 3. 是否需要其他代码(暂时需要)? + TODO:目标是不需要。在任务拆分清楚后,根据设计思路,不需要其他代码也能够写清楚单个文件,如果不能则表示还需要在定义的更清晰,这个是代码能够写长的关键 + """ context = [] msg = self._rc.memory.get_by_actions([WriteDesign, WriteTasks, WriteCode]) for m in msg: