mirror of
https://github.com/FoundationAgents/MetaGPT.git
synced 2026-06-05 14:55:18 +02:00
update test case of ActionNode
This commit is contained in:
parent
12b9f51abf
commit
4bb9c006c2
5 changed files with 20 additions and 25 deletions
|
|
@ -125,7 +125,6 @@ class Engineer(Role):
|
|||
coding_context = await action.run()
|
||||
|
||||
dependencies = {coding_context.design_doc.root_relative_path, coding_context.task_doc.root_relative_path}
|
||||
# TODO: Add code plan and change file to context when _think
|
||||
if mode == "incremental":
|
||||
dependencies.add(os.path.join(CODE_PLAN_AND_CHANGE_FILE_REPO, CODE_PLAN_AND_CHANGE_FILENAME))
|
||||
await src_file_repo.save(
|
||||
|
|
@ -222,7 +221,6 @@ class Engineer(Role):
|
|||
|
||||
node = await self.rc.todo.run()
|
||||
code_plan_and_change = node.instruct_content.model_dump_json()
|
||||
# FIXME: define a load function
|
||||
dependencies = {
|
||||
self.rc.todo.context.requirement_doc.filename,
|
||||
self.rc.todo.context.prd_docs[0].filename,
|
||||
|
|
@ -375,12 +373,11 @@ class Engineer(Role):
|
|||
|
||||
async def _new_code_plan_and_change_action(self):
|
||||
"""Create a WriteCodePlanAndChange action for subsequent to-do actions."""
|
||||
# FIXME: The following code is not robust enough
|
||||
requirement_doc = await FileRepository.get_file(filename=REQUIREMENT_FILENAME, relative_path=DOCS_FILE_REPO)
|
||||
prd_docs = await FileRepository.get_all_files(relative_path=PRDS_FILE_REPO)
|
||||
design_docs = await FileRepository.get_all_files(relative_path=SYSTEM_DESIGN_FILE_REPO)
|
||||
tasks_file_repo = CONFIG.git_repo.new_file_repository(TASK_FILE_REPO)
|
||||
tasks_docs = await tasks_file_repo.get_all()
|
||||
tasks_docs = await FileRepository.get_all_files(relative_path=TASK_FILE_REPO)
|
||||
|
||||
code_plan_and_change_context = CodePlanAndChangeContext(
|
||||
requirement_doc=requirement_doc,
|
||||
prd_docs=prd_docs,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue